Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

python


ghost's Avatar
0 0

Need help running python scripts on my site. My host allows python scripts but Im unfamiliar with how to set it up to run the scripts I have. Ok this is what ive done so far….1. ive made a folder in main directory called cgi-bin….2. ive uploaded the scripts in ascii mode…..3. ive chmoded the scripts and folder according to the specifications required. 4. ive included on the 1st line of each script the path #!/usr/bin/python according to my hosts requirements. Do i need to make a httpd.conf file that has adhandler? if so what is the code to put or how do i write that? when i goto mysite.com/cgi-bin/script.cgi it returns some text in the script but looks like its not being parsed or something….anyways thats how far ive gotten…any help with this would be appreciated.

This is the error I get when trying to run my scripts

Premature end of script headers…although ive added print content type text/html n\n\; (or whatever) on second line of script