问题
I just cloned a website from one server to another using cPanel import tool (probably this last part is not relevant)
The site is a Magento CE store.
The new server is a shared one, and only in this new Magento website I am having a 500 error:
tail /usr/local/apache/logs/error_log
Failed loading /usr/local/IonCube/ioncube_loader_lin_5.3.so: /usr/local/IonCube/ioncube_loader_lin_5.3.so: cannot open shared object file: No such file or directory
php -i|grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
cat /usr/local/lib/php.ini|grep IonCube
zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.4.so"
php -v
PHP 5.4.25 (cli) (built: Mar 4 2014 15:41:00)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd.
So it looks to me very confusing... the 500 error is thrown because it is failing to load ioncube 5.3 even when the php.ini has the 5.4 version and the correspondent file exists, but even more confusing is that php -v shows version 4.4 ...
Any help?
Thanks.
回答1:
With zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.4.so" you are telling PHP to install the Linux Loader for PHP 5.4. Your server is running PHP 5.4 so that matches.
The PHP output of "with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd." confirms that version 4.4.1 of the ionCube Loader is installed successfully.
The error you had indicates that a php.ini file is also requesting PHP to install the Loader for PHP 5.3, and this fails because the server is not running PHP 5.3.
回答2:
The system you migrated from uses a different version of PHP and you are using the wrong configuration file.
load up phpinfo and look for "Loaded Configuration File"
update your settings to use the config file mentioned by phpinfo.
I had a related issue with cron jobs for magento which gave me the same errors.
In my case PHP 5.6 > PHP 7
All the files were present, but what a mentioned above showed me the root of the error.
OLD COMMAND +
/usr/local/bin/php -c /usr/local/lib/php.ini /home/devlivingfresh/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/devlivingfresh/public_html/var/log/magento.cron.log
NEW COMMAND
/usr/local/bin/php -c /opt/cpanel/ea-php70/root/etc/php.ini /home/devlivingfresh/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/devlivingfresh/public_html/var/log/magento.cron.log
来源:https://stackoverflow.com/questions/22184935/failed-loading-usr-local-ioncube-ioncube-loader-lin-5-3-so