Jump to content

Archived

This topic is now archived and is closed to further replies.

michaellunsford

lifting the base_dir for ~user directories

Recommended Posts

I'm having some difficulty getting require_once to work for web ~users. Right now, I am trying to require_once "/usr/share/pear/pear.php" -- but it's giving me an open_basedir restriction.

Problem. open_basedir is being properly configured in vhost.conf. It works great for anything else on the entire website, but not for ~web_users -- which apparently have a different conf file I would need to create. The script author suggested that I could "include" the pear directory, instead of lifting the base_dir. Honestly, I'm not quite sure what he's talking about.

Any suggestions?

Share this post


Link to post
Share on other sites
What he means is use the php.ini settings to include the path, you can do it in the script like so :

[code]
ini_set( 'include_path', '/whatever/path/you/like' . ini_get('include_path'));
[/code]

And php will look in these directories to execute files.  Also check :

[code]
<?php phpinfo(); ?>
[/code]

To see your set includes path, which can be edited directly in the ini file.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.