Closed Thread Icon

Preserved Topic: Dumb PHP configuration question. (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=20981" title="Pages that link to Preserved Topic: Dumb PHP configuration question. (Page 1 of 1)" rel="nofollow" >Preserved Topic: Dumb PHP configuration question. <span class="small">(Page 1 of 1)</span>\

 
jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 06-11-2001 23:38

Can additional paths be added to the PHP include path and if so what's the syntax? I wanna know if I can ask my sysadmin to do this because I don't have write access to the existing include path, but I have a library that I want to use in many of my scripts. I could just ask him to install the library, but it's not really debugged yet and I may need to add to it. thanks in advance.

-jiblet

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-12-2001 00:16

In PHP3, you set the include_path variable in php.ini (location varies by platform). And it is set like any path variable. Dunno about PHP4, but I bet it's the same.

Libraries rock. When you write them yourself that is.

Why is it a big deal? Are you trying to use auto_prepend_file or auto_append_file? You still have to include the library explicitly, all the path gets you is the ability to shorten the argument you give to include() or require().

timothymcnulty
Neurotic (0) Inmate
Newly admitted
posted posted 06-12-2001 08:48

I am pretty sure you can set multiple values in the include_path for php 3 and 4...i belive you set it similar to this (in php.ini):

UNIX: "/path1:/path2"
Windows: "\path1;\path2"

If you are writing code that is to be included or required, don't you think that you should have write access to the include_path directory?

~Age doesn't always bring wisdom. Sometimes age comes alone.~

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-12-2001 18:38

I just don't see a huge win with
include("bozolib.inc");
versus
include("/home/linear/lib/bozolib.inc");
in most cases. If you screw up the include path, bad stuff can happen. If I was your hosting provider, I'd tell you to get bent. If I was a nice hosting provider i'd consider your request, but only if you had a really good reason, like using auto_prepend_file in a large site, or using PHPlib (where other users might reasonably want it). Your own libraries belong beneath your $HOME.

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 06-13-2001 16:56

Heh, well, u are right. The thing is I don't have a hosting provider. I have my own personal linux server with my own personal tech guy running it. N E Wayz, it was a silly thing to want, there's only maybe 10-20 pages where this will be included.

-jiblet

« BackwardsOnwards »

Show Forum Drop Down Menu