I'm trying to get some software to work that my client recently purchased however it requires a PHP module/extension called ionCube. The setup instructions for this software are basic so far, but from step one I have been faced with this that I simply cannot find on Google, in their tech forums, or support area. They have some information, but no solutions work without access to php.ini.

First, the error:

Site error: the file /home/mysite/public_html/invite/inc/classes/setupclass.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.

Obviously the module "ioncube_loader_lin_5.2.so" is not installed. I interpret this to be ionCube for Linux using PHP 5.2.x. The server is indeed running Linux (x86, matching the file from their downloads section), with PHP 5.2.5 installed.

Next, I try installing the module dynamically using a script they have produced which includes a bunch of .so files. I am supposed to run "ioncube-loader-helper.php" in order to install but it generates this error, which according to support is caused by 5.2.5 as opposed to 5.2.3.

Warning: dl() [function.dl]: Temporary module name should contain only filename in /home/mysite/public_html/invite/ioncube/ioncube-loader-helper.php on line 411

Next, I looked for different ways to edit the php.ini as many suggest the host may give access to your own php.ini inside [user]/php.ini via FTP. This does not exist, nor does it exist in the etc/ directory or any other inside the root for that matter. I do not mean in public_html either, fyi.

So I searched for the DL() function and apparently it is deprecated.

Note: As of PHP 5, the dl() function is deprecated in every SAPI except CLI. Use Extension Loading Directives method instead.

Extension Loading Directives appears to be the PHP.ini method where I could use the original method

zend_extension = /<path>/ioncube_loader_lin_5.2.so

I do not have access to php.ini. What am I supposed to do now?

    Have you tried using an .htaccess file to set the zend_extension variable?

    Whether you can do this or not will depend on whether your host allows them and how they have apache set up.

    Also I have never tried loading a module through an .htaccess file but I have used it to update php.ini values for a specific site on shared hosting plenty of times.

    These may give more details

    http://uk3.php.net/manual/en/configuration.changes.php

    http://www.4webhelp.net/tutorials/php/config_override.php

    Hope this helps

      Thanks for the reply, I tried both of these with a few different syntaxes to see if I could turn anything up. I got a few internal server errors but thats about it.

      I read about the htaccess file as that seems the most likely solution but it seems that is only for changing constants, not for loading modules. There may be some other command to use in the htaccess though, i tried php_value and another but neither worked.

        yeah, did a bit more digging about after writing that post and it does look like the httpd.conf is the only place you can load modules

        I think your best bet is to send an email to your hosting provider asking them if they can install the module for you. I would guess that their willingness to accomodate you will depend on the type of package you have with them.

        For what its worth, I remember trying to install ioncube under similar circumstances a few years ago. I remember that being a pain in the butt then as well! 😉 I think in the end we contacted our hosting provider and they agreed to do it because the only sites that would be affected were sites developed and maintained by the company I was working for. If it had been on hosting that we shared with other customers of theirs then I doubt they would have been so helpful

        Sorry I can't offer anything more useful, but if I get any sudden moments of clarity then I'll post back here

          Write a Reply...