|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-01-31 17:52 UTC] john at cdproc dot com
Hello.
I'm running PHP4 as a CGI under Netscape Enterprise.
It's compiled with:
'./configure' '--prefix=/opt/php' '--with-config-file-path=/opt/php/etc' '--disable-pear' '--enable-discard-path' '--with-mysql=no' '--enable-trans-sid' '--with-oci8=/opt/oracle/8.1.7'
Whenever I call a .cgi that has the #!/path/to/php syntax at the top, the output always has a '#!/path/to/php' line at the top.
--- snip ----
#!/opt/php/bin/php
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head><STYLE TYPE="text/css"><!--
A { text-decoration: none; }
--- clip ----
My php.ini is pretty default. There's no doc_root specified when this happens.
I would think that PHP wouldn't want to include this extra line.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Here's a quick and dirty fix. 18:39 <james``> oK open cgi_main.c 18:39 <james``> and goto line 720 18:40 <james``> See that else if ..... 18:40 <james``> } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) { 18:40 <james``> make it read } 18:41 <james``> and then loose the } 11 lines downDiff copied from #8898: *** 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 == '#') {