ioncube error

Discussion in 'Installation/Configuration' started by Poliman, Jun 8, 2018.

  1. Poliman

    Poliman Member

    I have moved website from old to new server. I turned on php-fpm 5.6.30 for this website. After enter website I have:
    Code:
    Site error: the file /var/www/clients/client39/web103/web/library/CMS/Application/Resource/Config.php requires the ionCube PHP Loader ioncube_loader_lin_5.6.so to be installed by the site administrator.
    
    I installed the ioncube using this tutorial https://www.howtoforge.com/tutorial/how-to-install-ioncube-loader/ but copied version of the file required for older php -> ioncube_loader_lin_5.6.so.
    After this I did:
    Code:
    service apache2 restart
    service php-5.6.30-fpm restart
    
    In "Web Domain" --> Options I added the line:
    Code:
    zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_5.6.so
    
    Still nothing.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The guide tells you to add that line as first line in php.ini and not under options in ISPConfig.
     
  3. Poliman

    Poliman Member

    Ok, thank you. I have additional php version under /opt/php-5.6.30. There is lib/php.ini file. I added this line just under PHP. Now it works. Could you tell me why (or maybe some hypothesis) when I turn on php-fpm for this website - it works - but for php-fcgi I see error 500?
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    There should be php.ini for all fpm, cgi, cli etc. I think you should add to cgi too. I normally add it to all.
     
  5. Poliman

    Poliman Member

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There is just one php.ini for both modes in that case. Check the error.log of the website to see what the cause of the 500 error is.
     
  7. Poliman

    Poliman Member

    Where can I find it?

    PS
    in /var/log/apache2/error.log I have:
    Code:
    Failed loading /usr/lib/php/20151012/ioncube_loader_lin_5.6.so:  /usr/lib/php/20151012/ioncube_loader_lin_5.6.so:                                 undefined symbol: zval_update_constant_inline_change
     
    Last edited: Jun 8, 2018
  8. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Firstly, what I said is based on Ondrej Sury php, inline with step 4.2 (in adding ioncube), so ignore it if you compiled your own php 5.6 instead.

    Secondly, how you add ioncube to your own compiled php matters. You must copy it to your compiled folders, so try to understand step 2.1 (in compiling php) and copy 5.6 ioncube to /opt/php-5.6.30/lib/php/extensions/no-debug-non-zts-20131226/.

    Then zend extension that you added to your only php.ini for php 5.6 should also use zend_extension=/opt/php-5.6.30/lib/php/extensions/no-debug-non-zts-20131226/ioncube_loader_lin_5.6.so.

    Remember different php version has different date code and 20151012 is for php 7.0, not php 5.6.
     
    Last edited: Jun 20, 2018
  9. Poliman

    Poliman Member

    Thank you for answer and advice. ;)
    Ok, so I did wrong, because I put ioncube_loader_lin_5.6.so inside /usr/lib/php/20151012/, which is directory for php7.0. But I am curious how it works if adding ioncube_loader_lin_5.6.so file to php7.0 directory works for additional php-5.6 (I chose in website settings own php-5.6)? Of course I am going to fix this but still curious how it works. :)
     
    Last edited: Jun 14, 2018
  10. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Try not to confuse yourself between installed php (default or Ondrej Sury version) and self-compiled php as they work differently and use different path.

    If you are not sure, create and view your php info page to determine its extension_dir before extracting and copying its ioncube file or other extension file.

    I think the most obvious is by default each php version will look into its own extension directory and setting any extension outside that will cause problems, sooner or later.
     
  11. Poliman

    Poliman Member

    Thank you @ahrasis. I moved ioncube to proper directory like I said earlier. ;) This php-5.6 is from compiled source. Of course default php is: Loaded Configuration File: /etc/php/7.0/cli/php.ini
    and additional is:
    /opt/php-5.6.30/lib/php.ini
    but somehow ioncube added to php7 directory worked when website used php5.6. Hmm, at the moment it does not matter. Of course I don't want a mess in my php versions. ;)
     

Share This Page