Python Current Status

Status
Not open for further replies.

caCollege

New Member
Messages
3
Reaction score
0
Points
0
I am unable to run python scripts from my site.
Yes, I have added the handler for apache.
Yes, I have set permissions on the file.
Yes, I have tried using a very simple Hello World file.
Yes, I have tried running the file as a .cgi file.

I'm starting to wonder if python just isn't working right now (which from other posts seems to happen every once in a while). Anyone else experience this?
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
205
Points
63
Have you done it all from the cgi-bin folder?
 

caCollege

New Member
Messages
3
Reaction score
0
Points
0
I haven't touched the cgi-bin folder itself (do I need to set its permissions?), but the scripts I've tried to execute are in the cgi-bin folder.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
205
Points
63
If you navigate to the script via the web browser it should throw an error into your error_log so you can get an idea of what is wrong. You can access the error_log via your cPanel.
 

caCollege

New Member
Messages
3
Reaction score
0
Points
0
[Wed Mar 19 18:56:23 2008] [error] [client 141.154.55.32] File does not exist: /home/pquimby/public_html/500.shtml
[Wed Mar 19 18:53:52 2008] [error] [client 141.154.55.32] File does not exist: /home/pquimby/public_html/500.shtml
[Wed Mar 19 18:53:49 2008] [error] [client 141.154.55.32] script not found or unable to stat: /home/pquimby/public_html/cgi-bin/helloWorld6.py
[Wed Mar 19 18:53:27 2008] [error] [client 141.154.55.32] script not found or unable to stat: /home/pquimby/public_html/cgi-bin/helloWordl6.py
[Wed Mar 19 18:53:22 2008] [error] [client 141.154.55.32] script not found or unable to stat: /home/pquimby/public_html/cgi-bin/helloWordl6.cgi
[Wed Mar 19 18:52:25 2008] [error] [client 141.154.55.32] script not found or unable to stat: /home/pquimby/public_html/cgi-bin/pythonTest6.cgi
[Wed Mar 19 18:52:20 2008] [error] [client 141.154.55.32] script not found or unable to stat: /home/pquimby/public_html/cgi-bin/pythonTest6.py

Note, I kept trying the wrong filenames, so the last 2 are the only ones demonstrating the problem.
Edit:
As near as I can make out, the server is looking for a 500.shtml file.
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
205
Points
63
[Wed Mar 19 18:52:20 2008] [error] [client 141.154.55.32] script not found or unable to stat: /home/pquimby/public_html/cgi-bin/pythonTest6.py

Would be what we're interested in. The 500 messages are from it trying to find an error page to display to you.

I did a Google search and found this:
When you get this error (HTTP 404)look at the URL on the top blue bar of the Browser beside Browser Menu. This will tell you where the browser is looking for the script or HTML document.

When calling a script with a script, exclude the path information if both scripts reside in the cgi-bin directory.

This error was produced by using the action statement on the confirm.pl script: action ="cgi-bin/checkout.pl"
[error] [client 127.0.0.1] (2)No such file or directory: script not found or unable to stat: c:/usr/cgi-bin/cgi-bin

Notice that the browser was looking for a second cgi-bin directory located within the c:/usr/cgi-bin directory.
 
Status
Not open for further replies.
Top