p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: include_path


Message #1 by "Josh" <jeb_braun@i...> on Thu, 18 Apr 2002 01:15:08
Hi,
I recently downloaded a script off the web and when I tried running it I 
got errors saying something like it couldn't locate some file in the 
c:\php4\pear directory. But the thing is my php is in c:\php\ so I figured 
it was the script untill just now when I was looking at that php info 
thingy and it said the include_path was c:\php4\pear. So how do I set it 
so it says its in the c:\php\pear directory?
Message #2 by "Elior Ashkenazi" <krembo2002@h...> on Thu, 18 Apr 2002 06:12:16
> Hi,
I>  recently downloaded a script off the web and when I tried running it I 
g> ot errors saying something like it couldn't locate some file in the 
c> :\php4\pear directory. But the thing is my php is in c:\php\ so I 
figured 
i> t was the script untill just now when I was looking at that php info 
t> hingy and it said the include_path was c:\php4\pear. So how do I set it 
s> o it says its in the c:\php\pear directory?

mmm..
I think that You can change this form php.ini

Elior.
Message #3 by "Josh" <jeb_braun@i...> on Thu, 18 Apr 2002 06:22:00
> mmm..
I>  think that You can change this form php.ini

> Elior.

When I looked through php.ini I didn't see anything to do 
with "include_path". Mybe I'll look again tho.
Message #4 by "Elior Ashkenazi" <krembo2002@h...> on Thu, 18 Apr 2002 07:40:59
> > mmm..
I> >  think that You can change this form php.ini

> > Elior.

> When I looked through php.ini I didn't see anything to do 
w> ith "include_path". Mybe I'll look again tho.

O.K.

At my computer (Win XP, Apache.)
the path is c:\apache\php\
I don't know what the problem in your computer but You always can try to 
change the path in the script :)

Elior.
Message #5 by "Gellings, C.O." <gellingsco@p...> on Thu, 18 Apr 2002 16:55:13 +0200
I know the problem, encountered it myself(!)
You need to refer to the file by it's root path. If for example you have it
in C:\php\include and your working dir is C:\php\work than you should set
your include command as follows: include("../php/include/[file.ext]"); if it
is a subdir from your work dir you can make a relative referal:
include("./include/[file.ext]");
Hope this helps ...............

Grrrrrrrrr,

Carl

> -----Original Message-----
> From: Elior Ashkenazi [mailto:krembo2002@h...]
> Sent: 18 April 2002 06:12
> To: beginning php
> Subject: [beginning_php] Re: include_path
>
>
> > Hi,
> I>  recently downloaded a script off the web and when I tried
> running it I
> g> ot errors saying something like it couldn't locate some file in the
> c> :\php4\pear directory. But the thing is my php is in c:\php\ so I
> figured
> i> t was the script untill just now when I was looking at that php info
> t> hingy and it said the include_path was c:\php4\pear. So how do
> I set it
> s> o it says its in the c:\php\pear directory?
>
> mmm..
> I think that You can change this form php.ini
>
> Elior.

Message #6 by "Josh" <jeb_braun@i...> on Thu, 18 Apr 2002 16:40:09
Well I don't know if the script I download is the problem because when I 
look at my php info by using
<?php
phpinfo() ;
?>
then it says the include_path is c:\php4\pear but it should be c:\php\pear 
and when I looked through my php.ini file I couldn't see that anwhere(if 
someone nows what line in the file it is that would help). And Carl I 
didn't quite get what you where saying, could you explan again. Thanks

  Return to Index