Do you find that the PHP functions
ini_set() and set_
include_path() are not working on your server? Did they stop working after you switched your PHP handler mode to DSO or something? Here is a possible cause and solution to this pesky problem.
Many developers use the PHP functions
ini_set (to set execution time limit, for instance), and set_
include_path (e.g. to extend WordPress classes as I do with my plugins for auto-update facility). If these functions don’t work, many web applications simply cannot run. I faced this issue when I switched my PHP handler to DSO mode on my server – the functions just stopped working.
After a lot of web research, I realized that it was because of
homeloader.so, which adds the home directory to the path, thereby making it possible to load your own version of PEAR libraries. Unfortunately, it kills the afore-mentioned functions.
The solution to the problem was simpler than I expected (at least on my VPS). Here are the steps.
- Logon to your WHM as root.
- Navigate to Home → Software → Module Installers.
- Click on the Manage link next to PHP Extensions and Applications Package.
- Find the Magic User Loader near the top of the page and disable it.
If you cannot find the magic loader setting, you are out of luck. You may try contacting your hosting provider support team. When I did that, they had no idea what was going on. They wrote test scripts, trying to prove that these functions did work. To be fair, this was first tier support of InMotion, and I am very happy with them, in general. In this case, their first tier didn’t have the right expertise to solve it. In fact, my web research didn’t give me a complete solution either, just a pointer to
homeloader.so. Hence this post, in the hope that it will be useful to anyone faced with the same problem.