WordPress.org

Ready to get started?Download WordPress

Forums

SAFE MODE Restriction in effect (3 posts)

  1. Rom
    Member
    Posted 4 years ago #

    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

  2. Samuel B
    moderator
    Posted 4 years ago #

    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

  3. alejandro_1664
    Member
    Posted 3 years ago #

    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 ...

Topic Closed

This topic has been closed to new replies.

About this Topic