#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    22
    Rep Power
    0
    I'm having a complete nightmare trying to get this to work - including files (e.g. with <?require( '/templates/front.php3');?> ) on my home, development machine.

    The problem seems to lie in the document_root - but however I change it in either httpd.conf or php3.ini, it never seems to work.

    I have Apache 1.3.9 running on my Win '98 machine and I have various virtual hosts running by adding e.g.

    <VirtualHost 127.0.0.3>
    DocumentRoot /usr/etc/htdocs/inframe
    </VirtualHost>

    to the httpd.conf file. Usually then, when I want to use a simple SSI tag as I have in the past, to include something (text.html) inside the "inframe" folder for example, I simply include "/text.html" to ensure it works from whichever directory I'm in.

    However, I'm now trying to learn PHP, and I can't seem to get this to work, with the leading slash. i.e., <?require( '/templates/front.php3');?> will not work, but <?require( 'templates/front.php3');?> will.

    At present in php3.ini, include_path = . and doc_root = [nothing] - although I have tried various other suggestions.

    If anyone knows what I need to do to get this to work - please let me know. It's really...really frustrating.

    Jake Gordon
    jakeg@lineone.net
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    By using the leading slash you are indicating that the path starts at root (I know you are in Win but that's how PHP interprets it) so in this case probably from C:
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    22
    Rep Power
    0
    Yes, but for most other things, such as IMG tags or SSI tags, the leading slash is indicating the document root to be c:/usr/etc/htdocs/inframe - and I know this is how the PHP tags should be working too...if I can only find out what line I need to change in php3.ini or httpd.conf or some other file.

    Jake
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Then set that path to the include path in php.ini, but you still must leave off the leading slash.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    22
    Rep Power
    0
    But with Devshed, looking at the source for the pages, shows the leading slash being used, as I wish to use it. For other things - such as SSI tags, a document root doesn't need to be set separately, and if I was to set the document root for one virtual server (which I can't do anyway with what I've tried) then I can only use one virtual server with PHP - not the dozen or so that I have to use.

    Jake

Similar Threads

  1. pure virtual function attempt
    By c0ldshadow in forum C Programming
    Replies: 2
    Last Post: January 5th, 2004, 10:59 AM
  2. Apache virtual servers won't resolve locally
    By 88guy in forum Apache Development
    Replies: 3
    Last Post: December 20th, 2003, 06:26 PM
  3. Logging for virtual servers
    By 88guy in forum Apache Development
    Replies: 3
    Last Post: November 30th, 2003, 11:54 AM
  4. Control Panel for Ventilo servers
    By concept in forum Project Help Wanted
    Replies: 1
    Last Post: November 25th, 2003, 11:33 PM
  5. virtual base class inheritance question
    By Rooster in forum C Programming
    Replies: 3
    Last Post: October 18th, 2003, 10:08 AM

IMN logo majestic logo threadwatch logo seochat tools logo