Hello,
since i upgraded to php5 i've some problems with path
Expecially users using wordpress can't installing anymore.
I noticed that usually that's fixable changing the path from relative to absolute.
ex. /var/www/vhosts/domain.xx/httpdocs/file.inc instead of file.inc
In am wondering if this is a know issue or i need some configurations on php.
Thanks
php5 and path
-
- Forum User
- Posts: 37
- Joined: Wed Feb 09, 2005 6:27 pm
PHP 5 - Directory rights / can't access files, etc.
I am having the same problem and hence my adventure of upgrading or downgrading php.
Ok, so this is good. You are having problem with your Wordpress and the problem sounds similar to mine.
I think you will need to add the directory to your php.ini file under open_basedir
Now I don't know how to do it for an individual domain with 1and1/plesk because for some reason it won't pick it up if I put the php.ini in the root of the domain, etc. It just pulls from the /etc/php.ini only. I am not a php expert, but I think we are having the same problem. Apparently as Scott said, it's a lot more strict. My question is how can we overcome this problem.
Man is anything easy. Sheeze
Thanks
Ok, so this is good. You are having problem with your Wordpress and the problem sounds similar to mine.
I think you will need to add the directory to your php.ini file under open_basedir
Now I don't know how to do it for an individual domain with 1and1/plesk because for some reason it won't pick it up if I put the php.ini in the root of the domain, etc. It just pulls from the /etc/php.ini only. I am not a php expert, but I think we are having the same problem. Apparently as Scott said, it's a lot more strict. My question is how can we overcome this problem.
Man is anything easy. Sheeze
Thanks
-
- Forum User
- Posts: 37
- Joined: Wed Feb 09, 2005 6:27 pm
PHP5 - Plesk - How to fix rights related errors
Ok, you have Plesk 8.1 from the 1and1 image, or you have PHP 5.0 with plesk whatever version. You know for a fact certain files exist, but php can't find them. Or you get errors that are rights specific, doesn't matter if safe mode is on or off. Essentially, here is the problem (in my lame words). It has to do with OPEN_BASEDIR directive or whatever in PHP. See, Plesk defaults that to
Plesk needs to have the php settings handed to it for a specific domain from the vhost.conf file.
In Plesk each domain has virtual hosts configuration stored in a separate file:
/home/httpd/vhosts/<domain-name>/conf/httpd.include (or in 7.5.4 I think or definitely 8.1, it's "vhost.conf")
This file is overwritten each time the virtual host configuration is changed, thus any manual alterations made to the file are discarded. To use custom directives or redefine those inserted by Plesk , you need to create the files vhost.conf and/or vhost_ssl.conf with necessary directives in the directory /path_to_vhosts/<domain-name>/conf/ for a domain, and /path_to_vhosts/<domain-name>/subdomains/<subdomain-name>/conf/ for a subdomain.
If any of these files exist by the time the main configuration file is generated, Plesk inserts the appropriate Include directive into the HTTP and/or HTTPS virtual host context respectively.
For security reasons, only root can create the vhost.conf and vhost_ssl.conf files.
For the changes to take effect, you need to run the following:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<domain_name>
Here is the bottom line, you need to set your php.ini settings for the open_basedir in your vhost.conf file and make it specific to your domain. I cleaned up a lot of php errors.
Thank you Scott, you helped me crack the case with your comment about php5 being more strict. That put me on the right trail.
Anyway, I cleaned up a lot of bugs, and now I know how to make domain specific PHP settings.
Plesk needs to have the php settings handed to it for a specific domain from the vhost.conf file.
In Plesk each domain has virtual hosts configuration stored in a separate file:
/home/httpd/vhosts/<domain-name>/conf/httpd.include (or in 7.5.4 I think or definitely 8.1, it's "vhost.conf")
This file is overwritten each time the virtual host configuration is changed, thus any manual alterations made to the file are discarded. To use custom directives or redefine those inserted by Plesk , you need to create the files vhost.conf and/or vhost_ssl.conf with necessary directives in the directory /path_to_vhosts/<domain-name>/conf/ for a domain, and /path_to_vhosts/<domain-name>/subdomains/<subdomain-name>/conf/ for a subdomain.
If any of these files exist by the time the main configuration file is generated, Plesk inserts the appropriate Include directive into the HTTP and/or HTTPS virtual host context respectively.
For security reasons, only root can create the vhost.conf and vhost_ssl.conf files.
For the changes to take effect, you need to run the following:
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<domain_name>
Here is the bottom line, you need to set your php.ini settings for the open_basedir in your vhost.conf file and make it specific to your domain. I cleaned up a lot of php errors.
Thank you Scott, you helped me crack the case with your comment about php5 being more strict. That put me on the right trail.
Anyway, I cleaned up a lot of bugs, and now I know how to make domain specific PHP settings.
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
Don't confuse httpd.include and vhost.conf. httpd.include is created by Plesk and you shouldn't touch that file (Plesk will overwrite it). You can create a vhost.conf file to set domain specific settings.
See this knowledge base article for more info on changing the open_basedir path for a domain.
See this knowledge base article for more info on changing the open_basedir path for a domain.
Lemonbit Internet Dedicated Server Management