I’m an avid WordPress user (every site I start up and run, and many of my clients’ sites as well) and when installing a new Plugin this morning I ran into a little problem. After about an hour of fiddling around on various FAQs and forum topics, I was able to deduce a solution. And rather than dust myself off and walk away, I’m posting this so that others might have an easier time than I did.
Now, first a little bit more detail might be necessary. The exact error I ran into was this:
Site error: the file (filename) requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.
(If anyone cares, this happened when installing a Plugin called WP-Member to a blog I run called Frontending. More on the relevancy of adding in that Plugin before long :).)
Nobody likes errors. When I saw this I did what any able minded person of the modern world would do. I Google’d it. Odds are that you might have discovered this very post by running a search like I did.
Walking through the solution
It should be said, although the post title says so, that this solution is only likely to work when you are hosted by Bluehost. As I am, this is how I figured it out.
So what is ionCube? Apparently it’s a PHP encoder of some sort, that certain applications use in order to run. In my research I was able to see a couple of examples, one where a Joomla plugin was the culprit, in other cases a WordPress Plugin called Fedafi. Basically the host is only set up with the basics of ionCube, and we need to supplement it.
Open up your site in an FTP client and browse to the topmost level. This is the level that lists public_html as a folder. You should see a folder called ioncube. Crack that sucker open and you should see two files (at least), ioncube_loader_lin_ts.so and ioncube_loader_lin.so. You probably won’t see the ioncube_loader_lin_5.2.so file mentioned in the error message. That makes sense, right?
Run over to the ionCube site and grab the appropriate zip full of the loader you need. Now, in order to determine which of the files you should download, you’ll need to know your server’s OS and architecture. You can find this located in your Bluehost Cpanel along the left sidebar. Mine is running on Linux (OS) and x86_64 (architecture). Find your own and grab the corresponding zip file from the ionCube loaders page.
Unzip and throw the two files with 5.2 at the end into your site’s ioncube folder, the one we identified a minute ago. Now we should be good, right? Well, almost.
Odds are that you’ve heard of php.ini at one point or another, most likely when editing it (or at times creating it) in order to increase the size of files you can upload to your site. Before stepping into this dunghole of a problem myself, I had only ever modified php.ini in order to do that. Now, it’s time for a bit more of an understanding of how php.ini works in cooperation with Bluehost’s Cpanel.
In your Bluehost Cpanel, jump into PHP Config. I usually just run a find/text search on the page to see where it’s located. You should see three options, like in the image below:
You can see that, in my case, I’m now running PHP5 with FastCGI. There is a lot having to do with this decision that I won’t cover here, but one reason related to the issue at hand is that we want to be able to only have to deal with one instance of php.ini, and not copy it ourselves into every directory that will be using it. That would just be a pain in the ass. (Note that choosing FastCGI is not necessary for this to work, but it makes it a bit less painful, I think.)
Assuming that you don’t have any major modifications done to your php.ini file, go ahead and hit the “Install php.ini Master File” button, after selecting IonCube from the options above it. Keep in mind that if you do have any worthwhile modifications done to php.ini, you can just copy them and paste them into your new php.ini file when it’s there.
Take a look into your public_html folder. There should now be a php.ini.default file. Kill the file ending so it is just php.ini. Now download it and open it up so that we can make the modification we need to.
Toward the bottom of your php.ini file you should see the references to the basic ionCube loaders. It should look something like this:
At line 118 and 119, we see the references to the two files that were originally in use at our site. But we want to add two more, two references to the two 5.2 files that we added.
The key here is to maintain the nomenclature of line 118, but duplicate it for the two new files. So we’re going to add two lines that look like this: zend_extension=/home/sitename/ioncube/filename. We’re also going to add them directly after the [Zend] at line 1123.
Use this image as a reference:
Once you have those two lines (in the above, the lines added to 1124 and 1125) in your php.ini file, save that puppy.
Given a minute or two for your cache to clear (force a reload if necessary) you should be good to go with whatever problem you’re facing. In my case, I was immediately able to successfully activate WP-Member. So I’m a happy camper.
It should be mentioned that I found a good deal of help with this issue at these following sites.
- The FAQ page I started with regarding this error, at WP-Member’s support site
- This thread at the Bluehost forums with a couple of people trying to figure this problem out
I appreciate their help, and only put this together so that there is one consistent tutorial on the issue. Hope it helps someone!