Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warning: open_basedir restriction in effect. File is in wrong director 1

Status
Not open for further replies.

Elliott3

Programmer
Joined
Sep 5, 2002
Messages
347
Location
CA
I cannot seem to figure out what the problem is here other than I am restricted. This is the error:
Warning: open_basedir restriction in effect. File is in wrong director...

What i do know is that safe_mode is OFF, but open_basedir IS set. The line that causes the error is:

include_once($this->PluginDir . "class.smtp.php");

This line runs fine on my local machine which also has safe_mode OFF but it does NOT have the open_basedir set. It is only when I run it on the server that I have the problem.

I have a temporary, but dirty fix. I just copied the class.smtp.php file into the top of its calling script(where the include_once() is located) and then comment out the include_once() line. Of course, this runs fine.

Any ideas as to how to fix the problem?

CES
 
I recommend that you edit the class.phpmail.php file.

$PluginDir is set to "" by default -- which forces PHP to use include paths to find the necessary files. This won't work with open_basedir set -- which is why you're getting the error.

Set $PluginDir to the absolute file path to you includes directory.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Ya, I noticed that $PluginDir was set to "". What would the absolute path be if open_basedir = /home/httpd/vhosts/jasonoffer.com/httpdocs and the class files are under /Craig/research/Include/classFiles.php?

CES
 
It works! Thank you times 10!

You need to use the whole open_basedir path and append your directory to the end of that path.

CES

Thanks again for all your help!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top