--enable-safe-mode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

--enable-safe-mode

Post by hawleyjr »

Im in the process of migrating to a new server. However, the new server is setup so with: '--enable-safe-mode'

I store my database connection and my classes below the document root. however, because of this setting I'm unable to get to the files and recieve a "open_basedir restriction in effect." error.

This is a dedicated server and I have access to the root. So I can change the PHP_INI file however, I was curious to know if this is a setting I should change...?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I don't remember if this works or not, but what about setting the include path to the outside document root path?
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

What do you mean by "outside document root path"?

I think thats what I'm trying to do...

My document root is:

/home/httpd/vhosts/example.com/httpdocs/

and I want to usethe following directory:

/home/httpd/vhosts/example.com/incfiles/
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

"outside the document root path" is the same as "below the document root"

Add the folder with your classes and stuff to the include path.
Post Reply