Argh... Damn Python Wont work - Help please!

I'm experimenting with Python Image Library and after installing it on a server, I tried a simple code and it wont run. I've been struggling this entire weekend trying to get to work and it just wont.

Here is the first code:

PHP Code:
#!/usr/bin/python

#import Image

#-- PAGE DEFINITION -----------------------------------------------------------------------

print "Content-type: text/html\r\n\r\n"
print "<!DOCTYPE html SYSTEM \"http://domain.com\">"
print "<center>Hello, World.</center>" 
Which works just fine and prints out Hello, World.

This Second code which is the exact same thing, except that I'm using the import module gives a 500 error.
PHP Code:
#!/usr/bin/python

import Image

#-- PAGE DEFINITION -----------------------------------------------------------------------

print "Content-type: text/html\r\n\r\n"
print "<!DOCTYPE html SYSTEM \"http://www.domain.com\">"
print "<center>Hello, World.</center>" 
I looked in the error log it said "file has no execute permission" so I gave it a 777, then it said "file is writable by others", so I changed it to 755 and nothing in the error log. Argh...

Can someone please tell me what the problem is? maybe python is not installed? I've tried a million ways. phpsuex_log shows the same errors as the error log in cpanel.

Please Help!

 

 

 

 

Top