[PHP] Premature end of script headers: php

2005-02-03 Thread Claudio
Hi,
Im trying to use PHP4 and PHP5 at the same time. PHP4 as CGI and PHP5 as
module.
PHP5 ist actually not present and not installed
PHP4 runs find as module, when I try to use it as CGI I receive the error
message:
Premature end of script headers: php

Can someone help me?


Here my used configurations:

Testfile: ?php phpinfo(); ?

Webserver: Apache 2.0.50 (Linux/Suse) installed as RPM

PHP4 version 4.3.10 self compiled from downloaded tar
   ./configure \
--with-apxs2=/usr/sbin/apxs2-prefork \
--prefix=/usr/local/php-4.3.10 \
--with-mysql --with-ldap

httpd.conf:
#
# If PHP4 is loaded as module
#
#IfModule sapi_apache2.c
IfModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4
/IfModule

#
# To load PHP4 as CGI
#
IfDefine PHP4_CGI
ScriptAlias /php4/ /usr/local/php-4.3.10/bin/
Directory /usr/local/php-4.3.10/bin/
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from 192.168.11
/Directory
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php-source .phps

Action application/x-httpd-php4 /php4/php

DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4
/IfDefine

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Premature end of script headers: php

2005-02-03 Thread Marek Kilimajer
My guess cli binary is executed instead of cgi.
Claudio wrote:
Hi,
Im trying to use PHP4 and PHP5 at the same time. PHP4 as CGI and PHP5 as
module.
PHP5 ist actually not present and not installed
PHP4 runs find as module, when I try to use it as CGI I receive the error
message:
Premature end of script headers: php
Can someone help me?
Here my used configurations:
Testfile: ?php phpinfo(); ?
Webserver: Apache 2.0.50 (Linux/Suse) installed as RPM
PHP4 version 4.3.10 self compiled from downloaded tar
   ./configure \
--with-apxs2=/usr/sbin/apxs2-prefork \
--prefix=/usr/local/php-4.3.10 \
--with-mysql --with-ldap
httpd.conf:
#
# If PHP4 is loaded as module
#
#IfModule sapi_apache2.c
IfModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4
/IfModule
#
# To load PHP4 as CGI
#
IfDefine PHP4_CGI
ScriptAlias /php4/ /usr/local/php-4.3.10/bin/
Directory /usr/local/php-4.3.10/bin/
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from 192.168.11
/Directory
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .php4
AddType application/x-httpd-php-source .phps
Action application/x-httpd-php4 /php4/php
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4
/IfDefine
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Premature end of script headers: php

2005-02-03 Thread Claudio
Maybe... What is the diference?

In /usr/local/php-4.3.10/ I have 5 files after make install

(pear php php-config phpextdist phpsize)

What should I do? How can I make the cgi-executable?

Marek Kilimajer wrote:
 My guess cli binary is executed instead of cgi.

 Claudio wrote:
 Hi,
 Im trying to use PHP4 and PHP5 at the same time. PHP4 as CGI and PHP5 as
 module.
 PHP5 ist actually not present and not installed
 PHP4 runs find as module, when I try to use it as CGI I receive the error
 message:
 Premature end of script headers: php

 Can someone help me?


 Here my used configurations:

 Testfile: ?php phpinfo(); ?

 Webserver: Apache 2.0.50 (Linux/Suse) installed as RPM

 PHP4 version 4.3.10 self compiled from downloaded tar
./configure \
 --with-apxs2=/usr/sbin/apxs2-prefork \
 --prefix=/usr/local/php-4.3.10 \
 --with-mysql --with-ldap

 httpd.conf:
 #
 # If PHP4 is loaded as module
 #
 #IfModule sapi_apache2.c
 IfModule mod_php4.c
 AddType application/x-httpd-php .php
 AddType application/x-httpd-php .php3
 AddType application/x-httpd-php .php4
 AddType application/x-httpd-php-source .phps
 DirectoryIndex index.php
 DirectoryIndex index.php3
 DirectoryIndex index.php4
 /IfModule

 #
 # To load PHP4 as CGI
 #
 IfDefine PHP4_CGI
 ScriptAlias /php4/ /usr/local/php-4.3.10/bin/
 Directory /usr/local/php-4.3.10/bin/
 AllowOverride None
 Options +ExecCGI -Includes
 Order allow,deny
 Allow from 192.168.11
 /Directory
 AddType application/x-httpd-php4 .php
 AddType application/x-httpd-php4 .php3
 AddType application/x-httpd-php4 .php4
 AddType application/x-httpd-php-source .phps

 Action application/x-httpd-php4 /php4/php

 DirectoryIndex index.php
 DirectoryIndex index.php3
 DirectoryIndex index.php4
 /IfDefine
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Premature end of script headers: php

2005-02-03 Thread Marek Kilimajer
Claudio wrote:
Maybe... What is the diference?
In /usr/local/php-4.3.10/ I have 5 files after make install
(pear php php-config phpextdist phpsize)
What should I do? How can I make the cgi-executable?
Marek Kilimajer wrote:
My guess cli binary is executed instead of cgi.
Try
$ /usr/local/php-4.3.10/php -v
If the output is
PHP 4.3.10 (cli) (built: .
^^^
it's CLI and CGI version was installed somewhere else. Try to locate it, 
or check the output of make install. cgi version is installed by default 
unless you include --disable-cgi in ./configure arguments

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Premature end of script headers: php

2005-02-03 Thread Richard Lynch
Claudio wrote:
 Maybe... What is the diference?

 In /usr/local/php-4.3.10/ I have 5 files after make install

Leave off the --with-apxs2 in your ./configure should make the CGI binary.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Premature end of script headers: php

2005-02-03 Thread Claudio
gw:/usr/local/php-4.3.10/bin # ./php -v
PHP 4.3.10 (cli) (built: Feb  3 2005 17:58:19)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Your guess was correct...

after a new configure without axp2s...

gw:/usr/local/php-4.3.10/bin # ./php -v
PHP 4.3.10 (cgi) (built: Feb  3 2005 22:59:02)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

now it runs... PHP4 as CGI and PHP5 as module
Thanks!!

Marek Kilimajer [EMAIL PROTECTED] schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
 Claudio wrote:
 Maybe... What is the diference?

 In /usr/local/php-4.3.10/ I have 5 files after make install

 (pear php php-config phpextdist phpsize)

 What should I do? How can I make the cgi-executable?

 Marek Kilimajer wrote:

My guess cli binary is executed instead of cgi.

 Try

 $ /usr/local/php-4.3.10/php -v

 If the output is

 PHP 4.3.10 (cli) (built: .
 ^^^

 it's CLI and CGI version was installed somewhere else. Try to locate it, 
 or check the output of make install. cgi version is installed by default 
 unless you include --disable-cgi in ./configure arguments 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Premature end of script headers

2004-08-04 Thread Kevin Schroeder
Hello,
I'm having the weirdest problem.  I'm trying to install PHP as a CGI program using 
SuExec and FastCGI but I keep on getting a Premature end of script headers: php 
error in my Apache error_log.  I got it working when I set up PHP to run as a CGI 
program when there's no virtual hosts, but as soon as I create a virtual host I get 
the end of script headers error.

I'm trying to get PHP working as a CGI program before attempting to get it to run via 
FastCGI.  Since I'm able to make it work without virtual hosts I'm assuming that my 
configuration is correct and that the problem lies in the virtual host itself.  Here's 
the virtual host as it stands.

VirtualHost *:80
ServerName hostname
DocumentRoot /home/user/htdocs
DirectoryIndex index.php index.html
ErrorLog logs/error_log
SuExecUserGroup user users
/VirtualHost

Does anyone know of a way around this problem?

Thanks,
Kevin

[PHP] Premature end of script headers: php.exe

2003-12-04 Thread Goran Ristic
Hello,

I have a problem. When I start my PHP script, I get message Premature end
of script headers: php.exe. How can I solve this problem?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Premature end of script headers: php.exe

2003-12-04 Thread Marek Kilimajer
This is a common error with php/iis combination, google for the error 
string to find possible solutions.

Goran Ristic wrote:

Hello,

I have a problem. When I start my PHP script, I get message Premature end
of script headers: php.exe. How can I solve this problem?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Premature end of script headers: php.exe

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 13:17:57 +0100 , you wrote:

I have a problem. When I start my PHP script, I get message Premature end
of script headers: php.exe. How can I solve this problem?

Run from the command line, or via a webserver? IIS or Apache? CGI or Apache
module? Do all scripts throw the error, or just some? What about an empty
script? What error code is the webserver returning? What do your error logs
show?

(My guess is that Apache is complaining that PHP is misconfigured or can't
be found - maybe a bad ScriptAlias or Action line in httpd.conf. But you're
not giving us much to work with here.)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] *Premature end of script headers

2002-12-19 Thread Alexey Lysenkov
I've found it! It's session thing.
Why? It stops at session_start, and moreover, I overslept this morning. Two
minutes ago it had to be ready, shit!..

I'm sorry.
At the other machine it runs as .exe not as mod, the guy said, version
4.0.5.
I can use only $HTTP_SESSION_VARS array, but I don't know how to get (and
not to set!) the session_id. I cannot think, please help.

-Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
What does THAT mean? My script cannot execute on this goddamn server,
running goddamn safe-damn-mode!
A line in the error.log:

[Wed Dec 18 14:18:55 2002] [error] [client 217.***.*.***] Premature end of
script headers: e:/~~~/~~~/apache/php/php.exe

Regards,
Alex

What should I tell the support guy, who is running this server? He claims,
that every other client is alright and happy with him - and why not, of
course - it's just that I want to be happy too!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] *Premature end of script headers

2002-12-18 Thread Adam Voigt




Calm down. Does it do that same error if you have something simple like:



?php phpinfo(); ?



On a page all by itself?



On Wed, 2002-12-18 at 13:12, Alexey Lysenkov wrote:

What does THAT mean? My script cannot execute on this goddamn server,

running goddamn safe-damn-mode!

A line in the error.log:



[Wed Dec 18 14:18:55 2002] [error] [client 217.***.*.***] Premature end of

script headers: e:/~~~/~~~/apache/php/php.exe



Regards,

Alex



What should I tell the support guy, who is running this server? He claims,

that every other client is alright and happy with him - and why not, of

course - it's just that I want to be happy too!







-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Not that I am really bothered with it... The thing should run in 12 hours, and the guy 
is gone, I guess, to have his late night beer, and me is sitting here and battling 
with either my stupidity or his.
Anyways. phpinfo() runs okay


  Adam Voigt [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Calm down. Does it do that same error if you have something simple like: 

  ?php phpinfo(); ? 

  On a page all by itself? 

  On Wed, 2002-12-18 at 13:12, Alexey Lysenkov wrote: 
What does THAT mean? My script cannot execute on this goddamn server, 
running goddamn safe-damn-mode! 
A line in the error.log: 

[Wed Dec 18 14:18:55 2002] [error] [client 217.***.*.***] Premature end of 
script headers: e:/~~~/~~~/apache/php/php.exe 

Regards, 
Alex 

What should I tell the support guy, who is running this server? He claims, 
that every other client is alright and happy with him - and why not, of 
course - it's just that I want to be happy too! 



-- 
PHP General Mailing List (http://www.php.net/) 
To unsubscribe, visit: http://www.php.net/unsub.php 

-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
   




Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Guys? The support guy says that my php-script brings his php interpreter to
crash. I am astonished (wow-what a powerful man I am :) ) - no, but really,
it doesn't crash MY server? He also said, it happens just right after the
file is being asked for, that is, as I suspect, somewhere in the first lines
of my php code.
I run 4.2.0, he runs 4.0.5 . Both Safe-mode on, both, as I suspect, on
Windows, mySQL as well.
What could in these first lines of the code, which follows, bring his
machine to death? Please, someone - it's so urgent, really...


?php
session_start();
$parseOkay = false;
$varsOkay = false;
$cookOkay = false;

$coo = time().-.session_id();

$hersteller = array (.);
$herstellerNr = array (2,1,4,3,5,6);

$frage5 = array(..);
$frage5bedeutung = array();

$frage1warn = false;
$php_q1 = 0;

$frage2warn = false;
$php_q2 = 0;

$frage3warn = false;

$frage4warn = false;

$frage5warn = false;
$frage5_count = 0;

$php_q6 = 0;

$php_q7 = 0;

$php_q8 = ;

$php_q9 = ;

ob_start();
if(isset($HTTP_COOKIE_VARS[foo])) {
 $coo = $HTTP_COOKIE_VARS[foo];
 $cookOkay = true;
}

if(isset($HTTP_GET_VARS[parse])){
 require(uservars.php); // BROWSER, IP, DATE;
 require(resetvars.php);
 $parseOkay = true;
}
ob_end_flush();
?

thanks.

Almost dead, but happy, that the thing works at least on ONE machine,
Alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] *Premature end of script headers

2002-12-18 Thread Dave [Hawk-Systems]
Guys? The support guy says that my php-script brings his php interpreter to
crash. I am astonished (wow-what a powerful man I am :) ) - no, but really,
it doesn't crash MY server? He also said, it happens just right after the
file is being asked for, that is, as I suspect, somewhere in the first lines
of my php code.

Interesting...

I run 4.2.0, he runs 4.0.5 . Both Safe-mode on, both, as I suspect, on
Windows, mySQL as well.

you suspect he is on winodws or know he is? (No experience with the windows
platform and PHP myself)

What could in these first lines of the code, which follows, bring his
machine to death? Please, someone - it's so urgent, really...


?php
^^
is there a space above this line?  For perl etc cgi scripts, having a space
above the hash causes this error...  might be something to check especially when
you are expecting to set cookie, session and other header related stuff, maybe
he is running as a CGI or something and causing this.

Barring that, try eliminating/commenting out chunks of code until you get the
page to at least load in some state, then start putting back untlil you narrow
down where the problem is.  Perhaps increase your error reporting...  stabbing
here.

Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Premature end of script headers

2001-10-24 Thread Tshering Norbu

Hi list,
What/why  this error:

[Wed Oct 24 17:03:33 2001] [error] [client 127.0.0.1] Premature end of
script headers: c:/php4win/php.exe


Thanks,
NOBBY



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Premature end of script headers:

2001-08-05 Thread Gary

Hello All,
writing to a flat file I am getting 500 error with Apache. I know the path
is correct and when I delete the file.txt and try to write to it. A new file
is created but no writing. What does Premature end of script headers: mean?

TIA
Gary



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Premature end of script headers:

2001-08-05 Thread Jason Murray

 Hello All,
 writing to a flat file I am getting 500 error with Apache. I 
 know the path is correct and when I delete the file.txt and try 
 to write to it. A new file is created but no writing. What does 
 Premature end of script headers: mean?

It usually means the execution of the script aborted in a way that 
Apache wasn't expecting - I'd say something has gone seriously wrong
in the script, you might want to add a few debugging statements and
see from there where a problem may lie.

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Premature end of script headers error

2001-01-26 Thread pil

Hi,

I compiled and installed php4 for the first time and it seems that all
went right as the notice in /var/log shows:

[notice] Apache/1.3.12 (Unix) PHP/4.0.4pl1 configured -- resuming normal
operations

But when I try to execute any sort of php script Im stuck with an
Internal Server error and /var/log says:

[error] [client 127.0.0.2] Premature end of script headers:
/usr/local/httpd/cgi-bin/test.php

Neither an answer in the manual nor in the FAQ 
Thanks for reply.

W. Pichler

Please cc me cause Im not subscribed to this list.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Premature end of script headers error

2001-01-26 Thread Richard Lynch

That usually means PHP is dying for some reason.

Follow the instructions on http://bugs.php.net for generating a backtrace.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: php.general
Sent: Friday, January 26, 2001 10:47 AM
Subject: [PHP] Premature end of script headers error


 Hi,

 I compiled and installed php4 for the first time and it seems that all
 went right as the notice in /var/log shows:

 [notice] Apache/1.3.12 (Unix) PHP/4.0.4pl1 configured -- resuming normal
 operations

 But when I try to execute any sort of php script Im stuck with an
 Internal Server error and /var/log says:

 [error] [client 127.0.0.2] Premature end of script headers:
 /usr/local/httpd/cgi-bin/test.php

 Neither an answer in the manual nor in the FAQ
 Thanks for reply.

 W. Pichler

 Please cc me cause Im not subscribed to this list.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]