|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I am getting a premature end of headers when I try to browse to a python page on my web server. How do I configure apache properly. I have set it so python is executable both in the cgi-bin and outside of it. I get the same message in both places. I read something about setting the enviroment to PYTHONUNBUFFERED 1. I am not sure if I have done this properly. Could one of you bright system admins please help.
|
|
#2
|
||||
|
||||
|
Hi Jason,
I've set up a few Apache servers which run Python, the two I have running on windows are on Windows ME and XP. Didin't have any problems getting this to work.. All i did was add the .py extension to the "AddHandler cgi-script" on a my CGI enabled server. Although you should be able to use the .cgi extension.. The error your getting is refering to the CGI headers. The first output from any CGI script should be the "Content-type" header like below.. Code:
#!/usr/bin/env python print 'Content-type: text/html\n' rest of script.. Anyway hope this helps. Have fun, Mark |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Python exec on a apache web server |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|