php-windows Digest 3 Oct 2004 18:55:58 -0000 Issue 2418
Topics (messages 24682 through 24684):
Re: WinXP- PHP install: Premature end of script headers
24682 by: Amit Arora
24683 by: George Broyles
24684 by: DvDmanDT
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
First of all, the ScriptAlias should be written as
ScriptAlias /php/ "C:/php/"
Secondly, try executing the program from the command line and see if it
gives any error
c:\php\php-cgi index.php
If it gives any error, correct these errors and try again.
Amit
www.digitalamit.com
George Broyles wrote:
I have successfully installed Apache 2.0.51 on my Windows XP machine. I also
installed PHP 5.0.1 under c:\php and configured the php.ini as in the
instructions. I am now trying to execute a php page in my browser. I created
an index.php with the following content:
<html>
<head>
<title>PHP Test</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
PHP TEST PAGE
<? phpinfo(); ?>
</body>
</html>
If I rename the file to index.html, it renders correctly when going to
http://localhost/. But as index.php I get a 500 server error to the browser,
and the following in the apache error log:
[Sat Oct 02 15:43:42 2004] [error] [client 127.0.0.1] Premature end of
script headers: php.exe
I believe that I must have something incorrect or missing in the apache
httpd.conf. I will copy all the php related entries that I have in there
here:
*****
<IfModule mod_dir.c>
DirectoryIndex index.html index.html.var
DirectoryIndex index.htm
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex default.html
DirectoryIndex default.htm
</IfModule>
ScriptAlias /php/ "/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php /php/php.exe
*****
I can include the entire httpd.conf, if anyone feels it's necessary.
I've searched for a long time for a solution to this problem, and I find
lots of people asking the same question. But I have yet to see an answer.
The closest to an answer I've seen, is that someone said they installed php
as an apache module and that took care of their problem, but I don't know
how to install php as a module either.
Any ideas out there??
George
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I tried setting the ScriptAlias as you suggested with the "C:", but I get
the same errors.
When I run the php page from the command line, it seems to work fine.
George
[EMAIL PROTECTED]
-----Original Message-----
From: Amit Arora [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 02, 2004 6:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: WinXP- PHP install: Premature end of script headers
First of all, the ScriptAlias should be written as
ScriptAlias /php/ "C:/php/"
Secondly, try executing the program from the command line and see if it
gives any error
c:\php\php-cgi index.php
If it gives any error, correct these errors and try again.
Amit
www.digitalamit.com
George Broyles wrote:
> I have successfully installed Apache 2.0.51 on my Windows XP machine. I
also
> installed PHP 5.0.1 under c:\php and configured the php.ini as in the
> instructions. I am now trying to execute a php page in my browser. I
created
> an index.php with the following content:
> <html>
> <head>
> <title>PHP Test</title>
> </head>
> <body bgcolor="#FFFFFF" text="#000000">
> PHP TEST PAGE
> <? phpinfo(); ?>
> </body>
> </html>
>
> If I rename the file to index.html, it renders correctly when going to
> http://localhost/. But as index.php I get a 500 server error to the
browser,
> and the following in the apache error log:
> [Sat Oct 02 15:43:42 2004] [error] [client 127.0.0.1] Premature end of
> script headers: php.exe
>
> I believe that I must have something incorrect or missing in the apache
> httpd.conf. I will copy all the php related entries that I have in there
> here:
> *****
> <IfModule mod_dir.c>
> DirectoryIndex index.html index.html.var
> DirectoryIndex index.htm
> DirectoryIndex index.php
> DirectoryIndex index.php3
> DirectoryIndex default.html
> DirectoryIndex default.htm
> </IfModule>
>
> ScriptAlias /php/ "/php/"
>
> AddType application/x-httpd-php .php
>
> Action application/x-httpd-php /php/php.exe
> *****
>
> I can include the entire httpd.conf, if anyone feels it's necessary.
>
> I've searched for a long time for a solution to this problem, and I find
> lots of people asking the same question. But I have yet to see an answer.
> The closest to an answer I've seen, is that someone said they installed
php
> as an apache module and that took care of their problem, but I don't know
> how to install php as a module either.
>
> Any ideas out there??
>
> George
> [EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You are not supposed to use php.exe, use php-cgi.exe.. php.exe doesn't
generate any HTTP headers like cgi's are required to, therefore the error...
--
// DvDmanDT
MSN: dvdmandt�hotmail.com
Mail: dvdmandt�telia.com
"George Broyles" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I have successfully installed Apache 2.0.51 on my Windows XP machine. I
also
> installed PHP 5.0.1 under c:\php and configured the php.ini as in the
> instructions. I am now trying to execute a php page in my browser. I
created
> an index.php with the following content:
> <html>
> <head>
> <title>PHP Test</title>
> </head>
> <body bgcolor="#FFFFFF" text="#000000">
> PHP TEST PAGE
> <? phpinfo(); ?>
> </body>
> </html>
>
> If I rename the file to index.html, it renders correctly when going to
> http://localhost/. But as index.php I get a 500 server error to the
browser,
> and the following in the apache error log:
> [Sat Oct 02 15:43:42 2004] [error] [client 127.0.0.1] Premature end of
> script headers: php.exe
>
> I believe that I must have something incorrect or missing in the apache
> httpd.conf. I will copy all the php related entries that I have in there
> here:
> *****
> <IfModule mod_dir.c>
> DirectoryIndex index.html index.html.var
> DirectoryIndex index.htm
> DirectoryIndex index.php
> DirectoryIndex index.php3
> DirectoryIndex default.html
> DirectoryIndex default.htm
> </IfModule>
>
> ScriptAlias /php/ "/php/"
>
> AddType application/x-httpd-php .php
>
> Action application/x-httpd-php /php/php.exe
> *****
>
> I can include the entire httpd.conf, if anyone feels it's necessary.
>
> I've searched for a long time for a solution to this problem, and I find
> lots of people asking the same question. But I have yet to see an answer.
> The closest to an answer I've seen, is that someone said they installed
php
> as an apache module and that took care of their problem, but I don't know
> how to install php as a module either.
>
> Any ideas out there??
>
> George
> [EMAIL PROTECTED]
--- End Message ---