1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Turning Off PHP Safe_Mode

Discussion in 'Plesk for Linux - 8.x and Older' started by starving_artist, Apr 1, 2006.

  1. starving_artist

    starving_artist Guest

    How to turn off PHP Safe Mode in Plesk for Dummies.

    This is a compilation of the information that I have found on these forums that helped me figure this out. Hope this helps some lost newbie, like me. What you need to type is in “â€


    1. You need to access the server at it’s root, since plesk a program that runs on your server and it doesn’t have permissions to everything on your server. I lot of people tell you to use PuTTy, but I find that SSH in Plesk works fine for this.


    2. In plesk goto: >> virtuozzo >> SSH >> enter your login/pass for root access. (A separate window will pop up with a dos like prompt)

    Must be logged in as root, and under the root directory.

    Next type this and enter: “cd /var/www/vhosts/domain.com/conf “

    (your path might be different, if it is type “locate domain.com/conf†and it will tell you the path)

    Next type this and enter: “touch vhost.confâ€

    Next type this and enter: “chmod 777 vhost.confâ€

    Next type this and enter: “exit†(don’t know if you have to exit here or not to refresh or something?)

    So, I guess all that creates the file vhost.conf and gives it permissions so that you can edit it.


    3. to edit a file u have to use an editor ... vi or pico (I don’t know what pico is, I used vi) ... so do the following in ssh:

    “vi /var/www/vhosts/domain.com/conf/vhost.confâ€

    this opens up a “text editor†(it just turns the screen black) - press “i†for insert and then type the following:

    “<Directory /var/www/vhosts/domain.com/httpdocs>
    php_admin_value safe_mode Off

    you can press enter after each line since your in a text editor now

    after that press "ESC"

    and after that type "!!"

    a new line under the editor pops up like this:


    Backspace so there is only a colon “:â€

    now type "wq" and press enter

    All this put the code above into the file that we created earlier


    4. now we need to let the “server†know about that change so it will read that file we created

    type this with out any prefix “/usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=domain_nameâ€

    type “exitâ€

    now restart your server in plesk goto: server >>reboot

    and now safe mode should be turned off and you should all set!