Jump to content


Photo

lifting the base_dir for ~user directories


  • Please log in to reply
2 replies to this topic

#1 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 03 August 2006 - 03:56 PM

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?

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 03 August 2006 - 08:59 PM

bump

#3 scottybwoy

scottybwoy
  • Members
  • PipPipPip
  • Advanced Member
  • 532 posts
  • LocationUK

Posted 04 August 2006 - 09:21 AM

What he means is use the php.ini settings to include the path, you can do it in the script like so :

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

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

<?php phpinfo(); ?>

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users