Drupal Error - Warning: ini_set() has been disabled for security reasons

Your Drupal powered website may start showing following error message:

Warning: ini_set() has been disabled for security reasons

Cause of error message

Your hosting provider has disabled PHP function ini_set() on server.
This is generally done to increase server security. Some server security expert highly recommend to disable ini_set() on server

Solution

Solution one:
Contact your hosting provider and ask them to enable ini_set() on the server.

Solution two:

  1. Create a blank php.ini file in public_html folder
  2. Add following code
  3. disabled_funcions =

    If above code do not work try following code:

    extension=pdo.so
    extension=pdo_mysql.so

    If above code also do not work try this code:

    disabled_funcions =
    extension=pdo.so
    extension=pdo_mysql.so
Category: