Saturday, March 1, 2014

How to Fix PHP Fatal error after installing Zend or ionCube Loader


1. First, make sure that this is only listed once in the output
grep 'zend_extension.*ioncube' /etc/php.ini /etc/php.d/*
2. Even with it only returning one result, this can still be broken.So now what you need to do is to fix the loading order in php.ini
3. First, get rid of the file that had the line originally. In this example I just move the file in case you ever need it again, but you can also delete it if you prefer.Code:
mv /etc/php.d/ioncube.ini ~
4. Now edit php.iniCode:
nano -w /usr/local/Zend/etc/php.ini
5. Edit the end of the file - the [ZEND] section - to look like the following (assuming you have both Zend Optimizer and ionCube installed)if it does not look like this, change it to be so using correct file paths and versions.[Zend]
zend_extension=/usr/lib/php/ioncube/ioncube_loader_lin_5.2.so
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
zend_optimizer.version=3.3.0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
6. Restart ApacheCode:
/sbin/service httpd restart
7. Verify output by using the php CLI from an SSH prompt.Code:
php -vYou should see output that is similar to matching the following textPHP 5.2.3 (cli) (built: Jun 7 2007 08:59:02)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with the ionCube PHP Loader v3.1.31, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies

No comments:

Post a Comment