unexplainable open_basedir restriction

197 views Asked by At

I have a very weird problem with a normal php include when I execute my script in a browser. In the shell everything works fine. So I assumed that either it is a permissions issue or a php configuration issue but as it turned out this is not the case. The really weird thing is that the script ran just fine about an hour ago.

<?php
// sub/cron.php
error_reporting(E_ALL);
ini_set('display_errors', 1);

include '../config.php';
include '../facebook.php';
include '../ez_sql_core.php';
include '../ez_sql_mysql.php';
die();

The files to include lie in httpdocs, the cron.php in httpdocs/sub

  • open_basedir in php.ini is definitely set correctly (/srv/www/vhosts/xxxxx/httpdocs:/tmp)
  • I removed all other php code below the die(); I inserted to preclude any other php issues
  • file permissions are all set correctly
  • I tried absolute paths as well
  • I read tons of other threads!

Errors are the following:

Warning: include(): open_basedir restriction in effect. File() is not within the allowed path(s): (/srv/www/vhosts/xxxxx/httpdocs:/tmp) in /srv/www/vhosts/xxxxx/httpdocs/iblink/mobile/cron.php on line 9
Warning: include(): open_basedir restriction in effect. File() is not within the allowed path(s): (/srv/www/vhosts/j04/api.appworkx.de/httpdocs:/tmp) in /srv/www/vhosts/j04/api.appworkx.de/httpdocs/iblink/mobile/cron.php on line 10
Warning: include(): open_basedir restriction in effect. File() is not within the allowed path(s): (/srv/www/vhosts/j04/api.appworkx.de/httpdocs:/tmp) in /srv/www/vhosts/xxxxx/httpdocs/iblink/mobile/cron.php on line 11
Warning: include(): open_basedir restriction in effect. File() is not within the allowed path(s): (/srv/www/vhosts/xxxxx/httpdocs:/tmp) in /srv/www/vhosts/j04/api.appworkx.de/httpdocs/iblink/mobile/cron.php on line 12

Also strange is that File() is empty. Server admin is puzzled to.

Has anyone further ideas what could be the reason?

Many thanks in advance!

0

There are 0 answers