Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

how to set include_path in PHP?
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



Report this thread to moderator Post Follow-up to this message
Old Post
Allen Guan
12-31-04 01:55 AM


Re: how to set include_path in PHP?
Allen 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/

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Hope
12-31-04 01:55 AM


Re: how to set include_path in PHP?
"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



Report this thread to moderator Post Follow-up to this message
Old Post
Allen Guan
12-31-04 08:56 AM


Re: how to set include_path in PHP?
Allen 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/

Report this thread to moderator Post Follow-up to this message
Old Post
Chris Hope
12-31-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Language archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:02 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.