#439 (in 2.5.5-rc1) Problems with bytecode caches

2.3.1
fixed
1
2013-06-11
2002-06-20
Anonymous
No

i just tried almost all versions(from 2.2.0~2.3.0rc1)

phpMyAdmin can't work with Zend Accelerator properly

it alway tells me that functions is redeclare

i guess something goes wrong in common.lib.php or
other files require it.

Discussion

1 2 3 > >> (Page 1 of 3)
  • Robin Johnson

    Robin Johnson - 2002-06-21
    • priority: 5 --> 7
     
  • Robin Johnson

    Robin Johnson - 2002-06-21

    Logged In: YES
    user_id=30201

    What version of PHP and Apache are you using with Zend
    Accelerator?

     
  • Nobody/Anonymous

    Logged In: NO

    I'm using PHP-4.2.1 and Apache-1.3.24

    Luckly, i've resolved this problem ;-)

    simply replace require(),include() with require_once
    (),include_once() in all files, then everything goes fine.

     
  • Alexander M. Turek

    • milestone: --> 215493
    • summary: it doesn't work properly with Zend Accel --> (2.3.0-rc1) it doesn't work properly with Zend Accelerator
    • assigned_to: nobody --> rabus
    • status: open --> open-accepted
     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    I'll try to build a patch.

     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    Could you please check something for me? Does it also work, if you only
    use require_once for the calls of the *.lib.php3 files (except
    defines.lib.php3)?
    If so, this would be the way to go.

     
  • Nobody/Anonymous

    Logged In: NO

    My favour!

    but i don't think it's a perfect solution for PHP3

    as far as i know require_once was added in PHP 4.0.1pl2, so...

     
  • Nobody/Anonymous

    Logged In: NO

    My favour!

    but i don't think it's a perfect solution for PHP3

    as far as i know require_once was added in PHP 4.0.1pl2, so...

     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    I know and I'll take care of this, just trust in me ;-)

     
  • Jack Scagnetti

    Jack Scagnetti - 2002-06-27

    Logged In: YES
    user_id=569702

    I just swapped in require_once() in header.inc.php and everything was fine.

    phpMyAdmin-2.3.0-rc1
    Apache/1.3.26
    PHP 4.2.1
    ZendAccelerator-2.0.2

     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    All right, could you try the latest CVS version, then?
    I just changed
    header.inc.php3 as you said.
    And I really hope it works now...

     
  • Alexander M. Turek

    • priority: 7 --> 3
     
  • Loïc Chapeaux

    Loïc Chapeaux - 2002-07-08

    Logged In: YES
    user_id=144058

    Alexander, your fix is a bit strange: "require*" statements are
    always executed even within a non-matched "if... then..."
    clause.

    I suggest to define a variable that contains "require_once"
    or "require" depending on the PHP version and to use this
    variable to include the libraries.

    Loc

     
  • R. Jarett Kulm

    R. Jarett Kulm - 2002-07-15

    Logged In: YES
    user_id=456720

    Simply run this oneliner in your shell in the PHPMyAdmin
    directory to correct the problem:

    perl -pi -e 's/require\(/require_once\(/' *.php

    As long as you have file permissions, itll work fine.

     
  • Loïc Chapeaux

    Loïc Chapeaux - 2002-07-15

    Logged In: YES
    user_id=144058

    Hi "jkulm"!

    Nice idea... but phpMyAdmin will no long be PHP3
    compatible this way. That's why I suggest to use a variable to
    define the function to use.

    Loc

     
  • Loïc Chapeaux

    Loïc Chapeaux - 2002-07-15

    Logged In: YES
    user_id=144058

    IMHO, the best fix would like this (at the beginning
    of "header.inc.php3"):

    if (!defined('PMA_COMMON_LIB_INCLUDED')) {
    include('./libraries/common.lib.php3');
    }
    if (!defined('PMA_OB_LIB_INCLUDED')) {
    include('./libraries/ob.lib.php3');
    }
    ....

    Loc

     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    d'accord, Loc.

    But why did you change the require() function calls into
    include() ones?
    I'll commit your change using require() calls.

     
  • Loïc Chapeaux

    Loïc Chapeaux - 2002-07-16

    Logged In: YES
    user_id=144058

    Alexander, the reason why I changed "require" calls
    to "include" ones is explained by a note in the php
    documentation:

    "Prior to PHP 4.0.2, the following applies: require() will
    always attempt to read the target file, even if the line it's
    on never executes. The conditional statement won't
    affect require()."

    Loc

     
  • Alexander M. Turek

    • priority: 3 --> 2
     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    All right, I've just changed the calls back to include().

    It would be
    great if I could some feedback from a Zend Accelerator user if the bug is
    fixed now.

     
  • Alexander M. Turek

    • priority: 2 --> 1
    • status: open-accepted --> open-fixed
     
  • Alexander M. Turek

    Logged In: YES
    user_id=418833

    It seems to work since nobody complains about the bug anymore... ;-
    )

    I declared this bug as "fixed".

     
  • Loïc Chapeaux

    Loïc Chapeaux - 2002-07-29
    • status: open-fixed --> closed-fixed
     
  • Thomas Nilsson

    Thomas Nilsson - 2002-08-13

    Logged In: YES
    user_id=45437

    The bug (or an remarkable simulation) is still active:

    Fatal error: Cannot redeclare () (previously declared
    in /home/fatal/public_html/php/phpMyAdmin-
    2.3.0/libraries/string.lib.php:31)
    in /home/fatal/public_html/php/phpMyAdmin-
    2.3.0/libraries/sqlparser.lib.php on line 38

    Problem is though, that sqlparser.lib.php, got the solution
    discussed earlier, although common.lib.php does not.
    (include is at line 171 in common.lib.php)

    It's too late for me to go through all of this and submit a
    patch, it's better if a seasoned maintainer goes through and
    fixes it the "right" way.

     
  • Thomas Nilsson

    Thomas Nilsson - 2002-08-14

    Logged In: YES
    user_id=45437

    Other locations:

    Fatal error: Cannot redeclare () (previously declared
    in /home/fatal/public_html/php/phpMyAdmin-
    2.3.0/libraries/common.lib.php:232)
    in /home/fatal/public_html/php/phpMyAdmin-
    2.3.0/db_details_common.php on line 9

    when clicking the "Query" 'tab' when viewing database.

    Fatal error: Cannot redeclare () (previously declared
    in /home/fatal/public_html/php/phpMyAdmin-
    2.3.0/libraries/common.lib.php:232)
    in /home/fatal/public_html/php/phpMyAdmin-
    2.3.0/tbl_properties_common.php on line 9

    when clicking "Browse" when viewing database/table
    when clicking "Select" when viewing database/table
    when clicking "fulltext, unique" on a table.
    when clicking "save" after alter column.
    .. and more probably

    ... I guess there's more places, but those are the ones I
    managed to find right now.

    Good luck hunting this one down.

     
1 2 3 > >> (Page 1 of 3)

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

Sign up for the SourceForge newsletter:





No, thanks