Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on Zend Optimizer in the Shared & Semi-Dedicated forum
I just went to upgrade my Menalto Gallery on one of my sites, and all heck broke loose. I *think* I narrowed it down to ...

  1. #1
    Loyal Client
    Join Date
    Aug 2002
    Posts
    269

    Zend Optimizer

    I just went to upgrade my Menalto Gallery on one of my sites, and all heck broke loose. I *think* I narrowed it down to the problem referenced in this FAQ on the Gallery website.

    Code:
    I get "Notice: Only variable references should be returned by reference in ", what's wrong?
    Most probably you are running PHP 4.4.0+ and use the PHP Zend Optimizer (see phpinfo). This is a Zend Optimizer bug. See http://gallery.menalto.com/node/36605#comment-133101 for some explanations. 
    
    Solution: Use a newer Zend Optimizer version, e.g. ZendOptimizer-2.6.2 or later versions. 
    
    If you run PHP 4.4.0 but don't use the Zend Optimizer, then most probably you're using a G2 version which is older than G2 Beta 4. You should upgrade to the latest stable release of G 2.0. 
    
    If you or your host is unwilling to disable or upgrade the Zend Optimizer to a fixed version or change the PHP version, there's a workaround (solution discovered by Mark Scott, 13/10/2005, "I've found that removing optimization pass 1 removes the notices caused by optimizing away the variable that should be referenced and returned."): 
    
    In php.ini replace:
    zend_optimizer.optimization_level=15
    with:
    zend_optimizer.optimization_level=14
    There also used to be a way to view phpinfo(), but I can't find it. I looked in my Cpanel and the Jag Network Status page. Any suggestions?

  2. #2
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Just put it in a file of your own, like phpinfo.php:

    PHP Code:
    <?php
      phpinfo
    ();
    ?>
    Do keep access to yourself though. There's some info there that's not for the world to gloat at, which is why you can no longer find it in public on the servers. I keep mine around in a password protected folder, but you could also just delete the file after use, if you don't expect to be needing it frequently.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by salewit
    I just went to upgrade my Menalto Gallery on one of my sites...

    There also used to be a way to view phpinfo(), but I can't find it. I looked in my Cpanel and the Jag Network Status page. Any suggestions?
    Which Gallery version were you running? Which version are you running now?

    And, if you run your own install of phpMyAdmin, the phpinfo() function is available on the home screen, e.g. 'Show PHP information', along with other useful features that you don't get in the cPanel version.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  4. #4
    Loyal Client
    Join Date
    Aug 2002
    Posts
    269
    I had the 2.0.4 version installed. They just came out with a semi-major upgrade version 2.1. It's been kind of a nightmare and it's still not working 100% perfectly yet. But I sent that exact FAQ to Jag and they replied with "Ok, we did it". Not sure what it was they did (they're not known for their wordiness are they?), but the upgrade problem I wrote about above went through flawlessly.

    Apparently I wasn't alone. See the thread on Menalto: http://gallery.menalto.com/node/46592

    If you do the upgrade, I suggest a backup of the script and database.

  5. #5
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    I guess they upgraded the Zend optimizer?

    You could also include a few lines in your .htaccess (soon php.ini) to set the error level to your own liking, as well as make it log to a file instead of output to the screen. This is strongly recommended for production sites anyway and would have stopped this notice from ever appearing and thus from disrupting the sending of the cookie as well.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  6. #6
    Loyal Client
    Join Date
    Aug 2002
    Posts
    269
    Is this what was happening? Because someone on the Gallery forum mentioned to just stop the error responses, and then another person said that this wasn't fixing the problem. It's all way over my head, but I just assumed that Gallery encountered some errors and the script stopped. Not that simple?

    It doesn't appear that Zend was updated. When I ran my phpinfo script, it shows the same exact Zend version (2.5.?) before and after I sent in the ticket. Again on Gallery someone said Zend 2.6.2 won't even run on PHP4.

  7. #7
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Quote Originally Posted by salewit
    Is this what was happening? Because someone on the Gallery forum mentioned to just stop the error responses, and then another person said that this wasn't fixing the problem. It's all way over my head, but I just assumed that Gallery encountered some errors and the script stopped. Not that simple?
    Indeed, not that simple. The "error" it starts out with is just a "notice", which means it is usually fairly innocent. It is the sending of that notice itself that causes the serious trouble.

    How? Well.. before the content of a web page (the text we read), some headers are sent to your browser. This cannot be done the other way around. That notice however, unexpectedly sent some content your way (the notice you read). The program then goes it's merry way, until it finds out it is too late to send the headers it was planning to. Result: the (other) errors and eventually the program crash.


    Not showing the error indeed doesn't make the deeper problem go away. But well, I'd leave cleaning up some sloppyness to the Gallery folk themselves if I were you.

    From what I heard they are quite strict in their programming, so to them this is a serious something that needs fixing. I can only applaud that, but it is not for you to bother with.

    When I ran my phpinfo script, it shows the same exact Zend version (2.5.?) before and after I sent in the ticket. Again on Gallery someone said Zend 2.6.2 won't even run on PHP4.
    Well, it's the ".?" where it gets interesting. You sure that's still the same? I didn't look into it, but I had a hard time imagining that the PHP4 version is already not maintained anymore. PHP 4 itself also still sees new releases frequently with bug and security fixes. That sort of thing is normal as long as a product still sees a lot of use, so it would be poor practice of Zend if they don't do it. However, such a product would then continue the 2.5.x line and NOT be in the 2.6.x line. (Like JagPC is running and updating PHP4.x.x with PHP5 already around and Apache 1.3.x with 2.x already long since around.)
    Last edited by Gwaihir; 03-28-2006 at 05:46 AM.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •