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.

Ioncube for cpanel for PHP 5.3

Discussion in 'General Discussion' started by Miksun, May 8, 2012.

  1. Miksun

    Miksun Registered

    Joined:
    May 8, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have the ioncube loader working for my webserver however it does not work correctly for a cpanel plugin. Not working correctly meaning it loads the module for PHP 5.2, however it needs the module for PHP 5.3 to be loaded.

    The main configuration file for apache is set to /usr/local/lib/php.ini
    In that file I set the ioncube loader as follows:
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.3.so"

    The output of php -v gives me:
    PHP 5.3.6 (cli) (built: Jan 11 2012 11:56:13)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.


    However cpanel is setup to use a differenct php.ini file. It is loading the file /usr/local/cpanel/3rdparty/etc/php.ini
    In that file the ioncube loader is set as:
    extension_dir = "/var/cpanel/3rdparty//lib/php/extensions/no-debug-non-zts-20060613"
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"

    This seems to load the ioncube loader correctly which I can confirm with phpinfo. However the cpanel plugin I am using requires the loader ioncube_loader_lin_5.3.so
    Simply changing the 5.2 in the ini file does not work as the loader does not get loaded at all. So how do I get cpanel to load the loader for php version 5.3?


    I have tried using the script: /scripts/phpextensionmgr install IonCubeLoader
    But this only seems to affect the settings in /usr/local/lib/php.ini which is working correctly.

    I have also tried disabling the ioncube loader in WHM->Tweak Settings->PHP. This removes the loader from /usr/local/cpanel/3rdparty/etc/php.ini, however when I reenable it again it adds and installs the file ioncube_loader_lin_5.2.so.

    So is there any other way to get it to use the file ioncube_loader_lin_5.2.so?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  3. Miksun

    Miksun Registered

    Joined:
    May 8, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for the reply. I guess I can not use any PHP 5.3 code in the plugin until the internal PHP version has been updated.
     
  4. dcrouch

    dcrouch Active Member
    PartnerNOC

    Joined:
    Oct 11, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    I know it's 5 months late. Perhaps I'm missing something, but while internals may involve /usr/local/cpanel/3rdparty/etc/php.ini

    php -i | grep -i config

    showed that /usr/local/lib/php.ini was the loaded php.ini file

    After adding zend_extension="/usr/local/ioncube_loader_lin_5.3.so" to /usr/local/lib/php.ini

    I was getting 500 errors. I then made sure it was the first zend_extenstion, and I no longer received errors.

    No restart of apache was required.

    *****
    The reason I bumped this thread was it was the first return in my google search
    *****
     
    #4 dcrouch, Oct 19, 2012
    Last edited: Oct 19, 2012
Loading...

Share This Page