views:

64

answers:

1

My python script executes fine in Jail shell, putting out html which I can pipe to an html file. When I look at the file, it's exactly what I want. However when I try to run the file from a browser I get a 500 error. According to the instructions at http://imgseekweb.sourceforge.net/install.html the cgi-bin should be in suEXEC mode. My hosting company changed the cgi-script handler to allow .py files and he made a little test script that works fine, but mine still does not.

I tried to make suEXEC a custom Apache file handler of .py files in cPanel, but this did not seem to help, it just made the Python script print out as text in the browser without executing.

Any ideas for resolution. I'm so close now that script at least works in Jail Shell. I even try to fake out Apache by making the test file launch a system execution of the python script but that also caused a 500 error, although it too spit out the correct html in Jail Shell even doing some Lynx like display of the html this time.

Whatever machinations I did also caused the test.py to stop working. It now gives a 500 error too even with all the code I added removed.

A: 

My hoster resolved the issue. It turns out I'm working in a Windows environment with Microsoft Expression 2.0 HTML editor. The code needed to be converted to a UNIX environment with dos2unix which is installed in the hoster environment and can be accessed from the shell...Thanks for reading this thread to any who read it.

socrtwo