ISPConfig + open_basedir restriction in effect
I've been trying to solve this problem for about 2 hours and I don't think I'll understand how to do it on my own.
I've built this debian system following one of the ISPConfig guides here on howtoforge and I've been using it for other stuff for one month or so, but never hosted a site on this server so far.
I've tried installing Drupal and Wordpress, but with both I'm getting the same error. (open_basedir)
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/clients/client1/web3/wp-config.php) is not within the allowed path(s):
in /var/www/clients/client1/web3/web/wp-load.php on line 32
I've uploaded all the files into /var/www/clients/client1/web3/web/
Could somebody please give me some input? what's wrong?
Please post the output of:
ls -la /var/www/clients/client1/web3/web/
here it is:
Thats ok so far, wordpress is just not fully installed yet. The next step to install wordpress are:
1) Make a copy of the file wp-config-sample.php and name it wp-config.php
2) Edit the file wp-config.php and change the database login details inside so that they match the database name, user and password of your database.
Then open the wordpress installer in the webbrowser and follow the instructions in the installer.
As a sidenote: Ensure that you use the correct PHP method. For CMS systems you should use "PHP-FCGI" and the suexec checkbox must be enabled.
thank you till ;)
the weird thing is that, if you don't have a wp-config.php file, it is usually created during the installation process, instead this is throwing that error in the page where the installation begins.
Sure the method you mentioned would make it work in a fingersnap, but I'm more interested in getting the server configured as it should rather than in a quick fix.
The website has suexec enabled and php set to fastcgi
If I understand correctly I should do one of the following:
- disable open_basedir (how? can it be done from within ISPConfig?)
- properly configure open_basedir paths in order for it not to throw the error
no clue how to do it, the current settings are:
website options: /var/www/clients/client1/web3/web:/var/www/clients/client1/web3/tmp:/var/www/impiantivideosorveglianza.net/web:/srv/www/impiantivideosorveglianza.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
server config: [website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
The problem is misbehaviour in wordpress and not a wrong setting in ispconfig. If wordpress does not find its config file, it tries to traverse the path downwards and tries to find the file wp-config.php in other locations. So wordpress tries to open folders that it is not allowed too because they are outside of its web directory and this triggers the open_basedir.
You can disable open_baesdir of course by simply setting / as open_basdir path, but thst quite insecure as it allows all your website users to read the mysql passwords and other data of other websites.
I have the same issue! I have ISPConfig Version: 184.108.40.206
and I have this error:
Warning: Unknown: open_basedir restriction in effect. File(/var/www/clients/client1/web32/web/index.html) is not within the allowed path(s): (/usr/share/php:/usr/lib/roundcube:/etc/roundcube:/usr/share/roundcube:/var/lib/roundcube:/var/log/roundcube) in Unknown on line 0 Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/xxxxxx.xxx/web/index.html' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
In /etc/apache2/sites-available/website.com.vhost I dont have the open_basedir!
If I add it then the roundcube dosn't work anymore!!!
[Tue Jan 28 13:16:40 2014] [error] [client xx.xx.xx.xx] PHP Warning: is_file(): open_basedir restriction in effect. File(/var/lib/roundcube/config/main.inc.php) is not within the allowed path(s): (/var/www/clients/client1/web21/web:/var/www/clients/client1/web21/tmp:/var/www/xxxxx.xxx/web:/srv/www/xxxxxxxx.xxx/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/roundcube:/usr/share/php) in /usr/share/roundcube/program/include/rcube_config.php on line 137
Can some one help me please!?
you must have modified the open_basedir settings in the website or the glovbl setting in ispconfig, as all website paths are mising that ispconfig adds by default.
to fix this for this site, add:
at the end of the open_basedir field of the website. and do not odify any vhost or php config files of the site manually, this will just break your setup!
Thank you till for your replay!
Can you please tell me where to add the:
Because in ispconfig/website/option at the PHP open_basedir, I already have that!
Can you please tell me where the open_basedir is set? I can't find it and some websites dost work!
If I dont need to change the vhost manually then where to edit?
Please help me!
|All times are GMT +2. The time now is 22:05.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.