1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

Warning: file_exists(): open_basedir restriction in effect

Discussion in 'Plesk for Linux - 8.x and Older' started by 52chevy, Jun 20, 2005.

  1. 52chevy

    52chevy Guest

    0
     
    I am having troubles with open_basedir restrictions. Here is the error that I am getting:

    Warning: file_exists(): open_basedir restriction in effect. File(/data/www/dev.txt) is not within the allowed path(s): (/home/httpd/vhosts/domain_name_here/httpsdocs:/tmp) in /home/httpd/vhosts/domain_name_here/httpsdocs/include/constants.inc.php on line 20

    and here is the contents of the vhost.conf file which should allow what the above is attempting:

    <Directory /home/httpd/vhosts/domain_name_here/httpdocs>
    php_admin_value open_basedir "/home/:/data/"
    </Directory>
    <Directory /home/httpd/vhosts/domain_name_here/httpsdocs>
    php_admin_value open_basedir "/home/:/data/"
    </Directory>

    The files in the httpdocs folder work fine...there are the same files in the httpsdocs folder and it gives me the error. I have another server running Plesk 7.0.2 with an identical set up and this works. The server that I am having trouble with is running Plesk 7.5.1. Can anyone tell me the difference between these loads that would make this not work the way old server does? I am at my wits end. Please help!
     
  2. Whistler

    Whistler Guest

    0
     
    Looks like Apache isen't reading your vhost.conf settings. Have you reconfigured the apache with the websrvmng --vhost-name=<your_domain> after creating the vhost.conf file?

    Oh... on the other hand - you should put this:

    <Directory /home/httpd/vhosts/domain_name_here/httpsdocs>
    php_admin_value open_basedir "/home/:/data/"
    </Directory>

    seperately in a vhost_ssl.conf file. And reconfigure apache with websrvmng :)
     
  3. 52chevy

    52chevy Guest

    0
     
    I already have the vhost_ssl.conf file as you have stated (sorry for not including that). But have not reconfigured apache with websrvmng. Would that be found in the main httpd.conf file or the one for that domain? Thanks for the help.
     
  4. Whistler

    Whistler Guest

    0
     
    websrvmng is a util - found in <path_to_psa>/admin/bin/websrvmng

    So do a:
    websrvmng --vhost-name=<domain_to_change>

    and restart apache - then the changes should be in effect.

    Else you have to turn to the manual to see the explanation on using custom settings in Apache.
     
  5. 52chevy

    52chevy Guest

    0
     
    How can I tell if the websrvmng --vhost-name=<domain name> has taken effect? I have excecuted the command but see no results. Looks like I am going to the manual...thank you for your help.
     
  6. Whistler

    Whistler Guest

    0
     
    Look in the httpd.include and see if Plesk has written a Include for the vhost.conf and vhost_ssl.conf files.

    Or test and see if your problem has been solved :)
     
  7. 52chevy

    52chevy Guest

    0
     
    There always was a line lincluding the vhost_ssl.conf file for the secure config but it seemed to be ignoring the file. This morning I changed that line to point to the vhost.conf file. Not sure if it is correct but it is working. Thanks for all your help.
     
  8. Whistler

    Whistler Guest

    0
     
    Hmm... You have to remove the wrong settings from you vhost.conf and put it only in the vhost_ssl.conf - and it has to work if your paths is right and the vhost_ssl.conf include is in httpd.conf.

    You have to remember that httpd.conf will be overwritten sometime by Plesk and then it will stop working again.
     
  9. 52chevy

    52chevy Guest

    0
     
    There are no "wrong settings" in the vhost_ssl.conf file. The vhost.conf and vhost_ssl.conf files are identical. That is what it the confusing part about this whole thing!
     
Loading...