PHP 4.0 Bug #7996 Updated: CGI
| From: | sniper@php.net | Date: | Tue, 28 Nov 2000 10:22:11 +0000 |
| Subject: | PHP 4.0 Bug #7996 Updated: CGI | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39366@lists.php.net to get a copy of this message | ||
ID: 7996
Updated by: sniper
Reported By: gb@swisszone.ch
Status: Closed
Bug Type: *General Issues
Assigned To:
Comments:
-q Quiet-mode. Suppress HTTP header output.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-11-27 17:50:46] gb@swisszone.ch
I think I know exactly what I am doing... And I think the problem does not come from my scripts but
realy from php...
In the same directory I have 2 scripts one in perl and the other in php
called test1.cgi and test2.cgi and when I execute them in the shell as user
httpd ./test1.cgi and test2.cgi I get a correct output. but when I do the
same but through apache I get a script header error from one and the other
works ...
So the only thing possible is that the output changes for the php script when execute through
apache, why I think there is no reason no ?
---------------------------------------------------------------------------
[2000-11-27 17:47:47] gb@swisszone.ch
Hi,
I use the latest php and apache.
in the shell when I execute my php and my perl script I get (this is
correct!):
----------------------------------------------------------------------------
--
./test.cgi
location: http://www.yahoo.com
----------------------------------------------------------------------------
--
if I try trough the web I get a premature end of script header for the php
script and the perl script works, and in the shell the output is exactly
the same so why ??? i tried to make su httpd ans both output are the same
and are ok ...
Here is the source of the scripts:
----------------------------------------------------------------------------
--
#!/usr/bin/php -q
<?php
echo "location: http://www.yahoo.comnn";
?>
----------------------------------------------------------------------------
--
#!/usr/bin/perl
print "location: http://www.yahoo.comnn";
----------------------------------------------------------------------------
--
Thanks for your help !
Gregor Bruhin
gb@swisszone.ch
---------------------------------------------------------------------------
[2000-11-27 17:01:26] derick@php.net
Bonjour,
could you please resend your bug report, but then written in English? Almost none of the developers
speak French
Derick
---------------------------------------------------------------------------
[2000-11-27 16:53:18] gb@swisszone.ch
Bonjour,
Il m'arrive une chose absolument incoryable !!!
J'utilise le dernier php et le dernier apache.
Tout fonctionne à merveille avec php en module, mais quand je tente de faire fonctionner php en
mode cgi plus rien ne va, j'ai innévitablement une erreur 500 premature end of script
headers.
Apache est configuré correctement pour autoriser l'exécution des cgi ds le répertoire (les
scripts perl ds le même rép s'exécutent)
Le script php est bien en 755 tout comme le script perl
En ligne de commande en tappant ./test.cgi il marche nikel et me renvoie ça (soit EXACTEMENT la
même chose que le script en perl):
------------------------------------------------------------------------------
./test.cgi
location: http://www.yahoo.com
------------------------------------------------------------------------------
En faisant su httpd les sorties des 2 scripts sont tout à fait identiques et correctes !
Ci dessous la source de mes 2 scripts celui en perl qui fonctionne et celui en php qui fonctionne
pas (ils renvoient au caractère près la même chose !!!).
------------------------------------------------------------------------------
#!/usr/bin/php -q
<?php
echo "location: http://www.yahoo.comnn";
?>
------------------------------------------------------------------------------
#!/usr/bin/perl
print "location: http://www.yahoo.comnn";
------------------------------------------------------------------------------
Merci d'avance pour votre aide !!!
Gregor Bruhin
gb@swisszone.ch
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7996