The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Loading extensions and php versions??

Discussion in 'General Discussion' started by mtech-hosting, Sep 19, 2007.

  1. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Can anyone explain to me why when i /usr/bin/php -v i get
    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions//usr/local/ioncube/ioncube_loader_lin_5.2_ts.so' - /usr/local/lib/php/extensions//usr/local/ioncube/ioncube_loader_lin_5.2_ts.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/xcache.so' - /usr/local/lib/php/extensions/xcache.so: undefined symbol: core_globals_id in Unknown on line 0
    PHP 5.2.4 (cgi-fcgi) (built: Sep 17 2007 18:20:05)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    But when i do /usr/local/bin/php -v i get:
    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions//usr/local/ioncube/ioncube_loader_lin_5.2_ts.so' - /usr/local/lib/php/extensions//usr/local/ioncube/ioncube_loader_lin_5.2_ts.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/phpshield/phpshield.5.2.lin' - /usr/local/lib/php/extensions/phpshield/phpshield.5.2.lin: undefined symbol: executor_globals in Unknown on line 0
    PHP 5.2.4 (cli) (built: Sep 17 2007 18:15:24) 
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
        with XCache v1.2.0, Copyright (c) 2005-2006, by mOo
    Im trying to load xcache, have compiled from source several times and even tried to disable Zend but i cant get the thing to load, it says its loaded for the cli but im not using cli according to the phpinfo im running cgi-fcgi...

    I put the info in the only php.ini available for php5 located at /usr/local/Zend and when run phpinfo() it wont show as xcache loaded. It looks like there are to different versions of php5 on my system, but, why is the php.ini, which says CGI-FCGI, not loading the module like the CLI php is doing?

    Thanks.
     
  2. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Your php.ini entries aren`t ok. And ioncube and php shield aren`t added right.
    You can see it`s prepending the path with : /usr/local/lib/php/extensions/ on the ioncube loader. Add it as a zend_extension_ts=/usr/local/ioncube/ioncube_loader_lin_5.2_ts.so at the end of the php.ini, and the ioncube issue will be solved.

    As for xcache, did you compile it for php 5.2 ?
     
  3. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    thats the problem, the system only wants to run the cgi-fcgi version but the modules loaded in the php.ini are only being read by the cli version?

    /usr/local/bin/php -v
    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/phpshield/phpshield.5.2.lin' - /usr/local/lib/php/extensions/phpshield/phpshield.5.2.lin: undefined symbol: executor_globals in Unknown on line 0
    PHP 5.2.4 (cli) (built: Sep 17 2007 18:15:24) 
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with XCache v1.2.0, Copyright (c) 2005-2006, by mOo
    Notice xcache is loaded but phpshield doesnt but there is no mention of xcache in the phpinfo BUT the phpshield is loaded just fine in the phpinfo as is the ioncube? phpinfo states its using the cgi-fcgi version. i have an app that requires both the ioncube and the phpshield loader and they both run fine regardless of what the output states

    /usr/bin/php -v

    Code:
    Failed loading ioncube_loader_lin_5.2_ts.so:  ioncube_loader_lin_5.2_ts.so: cannot open shared object file: No such file or directory
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/xcache.so' - /usr/local/lib/php/extensions/xcache.so: undefined symbol: core_globals_id in Unknown on line 0
    PHP 5.2.4 (cgi-fcgi) (built: Sep 17 2007 18:20:05)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    I have tried every possible combination of extension/ zend_extension, it does not matter, its always the same result.
     
  4. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    How did you compile PHP ? EA3 ?
     
    #4 bin_asc, Sep 19, 2007
    Last edited: Sep 19, 2007
  5. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    yes 2 versions, 1 cli, 1 cgi-fcgi
     
  6. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    yup, 2 times
     
  7. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    I`m clueless now ( late here too ), might give another try tomorrow. Night ;)
     
  8. echo419

    echo419 Member

    Joined:
    Oct 23, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Sometimes i get a problem with SELinux and ioncube while using php as a cgi. Try looking at /var/log/messages and seeing if there are any entries.
     
  9. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    SElinux is disabled for the server

    heres a couple lines from the error_log
    Code:
    [Wed Sep 19 18:28:22 2007] [error] [client xxx.xxx.xxx.xxx] Failed loading ioncube_loader_lin_5.2_ts.so:  ioncube_loader_lin_5.2_ts.so: cannot open shared object file: No such file or directory
    [Wed Sep 19 18:28:22 2007] [error] [client xxx.xxx.xxx.xxx] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/xcache.so' - /usr/local/lib/php/extensions/xcache.so: undefined symbol: core_globals_id in Unknown on line 0, 
    Now this output cant be trusted cause even though it says it cant load ioncube, it actually is loaded and is working.
     
    #9 mtech-hosting, Sep 19, 2007
    Last edited: Sep 19, 2007
  10. mtech-hosting

    mtech-hosting Well-Known Member

    Joined:
    Apr 30, 2006
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    I fix-teded it. First i upgraded to the latest fcurrent build (dont know if that has any effect, but its ggod to do) the rebuilt apache with ONLY php5.2.4. Copied the module path from the build and put that in the new php.ini, then moved all the extensions from the old directory and moved them to the new directory ( /usr/lib/php/extensions/no-debug-non-zts-20060613/ )

    then proceeded to configure php and suexec via whm chose cgi-fcgi and voila, extensions loaded :)

    Code:
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
        with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
        with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
        with Suhosin v0.9.20, Copyright (c) 2002-2006, by Hardened-PHP Project
        with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
    
    I suppose i could have also used php4 but its soon EOL anyways so just get rid of it altogether.

    Thanks all for the help, appreciate it
     
  11. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Yeah, I did the same with my php the same day EA3 was released on CURRENT. I couldn`t get it to run PHP 4 & 5 well toghether. The same module load issues. So I went PHP 4 only since all my customers use it still ... I may give it another try in a few weeks.
     
Loading...

Share This Page