You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
movie.py cant retrun ugomenu from sudomemo utils (or any ugomenu for that matter)
current code (relevant code not the entire code):
fromtwisted.webimportresourceimportosimportsubprocessfromhatenaimportLog, ServerLog, Silent, NotFoundfromDBimportDatabasefromHatenatoolsimportTMB#php execution function i guessimportsubprocessdefexecute_php_file(php_file_path, args):
try:
# Create the command to execute the PHP filecommand= ['php', php_file_path]
# Add arguments to the command if providedifargs:
forkey, valueinargs.items():
command.append(value)
# Execute the PHP file using the PHP CLIoutput=subprocess.check_output(command, stderr=subprocess.STDOUT)
# Decode the output to a stringhtml=output.decode('utf-8')
returnhtmlexceptsubprocess.CalledProcessErrorase:
print("Error executing PHP file: "+e.output.decode('utf-8'))
returnNoneexcept (IOError, OSError):
print("PHP executable not found. Please ensure PHP is installed and in the system's PATH.")
returnNone#filetype check (also tired using .uls but still no reply)eliffiletype=="ugo":
ServerLog.write("requested ugofile")
# Example usage:php_file_path='dsphp\profile.php'args= {
'username': '%s'% (self.tmb.Username) # Pass tmb.Username as an argument
}
html=execute_php_file(php_file_path, args)
ifhtml:
print("%s send php file whit following args %s"% (request.getClientIP(), args))
returnhtml.encode("UTF-8")
The text was updated successfully, but these errors were encountered:
Figured it out.
Sorry for bad formating or wording
Its my 3rd time opening issues.
Now the issue is that, the server gives 404 when requested the generated file even if its there.
It only reads the file once the server is restarted. Issue page: #42
movie.py cant retrun ugomenu from sudomemo utils (or any ugomenu for that matter)
current code (relevant code not the entire code):
The text was updated successfully, but these errors were encountered: