[PHP-DEV] Bug #9041 Updated: Extra #! at top of web output.
ID: 9041 Updated by: edink Reported By: [EMAIL PROTECTED] Old Status: Analyzed Status: Closed Bug Type: *General Issues Operating System: Solaris 7. PHP Version: 4.0.4pl1 New Comment: I have applied the patch to the current CVS. Previous Comments: [2001-08-31 11:53:34] [EMAIL PROTECTED] Diff 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 == '#') { [2001-06-17 04:41:01] [EMAIL PROTECTED] This will be fixed when we split the commandline and cgi modules apart. moving back to analysed. - James [2001-05-09 11:40:05] [EMAIL PROTECTED] 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 down [2001-02-24 12:06:51] [EMAIL PROTECTED] Suspending this until a decision about what should be the correct behaviour from PHP should be. [2001-02-05 16:34:55] [EMAIL PROTECTED] Here are the CGI's I'm using: #!/opt/php/bin/php ? phpinfo(); ? #!/bin/sh echo Content-type: text/html\\n\\n; echo foo! Now this might not help any, but I truss'd the web server process (Netscape, remember.) and here a few snippits output. sh CGI. read(23, C o n t e n t - t y p e.., 8192)= 31 send(17, H T T P / 1 . 1 2 0 0.., 118, 0) = 118 send(17, \n f o o !\n, 6, 0) = 6 PHP CGI. read(22, X - P o w e r e d - B y.., 8192)= 5120 send(17, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(17, # ! / o p t / p h p / b.., 5065, 0) = 5065 Graphic for PHP CGI page. send(19, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(19, G I F 8 9 a82\0 C\0D5FF.., 2962, 0) = 2962 I can't tell if the web server is inserting this line or if PHP is. However, when I run these two CGIs on the command line, I never see this extra line. I guess I'm thinking that PHP does weird shit when it's not run in a shell. Any other information I can provide? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=9041 Edit this bug report at http://bugs.php.net/?id=9041edit=1 -- PHP Development 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-DEV] Bug #9041 Updated: Extra #! at top of web output.
ID: 9041 Updated by: sander Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: *General Issues Operating System: Solaris 7. PHP Version: 4.0.4pl1 New Comment: Diff 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 == '#') { Previous Comments: [2001-06-17 04:41:01] [EMAIL PROTECTED] This will be fixed when we split the commandline and cgi modules apart. moving back to analysed. - James [2001-05-09 11:40:05] [EMAIL PROTECTED] 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 down [2001-02-24 12:06:51] [EMAIL PROTECTED] Suspending this until a decision about what should be the correct behaviour from PHP should be. [2001-02-05 16:34:55] [EMAIL PROTECTED] Here are the CGI's I'm using: #!/opt/php/bin/php ? phpinfo(); ? #!/bin/sh echo Content-type: text/html\\n\\n; echo foo! Now this might not help any, but I truss'd the web server process (Netscape, remember.) and here a few snippits output. sh CGI. read(23, C o n t e n t - t y p e.., 8192)= 31 send(17, H T T P / 1 . 1 2 0 0.., 118, 0) = 118 send(17, \n f o o !\n, 6, 0) = 6 PHP CGI. read(22, X - P o w e r e d - B y.., 8192)= 5120 send(17, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(17, # ! / o p t / p h p / b.., 5065, 0) = 5065 Graphic for PHP CGI page. send(19, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(19, G I F 8 9 a82\0 C\0D5FF.., 2962, 0) = 2962 I can't tell if the web server is inserting this line or if PHP is. However, when I run these two CGIs on the command line, I never see this extra line. I guess I'm thinking that PHP does weird shit when it's not run in a shell. Any other information I can provide? [2001-02-05 16:21:27] [EMAIL PROTECTED] it is in there.. My bad must be somthing else.. James The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=9041 Edit this bug report at http://bugs.php.net/?id=9041edit=1 -- PHP Development 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-DEV] Bug #9041 Updated: Extra #! at top of web output.
ID: 9041 Updated by: sniper Reported By: [EMAIL PROTECTED] Old-Status: Suspended Status: Critical Bug Type: Scripting Engine problem Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: Previous Comments: --- [2001-02-24 12:06:51] [EMAIL PROTECTED] Suspending this until a decision about what should be the correct behaviour from PHP should be. --- [2001-02-05 16:34:55] [EMAIL PROTECTED] Here are the CGI's I'm using: #!/opt/php/bin/php ? phpinfo(); ? #!/bin/sh echo Content-type: text/html\n\n; echo foo! Now this might not help any, but I truss'd the web server process (Netscape, remember.) and here a few snippits output. sh CGI. read(23, C o n t e n t - t y p e.., 8192)= 31 send(17, H T T P / 1 . 1 2 0 0.., 118, 0) = 118 send(17, n f o o !n, 6, 0) = 6 PHP CGI. read(22, X - P o w e r e d - B y.., 8192)= 5120 send(17, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(17, # ! / o p t / p h p / b.., 5065, 0) = 5065 Graphic for PHP CGI page. send(19, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(19, G I F 8 9 a82 -- PHP Development 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-DEV] Bug #9041 Updated: Extra #! at top of web output.
ID: 9041 Updated by: jmoore Reported By: [EMAIL PROTECTED] Old-Status: Critical Status: Analyzed Bug Type: *General Issues Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: This will be fixed when we split the commandline and cgi modules apart. moving back to analysed. - James Previous Comments: --- [2001-05-09 11:40:05] [EMAIL PROTECTED] 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 down --- [2001-02-24 12:06:51] [EMAIL PROTECTED] Suspending this until a decision about what should be the correct behaviour from PHP should be. --- [2001-02-05 16:34:55] [EMAIL PROTECTED] Here are the CGI's I'm using: #!/opt/php/bin/php ? phpinfo(); ? #!/bin/sh echo Content-type: text/html\n\n; echo foo! Now this might not help any, but I truss'd the web server process (Netscape, remember.) and here a few snippits output. sh CGI. read(23, C o n t e n t - t y p e.., 8192)= 31 send(17, H T T P / 1 . 1 2 0 0.., 118, 0) = 118 send(17, n f o o !n, 6, 0) = 6 PHP CGI. read(22, X - P o w e r e d - B y.., 8192)= 5120 send(17, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(17, # ! / o p t / p h p / b.., 5065, 0) = 5065 Graphic for PHP CGI page. send(19, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(19, G I F 8 9 a82 -- PHP Development 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-DEV] Bug #9041 Updated: Extra #! at top of web output.
ID: 9041 User Update by: [EMAIL PROTECTED] Status: Suspended Bug Type: Scripting Engine problem Operating system: Solaris 7. PHP Version: 4.0.4pl1 Description: Extra #! at top of web output. 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 down Previous Comments: --- [2001-02-24 12:06:51] [EMAIL PROTECTED] Suspending this until a decision about what should be the correct behaviour from PHP should be. --- [2001-02-05 16:34:55] [EMAIL PROTECTED] Here are the CGI's I'm using: #!/opt/php/bin/php ? phpinfo(); ? #!/bin/sh echo Content-type: text/html\n\n; echo foo! Now this might not help any, but I truss'd the web server process (Netscape, remember.) and here a few snippits output. sh CGI. read(23, C o n t e n t - t y p e.., 8192)= 31 send(17, H T T P / 1 . 1 2 0 0.., 118, 0) = 118 send(17, n f o o !n, 6, 0) = 6 PHP CGI. read(22, X - P o w e r e d - B y.., 8192)= 5120 send(17, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(17, # ! / o p t / p h p / b.., 5065, 0) = 5065 Graphic for PHP CGI page. send(19, H T T P / 1 . 1 2 0 0.., 146, 0) = 146 send(19, G I F 8 9 a82 -- PHP Development 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]