Jump to content

Problem with include_path


Recommended Posts

Hi
I have a problem with the include_path setting in php.
In my php.ini file my include_path is set to "c:\php\pear".
When i do a phpinfo() the master value of include_path is "c:\php\pear", but my local value is just "."
When i run a script it picks up the "." and not "c:\php\pear".
What am I doing wrong??

Thanks
Link to comment
Share on other sites

What do you meen you local value is "." ? Do you meen your setting it within a script?

if you want to set the include_path from within a sscript and still maintain the origianl path you need to concatinate the two together. Something like...

[code]
<?php
  set_include_path(get_include_path() . ":.");
?>
[/code]

PS: I would NOT recommend setting your path to include ".", this has the potential to cause security implications.

If Im way off here, you'll need to explain what your trying to do (and what is happening) in more detail.
Link to comment
Share on other sites

No, what I meen is when you look at phpinfo() there are two values for every setting, a local value and master value.
Now, I have set my include_path in my php.ini file to "c:\php\pear", but in my phpinfo() on the local value it still says just "." and i didint specify "." anywhere.
But on the master value in phpinfo() it says "c:\php\pear"
But when I run any script without the set_include_path() it only picks up the "." and not the "c:\php\pear" in the php.ini

So somewhere something is not right???
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.