• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

php include path

D

DamijanM

Guest
I have this strange error I cannot find a solution to. I would be really thankful for any insight.

I have created a subdomain in Plesk (8.6, CentOS 5.3 32bit, dedicated box). The php script fails on simple include.

The trick is that this same script runs fine on main domain. The script tries to include a php script from PEAR package. The path to pear is included in php.ini.

I have tried:
1) added open_basedir to vhost.conf in main domain and subdomain (http://kb.odin.com/en/432). I have tried both adding the pear directory and subdomain dir to open_basedir or setting open_basedir to none (running websrvmng and restarting apache, of course)
2) tried including the file with absolute path
3) tride running ini_set('include_path', ini_get('include_path')); before include (I read it helps sometimes)
4) checked that safe mode is off (both in plesk and vhost.conf, just in case)
5) checked permissions and experimented a little bit (but read-only for apache should be enough in any case)

I always receive the same error (3 lines):
[Thu Jun 03 22:22:06 2010] [error] [client X.X.X.X] PHP Warning: require(SOAP/Client.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /var/www/vhosts/mydomain.com/subdomains/alfa/httpdocs/test.php on line 3
[Thu Jun 03 22:22:06 2010] [error] [client X.X.X.X] PHP Warning: require(SOAP/Client.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /var/www/vhosts/mydomain.com/subdomains/alfa/httpdocs/test.php on line 3
[Thu Jun 03 22:22:06 2010] [error] [client X.X.X.X] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'SOAP/Client.php' (include_path='.:/home/pear') in /var/www/vhosts/mydomain.com/subdomains/alfa/httpdocs/test.php on line 3

I have a special version of PEAR in home dir but it really doesn't matter - it could have been official /usr/local/lib/php or whatever. The same script runs perfectly on the main domain.

I have tried setting subdomain in plesk as different user or as the same user - the result is the same: big fail. Are subdomains running differently in apache? Are there some restrictions I am not aware of?

Apache is 2.2.3, PHP is 5.2.13. No selinux running (fully disabled). Safe mode disabled for the domain.
 
I apologize to all for the mess. After a good night sleep, I immediately solved this problem.

I had named a file vhosts.conf instead of vhost.conf. Ridiculous of me. I should have went to bed earlier.
 
Back
Top