Bug #13737 Updated: #!/usr/local/bin/php shell script line is shown first at the result page

From: Date: Sun, 10 Feb 2002 00:49:28 +0000
Subject: Bug #13737 Updated: #!/usr/local/bin/php shell script line is shown first at the result page
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-3@lists.php.net to get a copy of this message
ID: 13737 Updated by: mfischer@php.net Reported By: pgalan@cscamaras.es -Status: Duplicate +Status: Closed Bug Type: *General Issues Operating System: Solaris 2.6 PHP Version: 4.0.5 New Comment: This bug has been fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2001-10-19 02:07:22] pgalan@cscamaras.es I have solved it by making the changes recomended in bug id 9040. Locate the $PHP_INSTALL_PATH/sapi/cgi/cgi_main.c and make the following changes: *** sapi/cgi/cgi_main.c.origSun Dec 3 02:09:13 2000 --- sapi/cgi/cgi_main.cWed Jan 24 16:39:34 2001 *************** *** 719,725 **** return FAILURE; } file_handle.filename = argv0; ! } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) { /* #!php support */ c = fgetc(file_handle.handle.fp); if (c == '#') { --- 719,726 ---- return FAILURE; } file_handle.filename = argv0; ! } ! if (file_handle.handle.fp && file_handle.handle.fp!=stdin) { /* #!php support */ c = fgetc(file_handle.handle.fp); if (c == '#') { ------------------------------------------------------------------------ [2001-10-18 21:27:41] sniper@php.net Duplicate of #9041 ------------------------------------------------------------------------ [2001-10-18 10:39:38] pgalan@cscamaras.es If I run the following example: #!/usr/local/bin/php <? print "<br>Hello Word"; ?> I got the following result page: #!/usr/local/bin/php Hello World The configure options are: ./configure --with-config-file-path=/usr/local/lib --disable-debug --enable-ftp --with-informix=$INFORMIXDIR --enable-t rans-sid --with-pgsql=/usr/local/pgsql --with-mysql ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=13737&edit=1

« previous php.bugs (#3) next »