Warning: ini_set() has been disabled for security reasons in /var/www/vhosts/...

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 28, 2019   (RSS)

By CommonSenseDesign - February 28, 2019

I worked on a site more than a year ago, and I've just noticed that there is a long, repeated error message that appears at the top of every page: http://dordanmech.com/home.php. Basically, it says something like this:

Warning: ini_set() has been disabled for security reasons in /var/www/vhosts/dordanmech.com/httpdocs/cmsb/lib/init.php on line 39

I also get a 502 Bad Gateway message on the CMSB homepage: http://dordanmech.com/cmsb/admin.php

Does anyone know what might be causing this and how to fix it, please?

By Dave - February 28, 2019

Hi CommonSenseDesign, 

If the errors weren't there before it indicates that the host has modified the PHP settings to remove functionality.  

There are a few options:

  1. The website is running PHP 5.6 which needs to be updated, I'd switch to PHP 7.1 or better and see if the problem persists
  2. If you want to do the minimum you could add @ in front of each function listed on the line numbers indicated and it will hide those warnings.

If you need to fix it quick I'd do #2, but long term you're going to want to upgrade PHP (and maybe the host if they continue to have issues).

Hope that helps, let me know any questions.

Dave Edis - Senior Developer
interactivetools.com