Error: Warning: ini_set has been disabled for security reasons

If you received "Warning: ini_set() has been disabled for security reasons" during script install (for example, Drupal) or after successful installation, please follow these steps:

1. Login to your domain via regular or secure FTP (FTP over TLS/SSL - Auth TLS Explicit highly recommended)

2. Create blank file named php.ini

3. Edit php.ini file then add following lines (please copy and paste each line separately - 5 lines in total): 

extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, allow_url_fopen, ini_alter, proc_terminate, proc_get_status, proc_nice, escapeshell, eshellarg, escapeshellcmd, dl, symlink

4. Save file

5. Set php.ini permissions to 600. It will lock configuration file. You may set 600 permissions via File Manager - right click on php.ini file then select "Change Permissions" > 600. 

I received new error right after php.ini creation: Fatal error: Class 'PDO' not found

Please make sure that you complete steps #3, #4 and #5 above. PDO has to be loaded directly into your own php.ini file (see #3).

I received many "time zone" errors

Add following line into same php.ini file: 

date.timezone = "Australia/Brisbane"

Please note that Joomla requires two php.ini files - one in public_html folder (or where you installed script) and the other one in administrator folder.

 

Please note: it's impossible to override default php.ini file on shared servers. You may receive 500 error, "forbidden" or "blank page". It means that you have to add your domain name to server "white-list". Please contact support.jnshost.com with domain name and error received (paste it in the ticket). Thank you!

  • Email, SSL
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Fatal error: Class 'PDO' not found

My website is showing "Fatal error: Class 'PDO' not found" Please edit php.ini file....

Fatal error: Incompatible file format

Issue: when you visit website, it shows similar error: "Fatal error: Incompatible file format:...

ionCube PHP Loader error on website after PHP upgrade (from php 5.3.x to php 5.4.x)

Issue: When you access website via web browser, it produces similar error: "Site error: the...

It is not safe to rely on the system's timezone settings (how to fix it)

Occasionally, you may receive following warning on main page (especially, Joomla): Warning:...

Moodle "Unicode format UTF-8" error during manual installation or upgrade

You may receive following error during new Moodle manual installation or upgrade: It is required...

Powered by WHMCompleteSolution