IonCube Loader Not Working
Previous  Top  Next

The ashoptest.php script will not run and there is an error message similar to the following.

/home/user/www/ashoptest.php requires the ionCube PHP Loader ioncube_loader_lin_5.1.so to be installed by the site administrator."

Check the ioncube directory permissions. They should be 777. If not, change the permissions and run ashoptest.php again and refresh the FTP browser. If running ashoptest.php does not get the correct loader, there is most likely a restriction imposed on server to server communications, which is preventing the download. If this is the case, manually upload the ioncube
loader and run ashoptest.php again.

If the correct ioncube loader is in the directory and the version matches the version of the operating system and PHP (as listed in the error message), the most common cause - and the most probable cause in this case - is that the extension_dir setting in php.ini is set to a directory that doesn't really exists, which breaks the run time loading of the IonCube loader.

The ashoptest.php script will automatically install the ioncube loader in the ioncube directory regardless of the php extension_dir setting, but run time loading and using the loader once it's there requires this setting to be an existing directory. It doesn't matter what directory it is set to, just that the directory exists. The dynamic loading of the ioncube loader searches through the filesystem for the correct ioncube loader with the PHP extension_dir as it's reference point. It should end up finding the one that is installed in the ioncube subdirectory of AShop, but can't find anything if extension_dir does not exist. The extension_dir doesn't matter if the ioncube loader is installed centrally through php.ini.