" Cannot use assign-op operators .."

Help
2003-07-13
2003-07-21
  • Justin Matlock

    Justin Matlock - 2003-07-13

    Hello... I'm seeing something strange when the cache is operational.  On some pages, I'm getting errors like this:

    Fatal error: Cannot use assign-op operators with overloaded objects nor string offsets in /web/content/pz/index.xtm on line 0

    If I hit reload, the page will just hang, no errors, nothing... the connection stays open.

    If I disable the cache using mmcache(), the page loads right up.  It works fine with the optimizer turned on.  This happens on about 1/4 of my pages, the other 3/4 work fine.  It's consistently the same pages breaking, though.

    Even stranger, is sometimes the line number will be in the millions.

    I'm not using any objects on this page, and none are in the include files for the page.

    Any ideas where I can look to get more useful information (like what might be breaking?).

    Version:
    MMCache 2.3.19 [shm:sysvipc sem:spinlock], PHP 4.3.2 [ZE 1.3.0], Apache [Apache], Linux neo.shutdown.net 2.4.18-27.7.x #1 Fri Mar 14 05:51:23 EST 2003 i686

     
    • Justin Matlock

      Justin Matlock - 2003-07-13

      Follow.  I figured out what's doing it.. I just don't know why..

      I have most of my "main" blocks encased by

      do {

      // code

      } while (0);

      I originally did this back when "exit" would cause PHP to not close or save sessions properly.  I don't know if PHP still does this or not...

      I removed this from my pages, and the cache loaded it right up and served the page fine.

      Odd... it's work-around-able, though...

       
    • Justin Matlock

      Justin Matlock - 2003-07-13

      One more follow up...

      It doesn't do it on all of the pages with the

      do {

      // code

      } while (0);

      on them... just some... and the length doesn't seem to matter. 

      (since someone asked; I used 'break' to get out of the 'loop' to get to the bottom of the page, so it would end normally, so the sessions would get closed out, and the append script would get called.

       
    • Dmitry Stogov

      Dmitry Stogov - 2003-07-21

      I need the sources to fix the BUG, because I can't repeat it. I think this is a optimizer BUG. So you can disable optimizer in php.ini, clear the cache and restart Apache.
      If you can provide a short file, it will more better then full sources of your project.

       
      • Justin Matlock

        Justin Matlock - 2003-07-21

        Here's what breaks it for me:

        do {
        echo "Hello world!";
        } while (0);

        That's all it takes.  I double checked, and there are no prepends or appends involved. 

        Here's what I've found:
        Cache On, Optimizer On:  it breaks
        Cache Off, Optimizer On:  it works
        Cache On, Optimizer Off: it works
        Cache Off, Optimizer Off: It works

        There's something weird interacting there.

        As far as me getting around it:  since I started using the do { } while (0); trick, "return" has changed to where it will break out of a page.  I've gone through all of my code and replaced the do/while loop with returns... so it's not a critical thing (at least to me).

        This also breaks with or without the Zend Optimizer installed (I had to use it to decode some things.. blech, but have optimizer level set to 0):

        This program makes use of the Zend Scripting Language Engine:Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies with Turck MMCache v2.3.19, Copyright (c) 2002-2003 TurckSoft, St. Petersburg, by Dmitry Stogov with Zend Extension Manager v1.0.0, Copyright (c) 2003, by Zend Technologies with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend Technologies 

         
        • Dmitry Stogov

          Dmitry Stogov - 2003-07-21

          Thank you very mach. I have found and fixed the optimizer BUG. The fixed version will be available in release 2.3.20. You can try to get fixed development version form sourceforge CVS.

           

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks