SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2004
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting UNIX include_path

    Guys,

    I am working through the PHP Athology, but I always get these include_path errors. Can someone tell me how to set my include_path ?

    I put all folders from the book in www/w/whatever/htdocs/wfc/...

    My php.ini says

    include_path = ".:/php/includes"

    Can someone tell me how it should be to be working properly ?

    Many thanks,
    Michel

  2. #2
    SitePoint Columnist
    Join Date
    Nov 2003
    Location
    Ohio
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use an htaccess file using php_value such as below for an include path specific to one virtual host:

    php_value include_path ".:/home/domains/domain.com/docs/include"
    php_value auto_prepend_file connect.php

    You can change the path and file names to match your requirements.

    The .htaccess file goes in the root of the site.
    Freelance System Administrator, Researcher, Writer
    Practical Applications
    Open Sourcery "SitePoint's Open Source Blog"

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2004
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bwarenne,

    thanks foryour fast answer. I will try it out, but I would like to understand it in the php.ini version. I get the following error:

    Fatal error: main(): Failed opening required 'DateTime/DateMath.php' (include_path='.:/php/includes:/wfc/SPLIB') in /www/w/whatever/htdocs/wfc/DateTime/14.php on line 3

    I added the path /wfc/SPLIB to the include path. That is where the files are.

    Do you know this version too ?

    W

  4. #4
    SitePoint Evangelist
    Join Date
    May 2004
    Location
    Germany
    Posts
    550
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try using the full path: /www/w/whatever/htdocs/wfc/SPLIB

    Edit: And don't forget to restart apache, took me 1 hour to find that not restarting was the problem

  5. #5
    SitePoint Columnist
    Join Date
    Nov 2003
    Location
    Ohio
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Daimaju is correct - you can input the absolute path in php.ini
    Freelance System Administrator, Researcher, Writer
    Practical Applications
    Open Sourcery "SitePoint's Open Source Blog"

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to a more appropriate forum

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  7. #7
    SitePoint Evangelist
    Join Date
    Jun 2004
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, the full path makes it work.
    Sorry Sean for the misplacement of the topic.

    Webnology


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
  •