How to set open_basedir parameter to none for all domains

Created:

2016-11-16 12:53:11 UTC

Modified:

2017-08-08 13:42:55 UTC

1

Was this article helpful?


Have more questions?

Submit a request

How to set open_basedir parameter to none for all domains

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Question

How to set open_basedir parameter to none for all domains?

Answer

  1. Create a list of domains:

    For Windows

    "%plesk_dir%\\mysql\\bin\\mysql.exe" -uadmin -p1qazXSW@ -P8306 psa -Ne"select name from domains"  > C:\\list.txt

    For Linux

    # mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Ne"select name from domains"  > list.txt
  2. Create a file, for example php.txt , with:

    open_basedir = none
  3. Run the following command to set open_basedir to none for all domains:

    For Windows

    for /f "skip=1 tokens=1" %a in (C:\\list.txt) do @"%plesk_cli%\\site.exe" --update-php-settings %a -settings C:\\php.txt

    For Linux

    # cat /root/list.txt | while read dom; do /usr/local/psa/bin/site --update-php-settings $dom -settings /root/php.txt;done

For all new domains set up open_basedir to none in Service Plans > plan_name > PHP Settings.

Have more questions? Submit a request
Please sign in to leave a comment.