ini_set disabled and causes errors on Drupal site - How to fix

For security reasons ini_set has been disabled on the server.  Some Drupal sites will see errors as a result.

The fix is easy and you can accomplish these steps using the File Manager in your cPanel control panel.

Some of the errors are:

Warning: ini_set() has been disabled for security reasons in drupal_environment_initialize() (line 702 of /home/hemaid/public_html/includes/bootstrap.inc).
Warning: ini_set() has been disabled for security reasons in drupal_environment_initialize() (line 705 of /home/hemaid/public_html/includes/bootstrap.inc).
Warning: ini_set() has been disabled for security reasons in drupal_environment_initialize() (line 706 of /home/hemaid/public_html/includes/bootstrap.inc).

This error is caused by ini_set being disabled by the root. To solve this error follow as below:

Create a “php.ini” file in your public_html directory and add the following:

disabled_funcions =
extension=pdo.so 
extension=pdo_mysql.so

Open .htaccess and add the folowing:

suPHP_ConfigPath /home/username/public_html

Use the username of the cpanel account as username.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Migrating your Drupal site to your new web hosting account

Here are the detailed steps how to successfully move a complete Drupal installation from one...

Using Drupal before DNS changes

Replace the Domain with the Temporary URL First, you must understand that Drupal uses your...

Drupal security steps

This article will explain in detail the steps that are recommended to secure your Drupal website.