PHP 4.0 Bug #7996 Updated: CGI
| From: | gb at swisszone dot ch | Date: | Mon, 27 Nov 2000 22:47:47 +0000 |
| Subject: | PHP 4.0 Bug #7996 Updated: CGI | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39328@lists.php.net to get a copy of this message | ||
ID: 7996
User Update by: gb@swisszone.ch
Old-Status: Feedback
Status: Open
Bug Type: *General Issues
Description: CGI
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.com\n\n";
?>
----------------------------------------------------------------------------
--
#!/usr/bin/perl
print "location: http://www.yahoo.com\n\n";
----------------------------------------------------------------------------
--
Thanks for your help !
Gregor Bruhin
gb@swisszone.ch
Previous Comments:
---------------------------------------------------------------------------
[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