Enable ini_set using custom php.ini
Thulo.Com
1 Year Ago
If you’re on shared hosting using cPanel as the control panel, you’d probably has the same problem as mine. The ini_set function is disabled by the hosting company for security purposes. Yeah, I know it’s for security purposes, but if I have to use it, I have to use it.
So I’ve learned from others on how to enable it.
Go to your public_html directory.
Create an empty php.ini and place the following line into it, without the ini_set.
(Note: Best practice is to copy the line from your host server’s /usr/local/lib/php.ini and remove the function you want to enable)
disable_functions = allow_url_fopen, escapeshellarg, escapeshellcmd, ini_alter, popen, show_source
Open or create your .htaccess at public_html level and enter the following line.
suPHP_ConfigPath /home/%user%/public_html/
(Replace %user% with your account name)
That’s it.
Comments
Please Log In to leave a comment.