500 Internal Server Error; python script

jorgeB73

Registered
Apr 10, 2021
3
0
1
United States
cPanel Access Level
Root Administrator
Hello, for some reason I only can execute one python script inside the cgi-bin folder, scripts and folder have 755 permission, even if I copy the content of the working script to the new one, it don't work "The server encountered an internal error or misconfiguration and was unable to complete your request. "

My script:
#!/usr/bin/env python3

def main():
print("Content-type: text/html\n\n")
print
print
print("<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no'>")
print("<TITLE> Hola!</TITLE>")
print("Hola Python!")
print("\n\nal fin funcionas")

if (__name__ == "__main__"):
main()


Error Log:
No such file or directory
End of script output before headers

I'm using CENTOS 7.9 and 94.0.4 cPanel
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,879
602
273
cPanel Access Level
Root Administrator
I'm not sure why only one of those would be working. I do see you have root access to the machine, so you can submit a ticket to have our team investigate this for you. Please post the ticket number here if you do create one so I can follow along and make sure this thread stays updated.
 

jorgeB73

Registered
Apr 10, 2021
3
0
1
United States
cPanel Access Level
Root Administrator
I'm not sure why only one of those would be working. I do see you have root access to the machine, so you can submit a ticket to have our team investigate this for you. Please post the ticket number here if you do create one so I can follow along and make sure this thread stays updated.
Done, support ticket #94315782 . Thanks