Jump to content

lifting the base_dir for ~user directories


michaellunsford

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?
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.