Install Moodle with open_basedir
Posted: Fri Feb 05, 2021 6:35 am
Hello all,
I have moved from vestacp (CentOS 7) to myvestacp. I am working on an education portal development with Moodle with the new MyVestCP environment.
For Moodle 3.10, it is required to have settings like
php_admin_value open_basedir /home/admin/web/example.com:/home/admin/web/example.com/public_html:/home/admin/web/example.com/moodledata:/home/admin/tmp
The above is being put in the example.com.conf and example.com.ssl.conf under /home/admin/conf/web/. Also, I have installed the libapache2-mod-php.
After the path settings, I have restarted the services of apache2 and php7.3-fpm.
It is still showing me the errors as:
Warning: file_exists(): open_basedir restriction in effect. File(home/admin/web/example.com/moodledata) is not within the allowed path(s):
(/home/admin/web/example.com/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roubecube) in /home/admin/web/example.com/public_html.install.php on line 329
Warning: file_exists(): open_basedir restriction in effect. File(home/admin/web/example.com) is not within the allowed path(s):
(/home/admin/web/example.com/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roubecube) in /home/admin/web/example.com/public_html.install.php on line 333
Also, I have checked all files named php.ini and found nothing being set as all being commented "#open_basedir=".
./etc/php/7.3/fpm/php.ini
./etc/php/7.3/cli/php.ini
./etc/php/7.3/cgi/php.ini
./etc/php/7.3/apache2/php.ini
./usr/local/vesta/src/deb/for-download/php/php.ini
./usr/local/vesta/src/rpm/conf/php.ini
./usr/local/vesta/php/lib/php.ini
Actually, I have done similar steps in the vestcp with CentOS 7 before.
Should anyone has any clues, please kindly share.
Thanks
AM
I have moved from vestacp (CentOS 7) to myvestacp. I am working on an education portal development with Moodle with the new MyVestCP environment.
For Moodle 3.10, it is required to have settings like
php_admin_value open_basedir /home/admin/web/example.com:/home/admin/web/example.com/public_html:/home/admin/web/example.com/moodledata:/home/admin/tmp
The above is being put in the example.com.conf and example.com.ssl.conf under /home/admin/conf/web/. Also, I have installed the libapache2-mod-php.
After the path settings, I have restarted the services of apache2 and php7.3-fpm.
It is still showing me the errors as:
Warning: file_exists(): open_basedir restriction in effect. File(home/admin/web/example.com/moodledata) is not within the allowed path(s):
(/home/admin/web/example.com/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roubecube) in /home/admin/web/example.com/public_html.install.php on line 329
Warning: file_exists(): open_basedir restriction in effect. File(home/admin/web/example.com) is not within the allowed path(s):
(/home/admin/web/example.com/public_html:/home/admin/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/log/roundcube:/var/lib/roubecube) in /home/admin/web/example.com/public_html.install.php on line 333
Also, I have checked all files named php.ini and found nothing being set as all being commented "#open_basedir=".
./etc/php/7.3/fpm/php.ini
./etc/php/7.3/cli/php.ini
./etc/php/7.3/cgi/php.ini
./etc/php/7.3/apache2/php.ini
./usr/local/vesta/src/deb/for-download/php/php.ini
./usr/local/vesta/src/rpm/conf/php.ini
./usr/local/vesta/php/lib/php.ini
Actually, I have done similar steps in the vestcp with CentOS 7 before.
Should anyone has any clues, please kindly share.
Thanks
AM