Hi There, We have apache(1.3.28) running php(4.3.3) with a vhosts.conf file
that is included into the apache http.conf. We have just moved to a new
server setup (upgrade) and have a strange intimittant(1 in 300ish) problem
with the 'php_admin_value open_basedir' config. This is the php error we get

(sometimes) when going to www.sitexxx.com/a_file.php :

Warning: Unknown(): open_basedir restriction in effect.
File(/mnt/raid/apache/htdocs/sitexxx.com/nominated.php)
is not within the allowed path(s):
(/usr/local/apache/htdocs/siteyyy.com/)
in Unknown on line 0

Warning: Unknown(/mnt/raid/apache/htdocs/sitexxx.com/nominated.php):
failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening
'/mnt/raid/apache/htdocs/sitexxx.com/nominated.php'

for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

Our new disk setup is as follows:
Raid disk mounted as /mnt/raid
Symbolic link from /mnt/raid/apache to /usr/local/apache

Our OLD disk setup was just
/usr/local/apache

I have checked the vhosts.conf file, and the sitexxx.com config does NOT
have the 'php_admin_value open_basedir' config, but the siteyy.com config
does.

Does anybody have any clue as to what is causing this?
Have i missed something out?

Here is a snippit out vhosts.conf for the siteyyy.com <VirtualHost>:

PHP is active

AddType application/x-httpd-php .php
php_admin_value sendmail_path
"/usr/sbin/sendmail -t -i -fwebmaster@siteyyy.com"

PHP is active and safe_mode, php_admin_value applied

php_admin_value safe_mode 1

php_admin_value open_basedir /usr/local/apache/htdocs/siteyyy.com/

Thanks

    Sorry to sound blunt but its almost impossible to tell you the problem when we cannot see any code.

      try to set the open base dir right..

      from:
      php_admin_value open_basedir /usr/local/apache/htdocs/siteyyy.com/

      to:
      php_admin_value open_basedir /mnt/raid/apachehtdocs/siteyyy.com/

      symbolic link is not always working right..

      i you still want to keep using a symbolic link i think the "hard" link works better then the "soft" ( so try to create a ln -h instead of ln -s )

        Originally posted by planetsim
        Sorry to sound blunt but its almost impossible to tell you the problem when we cannot see any code.

        No problem... but my problem is with the apache/php config rather than the php code itself. This is demonstrated by the fact that it is a intimitant problem with a few of our virtualhosts rather than just one host and one piece of code.

          Originally posted by Thatsmej
          try to set the open base dir right..



          OK - have done this... i'll let you know. I also went thru and set /mnt/raid/apache in the apache http.conf file as well for good measure.

          symbolic link is not always working right..

          i you still want to keep using a symbolic link i think the "hard" link works better then the "soft" ( so try to create a ln -h instead of ln -s )

          i couldnt make this work..:

          [root@host local]# ln -h /mnt/raid/apache apache2
          ln: invalid option -- h
          Try ln --help' for more information.
          [root@host local]# ln /mnt/raid/apache apache2
          ln:
          /mnt/raid/apache': hard link not allowed for directory

          Thanks for the support

            Write a Reply...