will work: but Warning: main(/inc/css-gateway.inc) [function.main]: failed to create stream: No such file or directory in /home/jpb/public_html/www/de/immobilien/main.php on line 15 Fatal error: main() [function.main]: Failed opening required '/inc/css-gateway.inc' (include_path='.:/usr/share/php') in /home/jpb/public_html/www/de/immobilien/main.php on line 15 this works as intended. Is there any way of declaring the server "/" and using absolute path? Paul [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => jpb [ip] => jpb@arcor.de [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> > will work: but > > [/quote] try [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <3F99181B.1070107@pricetrak.com> [ref] => [htmlstate] => on_nl2br [postusername] => Kevin Thorpe [ip] => kevin@pricetrak [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> >> will work: but >> >> [/quote] > > try > [/quote] Thank you It seems to work. Paul [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <3F99181B.1070107@pricetrak.com> [htmlstate] => on_nl2br [postusername] => jpb [ip] => jpb@arcor.de [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > will work: but > > > > > > Warning: main(/inc/css-gateway.inc) [function.main]: failed to create > stream: No such file or directory in > /home/jpb/public_html/www/de/immobilien/main.php on line 15 > > Fatal error: main() [function.main]: Failed opening required > '/inc/css-gateway.inc' (include_path='.:/usr/share/php') in > /home/jpb/public_html/www/de/immobilien/main.php on line 15 > > > this works as intended. > > > Is there any way of declaring the server "/" and using absolute path? > > Paul > > > >[/quote] Since SSI was designed to be used from inside Apache it takes the root of the system to be your webroot. PHP is not so limited it will always think your system root is / or C:\ on windows. I don't know of any way to change this action. -- John Downey [url]http://delusive.dyn.ee[/url] [url]http://sage.dev.box.sk[/url] [url]http://blacksun.box.sk[/url] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => John Downey [ip] => blah@doesntexis [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> >>> will work: but >>> >>> [/quote] >> >> try >> [/quote] > > Thank you > > It seems to work. > > Paul[/quote] Well that was a short lived " I finally got something working" On my Linux box: echo $_SERVER[DOCUMENT_ROOT] ->/home/jpb/public_html/www and it works; but on the server echo $_SERVER[DOCUMENT_ROOT] ->/usr/local/apache/htdocs the error log complain with the following [Fri Oct 24 10:38:07 2003] [error] PHP Warning: main(/usr/local/apache/htdocs/inc/css-gateway.inc): failed to open stream: No such file or directory in /mnt/home/www/canadian-dream.com/www/de/immobilien/main.php on line 15 [Fri Oct 24 10:38:07 2003] [error] PHP Warning: main(): Failed opening '/usr/local/apache/htdocs/inc/css-gateway.inc' for inclusion (include_path='.:/usr/local/lib/php') in /mnt/home/www/canadian-dream.com/www/de/immobilien/main.php on line 15 So I guess it's back to the old SSI. Paul [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <3F99181B.1070107@pricetrak.com> [htmlstate] => on_nl2br [postusername] => jpb [ip] => jpb@arcor.de [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Help with paths - PHP Development

Help with paths - PHP Development

I have been using SSI would like to start using php From what I have seen php does not support absolute paths like SSI eg <!--#include virtual="/inc/css-gateway.inc" --> will work: but <? include("/inc/css-gateway.inc") ?> Warning: main(/inc/css-gateway.inc) [function.main]: failed to create stream: No such file or directory in /home/jpb/public_html/www/de/immobilien/main.php on line 15 Fatal error: main() [function.main]: Failed opening required '/inc/css-gateway.inc' (include_path='.:/usr/share/php') in /home/jpb/public_html/www/de/immobilien/main.php on line 15 <? include("../../inc/css-gateway.inc") ?> this works as intended. Is there any way of declaring the server "/" and using absolute path? Paul...

  1. #1

    Default Help with paths

    I have been using SSI would like to start using php

    From what I have seen php does not support absolute paths like SSI
    eg
    <!--#include virtual="/inc/css-gateway.inc" -->
    will work: but

    <? include("/inc/css-gateway.inc") ?>



    Warning: main(/inc/css-gateway.inc) [function.main]: failed to create
    stream: No such file or directory in
    /home/jpb/public_html/www/de/immobilien/main.php on line 15

    Fatal error: main() [function.main]: Failed opening required
    '/inc/css-gateway.inc' (include_path='.:/usr/share/php') in
    /home/jpb/public_html/www/de/immobilien/main.php on line 15

    <? include("../../inc/css-gateway.inc") ?>
    this works as intended.


    Is there any way of declaring the server "/" and using absolute path?

    Paul




    jpb Guest

  2. #2

    Default Re: Help with paths

    jpb wrote:
    > I have been using SSI would like to start using php
    >
    > From what I have seen php does not support absolute paths like SSI
    > eg
    > <!--#include virtual="/inc/css-gateway.inc" -->
    > will work: but
    >
    > <? include("/inc/css-gateway.inc") ?>
    try
    <?php include("$_SERVER[DOENT_ROOT]/inc/css-gateway.inc"); ?>


    Kevin Thorpe Guest

  3. #3

    Default Re: Help with paths

    On Fri, 24 Oct 2003 13:16:27 +0100, Kevin Thorpe wrote:
    > jpb wrote:
    >> I have been using SSI would like to start using php
    >>
    >> From what I have seen php does not support absolute paths like SSI eg
    >> <!--#include virtual="/inc/css-gateway.inc" -->
    >> will work: but
    >>
    >> <? include("/inc/css-gateway.inc") ?>
    >
    > try
    > <?php include("$_SERVER[DOENT_ROOT]/inc/css-gateway.inc"); ?>
    Thank you

    It seems to work.

    Paul

    jpb Guest

  4. #4

    Default Re: Help with paths

    jpb wrote:
    > I have been using SSI would like to start using php
    >
    > From what I have seen php does not support absolute paths like SSI
    > eg
    > <!--#include virtual="/inc/css-gateway.inc" -->
    > will work: but
    >
    > <? include("/inc/css-gateway.inc") ?>
    >
    >
    >
    > Warning: main(/inc/css-gateway.inc) [function.main]: failed to create
    > stream: No such file or directory in
    > /home/jpb/public_html/www/de/immobilien/main.php on line 15
    >
    > Fatal error: main() [function.main]: Failed opening required
    > '/inc/css-gateway.inc' (include_path='.:/usr/share/php') in
    > /home/jpb/public_html/www/de/immobilien/main.php on line 15
    >
    > <? include("../../inc/css-gateway.inc") ?>
    > this works as intended.
    >
    >
    > Is there any way of declaring the server "/" and using absolute path?
    >
    > Paul
    >
    >
    >
    >
    Since SSI was designed to be used from inside Apache it takes the root
    of the system to be your webroot. PHP is not so limited it will always
    think your system root is / or C:\ on windows. I don't know of any way
    to change this action.

    --
    John Downey
    [url]http://delusive.dyn.ee[/url]
    [url]http://sage.dev.box.sk[/url]
    [url]http://blacksun.box.sk[/url]

    John Downey Guest

  5. #5

    Default Re: Help with paths

    On Fri, 24 Oct 2003 14:26:53 +0200, jpb wrote:
    > On Fri, 24 Oct 2003 13:16:27 +0100, Kevin Thorpe wrote:
    >
    >> jpb wrote:
    >>> I have been using SSI would like to start using php
    >>>
    >>> From what I have seen php does not support absolute paths like SSI eg
    >>> <!--#include virtual="/inc/css-gateway.inc" -->
    >>> will work: but
    >>>
    >>> <? include("/inc/css-gateway.inc") ?>
    >>
    >> try
    >> <?php include("$_SERVER[DOENT_ROOT]/inc/css-gateway.inc"); ?>
    >
    > Thank you
    >
    > It seems to work.
    >
    > Paul
    Well that was a short lived " I finally got something working"

    On my Linux box:
    echo $_SERVER[DOENT_ROOT] ->/home/jpb/public_html/www and it works;
    but on the server
    echo $_SERVER[DOENT_ROOT] ->/usr/local/apache/htdocs

    the error log complain with the following

    [Fri Oct 24 10:38:07 2003] [error] PHP Warning:
    main(/usr/local/apache/htdocs/inc/css-gateway.inc): failed to open stream:
    No such file or directory in
    /mnt/home/www/canadian-dream.com/www/de/immobilien/main.php on line 15

    [Fri Oct 24 10:38:07 2003] [error] PHP Warning: main(): Failed opening
    '/usr/local/apache/htdocs/inc/css-gateway.inc' for inclusion
    (include_path='.:/usr/local/lib/php') in
    /mnt/home/www/canadian-dream.com/www/de/immobilien/main.php on line 15


    So I guess it's back to the old SSI.

    Paul

    jpb Guest

Similar Threads

  1. Paths missmatch - Help please
    By Born2fly in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: November 24th, 08:24 PM
  2. How do I do this... re-paths
    By michael_affeld@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 7
    Last Post: June 4th, 01:20 PM
  3. Bringing paths into Photoshop from AI as PATHS
    By Mark_Behmer@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 2
    Last Post: April 9th, 09:09 PM
  4. Paths
    By Wayne Bourke in forum Macromedia Freehand
    Replies: 3
    Last Post: November 8th, 08:44 PM
  5. Replies: 1
    Last Post: July 10th, 03:58 PM

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
  •