SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict lveale's Avatar
    Join Date
    Jun 2001
    Location
    Dublin
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php.ini include_path setting

    Help needed urgently!!

    I'm trying to set the include_path setting in php.ini I've tried setting it to
    [list=1]
    c:\inetpub\wwwroot\includes\
    c:\inetpub\wwwroot\includes
    \inetpub\wwwroot\includes
    \inetpub\wwwroot\includes\[/list=1]

    My understanding is that when I use

    include("filename.php")


    PHP automatically looks in the directory I specify for filename.php. Is this correct?

    I'm getting the following error:
    Warning: Failed opening 'header.php' for inclusion (include_path='c:\inetpub\wwwroot\includes\;') in C:\Inetpub\wwwroot\main\business.php on line 2

    Any ideas or tips?

    ta
    Last edited by lveale; Sep 25, 2001 at 23:22.

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First, place a ":" (colon) between each of the paths -
    as the delimiting token, to seperate the paths. Actually, hold on, it must be another character for dos systems because the ":" is used in the path. Right, I've just looked at the documentation in php.ini and it says to use a semi-colon (";").

    Secondly, as far as I can tell, the string needs to be all on one line. I would love to know if there is a way that you can signify that the next line continues the last in the php.ini file. However, I have tried a couple of the common ways of doing this and they did not work (whitespace at begining of next line, or a "/" at the end of the previous line). No luck there.

    Third wrap the string in quotes.

    include_path = "c:\path;c:\another\path"

  3. #3
    SitePoint Addict lveale's Avatar
    Join Date
    Jun 2001
    Location
    Dublin
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    freakysid, soory for not being clearer. I have followed the documentation but still no joy.

    Here's the line in question from php.ini:

    include_path = ".;c:inetpub\wwwroot\includes"


    Tried aload of variations for the second path, but no joy

    ps also a bum in sydney
    Last edited by lveale; Sep 25, 2001 at 23:51.

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Yeppoon, Australia
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know it says to put \'s in windows, but try using /'s in the directory path and see what happens, I am using mine this way cause it didn't seem to work the other way:

    c:/inetpub/wwwroot/includes
    Knowledge is knowing that a tomatoe is a fruit; wisdom is not putting it in a fruit salad.

  5. #5
    SitePoint Addict lveale's Avatar
    Join Date
    Jun 2001
    Location
    Dublin
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    c:/inetpub/wwwroot/includes
    still no joy.I'm going barmey!!!

  6. #6
    SitePoint Addict lveale's Avatar
    Join Date
    Jun 2001
    Location
    Dublin
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorted with the "/".
    I had left out one of the paths so it didn't work.

  7. #7
    SitePoint Zealot
    Join Date
    Jun 2000
    Location
    Yeppoon, Australia
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excellent, ain't it always the simplest things
    Knowledge is knowing that a tomatoe is a fruit; wisdom is not putting it in a fruit salad.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •