WordPress.org

Support

Support » How-To and Troubleshooting » SAFE MODE Restriction in effect

SAFE MODE Restriction in effect

  • Rom

    @kristofferrom

    Hi everyone.

    When tryind to add a theme or plugin from the admin panel, I get this error:

    Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 1027728 is not allowed to access /tmp owned by uid 0 in URL/wordpress/wp-admin/includes/file.php on line 184
    Download failed. Could not create Temporary file

    Does anyone have any idea what I should do?

    – K

Viewing 2 replies - 1 through 2 (of 2 total)
  • contact your host and show them this error and what you are trying to do
    ask them to fix it or give a work around

    alejandro_1664

    @alejandro_1664

    You must change your virtual host configuration to provide access to the /tmp folder. This is done by manually adding a file into the “conf” directory located just next to the “httpdocs” folder containing your website. If you do not have access to the parent folder of the folder containing your website you cannot do it yourself.

    If you can access to the “conf” directory, create a file named vhost.conf and upload it into the “conf” folder. The file should follow this pattern (please note that the path is an example and must be replaced by the path of your website directory) :

    <Directory /var/www/vhosts/yourdomain/httpdocs>
    <IfModule sapi_apache2.c>
    php_admin_flag engine on
    php_admin_flag safe_mode off
    php_admin_value open_basedir “/var/www/vhosts/yourdomain.com/httpdocs:/tmp”
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_flag engine on
    php_admin_flag safe_mode off
    php_admin_value open_basedir “/var/www/vhosts/yourdomain.com/httpdocs:/tmp”
    </IfModule>
    </Directory>

    Then connect via ssh to your server and apply this configuration by typing (this example is the command line I use with plesk installed):

    /usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=yourdomain.com

    Please note that I use my own server with plesk installed on it.

    Hope this help …

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘SAFE MODE Restriction in effect’ is closed to new replies.