php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8959 Use of Zend Optimizer w/ CGI SAPI causes echo of #!php at script start
Submitted: 2001-01-27 18:32 UTC Modified: 2001-01-27 19:53 UTC
From: pdoyle at xo dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.0.4pl1 OS: Solaris 2.5.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 23 = ?
Subscribe to this entry?

 
 [2001-01-27 18:32 UTC] pdoyle at xo dot com
I have compiled and installed PHP 4.0.4pl1 without problems, and we run it as an external binary from our Web server (SAPI CGI).  

However, when I install the current Zend Optimizer and add the appropriate lines to the php.ini file:

zend_optimizer.optimization_level=15
zend_extension="/usr/runtime/src/lib/ZendOptimizer.so"

it now spits out the first line of any script the server runs, i.e., for a script such as:

#!.php
<?
echo "Hello, world.<BR>";
?>

it will produce as HTML output:

#!.php
Hello, world.

I have checked to make sure that it's only these lines in the php.ini file -- when they are removed, it works fine.

Please note that I had already seen bug #8898 (where this problem occurred for -anyone- using the SAPI CGI) and made the diff suggested by that author, which fixed the problem when I wasn't using the optimizer.  I suspect that use of the optimizer is sending the CGI SAPI down a different path to a similar bug but I haven't been able to track it down.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-27 19:53 UTC] jimw@php.net
bugs in the zend optimizer should be reported to zend.com.
 [2023-01-23 08:12 UTC] jimw at email dot com
(https://public.tableau.com/app/profile/john.eric6400)github.com not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC