DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

PHP5, include_path & php.ini

By: | 18 Feb 2009 4:25 pm


Hello,

I`m running PHP5 on a shared-hosting server. - PHP Version 5.2.1

Each of us can edit / control our own php.ini file...

Basically, I want to add this to my php.ini fle :-

include_path=".;/home/users/web/b2516/USERNAME/usr/functions" (which
is the correct directory - replacing USERNAME of course)....

However, Whenever I run a php script to display the path variables -
They all show :-

`/usr/local/bin:/usr/bin:/bin`
I`ve tried using a : instead of ; in the include_path commanbd - Same
result....
Q1 - Is my include_path line correct ?

Q2 - Can there be a `system" command restricting the use of include_path ??
PS...

in my phpinfo() command - the top "CORE" area, it DOES show this in
the LOCAL and MASTER values :-

include_path .;/home/users/web/b2516/pow.gorst/usr/functions -
.;/home/users/web/b2516/pow.gorst/usr/functions

Doesn`t it matter if my php scripts do not register the path when I
show the system/other variables ???

Comments



Hi Gordon,

I don`t know your server config so I am only guessing here.

It`s pretty rear that a HTTP directory and a /bin/ path exist on the same drive
even in a shared
server environment.

So SYMLINKS (Symbolic links) are often used on the server side.

The absolute path that you mention is unlikely to work as there is likely to be
a sym link along
that path somewhere judging by the directory names.

Servers will usually have a separate sym link to the bin directory from the
root directory like
binUSERNAME.

Try the php function realpath() to resolve the sym links and then try that.

If that doesn`t help the search your hosting providers support pages for path
information.

Hope this helps.
By: | 18 Feb 2009

"Q2 - Can there be a `system" command restricting the use of include_path ??`

Not so much a `System command" but more that folder attributes.

An include path is only accessible with the attributes OWNER - read.

On older setups you need GROUP - read.

By: | 18 Feb 2009

Thanks...

That gave me another name / directory - THOUGH, as my host uses multi-servers for sites - it may not be useful.. (If 1 server crashes, the sites feed off the other servers )....

I`ll ask the forum for my hosting....
> If that doesn`t help the search your hosting providers support pages for path
information.

Yes, tried that - & posted a message to the forum 3 days ago, - Its been read by people but no ones answering...

I`ll add a note with the above information....

Thanks.......

By: | 18 Feb 2009

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move