472,995 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,995 software developers and data experts.

Apache, PHP, and WinXP, getting "Premature end of script headers" -- help?

Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions on
apache manual and php manual (as far as I can see), but getting "internal
server error" in browser... log says "Premature end of script headers" for
my simple test scripts

PHP runs fine from the command line, incidentally

I tried changing the doc_root in php.ini from blank to the path of htdocs --
no difference.

Any suggestions? Grateful for any advice.

(ps, will be grateful if not sidelined into discussions as to why doing this
on windows, thanks very kindly)

Jul 16 '05 #1
3 7555
>Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions on
apache manual and php manual (as far as I can see), but getting "internal
server error" in browser... log says "Premature end of script headers" for
my simple test scripts
Do your test scripts generate legitimate headers for your
output? (e.g.:

Content-type: text/html

is a minimal header set)
PHP runs fine from the command line, incidentally


Frequent causes of no headers generated by a CGI (some of these
apply to PHP as a module also, if that's even possible on WinXP) include:

- The web server can't find the CGI or refuses to run it for some
reason (check permissions, and with Apache, making permissions
TOO LIBERAL can screw things up). Check the server error log.
- The CGI fails to execute for some reason (can't find libraries,
PATH not set as expected, permission problems) or aborts early.
- The script forgets to output headers. This should be less of
a problem with PHP, but there may still be an issue of error
messages showing up ahead of the headers.
- Error/warning messages output before the headers.

Gordon L. Burditt
Jul 16 '05 #2

"Gordon Burditt" <go***********@sneaky.lerctr.org> wrote in message
news:bi********@library1.airnews.net...
Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions onapache manual and php manual (as far as I can see), but getting "internal
server error" in browser... log says "Premature end of script headers" formy simple test scripts


Do your test scripts generate legitimate headers for your
output? (e.g.:

Content-type: text/html

is a minimal header set)


Hi, thanks very much for suggsestions. I tried a few tweaks here and there,
but nothing worked. I was trying to use PHP as cgi because I thought it
would be the most straightforward way to get it up and running (how wrong I
was!) I've given up and followed the module route, and - guess what? - It
took a few minutes, and it works just fine!
Jul 16 '05 #3
"Seagull Manager" <se*************@nospamthanksbecauseisayso.demon.c o.uk> wrote in message news:<bi*******************@news.demon.co.uk>...
"Gordon Burditt" <go***********@sneaky.lerctr.org> wrote in message
news:bi********@library1.airnews.net...
Running Apache 1.3, PHP 4.3, and WinXP, configured acc. to instructions onapache manual and php manual (as far as I can see), but getting "internal
server error" in browser... log says "Premature end of script headers" formy simple test scripts


Do your test scripts generate legitimate headers for your
output? (e.g.:

Content-type: text/html

is a minimal header set)


Hi, thanks very much for suggsestions. I tried a few tweaks here and there,
but nothing worked. I was trying to use PHP as cgi because I thought it
would be the most straightforward way to get it up and running (how wrong I
was!) I've given up and followed the module route, and - guess what? - It
took a few minutes, and it works just fine!


Yes, My fellow guys also faced same problem (PHP4.3.2
(cgi)/Apache 1.3/XP). I don't know if it's a bug. For them,
reinstalling Apache fixed the problem.

---
"Believe it or not, patriotism is one of the worst dividing forces"
Email: rrjanbiah-at-Y!com
Jul 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ajay | last post by:
hi! i am generating a file on the fly and making a user download it. print "Content-Type: application/model\n\n" print "Content-Disposition: attachment; filename=modeldef3\n" print str i set...
11
by: tdi | last post by:
Ok, stupid question for the day. I'm reading the interview with Steve Moret and he says: "Once a lot of scripts started going in we knew there was no way we could back out of using Python." I'm...
1
by: Allen | last post by:
I am trying to add an additional photo/hyperlink to the company web site (I didn't create it) without any luck. The mouseover feature 'highlights' pics by swapping them with another pic using this...
5
by: hoozdiss | last post by:
i installed apache 2.2 on winxp with php5. when i write a piece of html and include a php or java script in the html i have no problem. when i file the script and use something like <script ...
1
by: Christoph Burschka | last post by:
I have compiled PHP 5.2.3 as a CGI binary, and this works. I can, for example, do the following: $ php.cgi hello_world.php X-Powered-By: PHP/5.2.3 Content-type: text/html Hello World! ===
0
by: phpCodeHead | last post by:
Hello all, Given the following code: $FormSubmittedUserData = "John Doe <jdoe@somedomain.yuk>"; $to = 'myemail@emaildomain.nuts'; $subject = 'This is my subject'; $message = 'This is my...
3
by: shybe | last post by:
Ok, Im trying to create a "send this article to a friend" script for my blog, Right now its sending all the articles, but I want it to only send the article in which the form is attached...
3
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude...
7
by: rajkumarbathula | last post by:
Hi I am creating a usercontrol in .net and using that as webpart in sharepoint site. i want to make use of ajax in my user control. and hence i added scriptmanager, updatepannel and update...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.