skip to Main Content

I can’t upload images in Drupal 7 since I have moved it to a new server: php safe mode was on. So in php.ini I set safe_mode = Off (through ssh, I have CentOS).

phpinfo() shows that safe_mode is off for master, but on local. I do have a Plesk panel, so I checked there: safe_mode was enabled for the domain. I disabled it.

My problem: safe_mode is still turned on locally according to phpinfo(). What other ways do you know to turn off safe_mode? What can be wrong?

Thanks in advance.

2

Answers


  1. Check your httpd.conf and vhost files for…

    php_admin_flag safe_mode on
    

    This flag overrides the setting in your php.ini file. Change it to…

    php_admin_flag safe_mode off
    

    …and restart apache.

    EDIT:
    Also check the /etc/httpd/conf.d/zz_psa_httpd.conf for that directive.

    Login or Signup to reply.
  2. What you need to do first is to edit the main php.ini that overrides all php.ini in domains.

    Go to

    /etc/php.ini
    

    and set safe_mode off.

    Then restart your web server. You may now set safe_mode on to certain domains using their own php.ini.

    Hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search