Code Comments
Programming Forum and web based access to our favorite programming groups.My hosting provider does not allow me to modify /etc/php.ini. So I can opt
to use function ini_set("include_path",....) to set include_path. But this
seems to work only on script level. Is there a better way to set
include_path globally. I mean any php script under DocumentRoot can see it.
Thanks a bunch!
Allen Guan
Post Follow-up to this messageAllen Guan wrote:
> My hosting provider does not allow me to modify /etc/php.ini. So I can
> opt to use function ini_set("include_path",....) to set include_path.
> But this seems to work only on script level. Is there a better way to
> set include_path globally. I mean any php script under DocumentRoot
> can see it.
Create an .htaccess file with the following, assuming your host allows
you to have .htaccess files:
php_value include_path ./:/path/to/1:/path/to/2:/path/to/3
--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Post Follow-up to this message"Chris Hope" <blackhole@electrictoolbox.com> wrote in message news:1104450389_78381@216.128.74.129... > Allen Guan wrote: > > > Create an .htaccess file with the following, assuming your host allows > you to have .htaccess files: > > php_value include_path ./:/path/to/1:/path/to/2:/path/to/3 > > -- > Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/ Thanks. I put this php_value in my local httpd.conf and it works fine. But when put it in the .htaccess file on the hosting site under documentroot, I got 500 error. If I leave .htaccess empty, no problem. So my hosting provide allows .htaccess but I don't know why I got 500 error. Allen
Post Follow-up to this messageAllen Guan wrote: > "Chris Hope" <blackhole@electrictoolbox.com> wrote in message > news:1104450389_78381@216.128.74.129... > > Thanks. I put this php_value in my local httpd.conf and it works fine. > But > when put it in the .htaccess file on the hosting site under > documentroot, I got 500 error. If I leave .htaccess empty, no problem. > So my hosting provide allows .htaccess but I don't know why I got 500 > error. When I tried it out earlier on today I was just trying in the httpd.conf so I thought I'd better try it now with .htaccess and it also worked. I'm using apache 1.3.31 and PHP 4.3.10 - what versions is your host using? You may need to check with your host to see what the problem is. -- Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.