Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include not working

Status
Not open for further replies.

georgeocrawford

Technical User
Aug 12, 2002
111
GB
Hi,

I've just downloaded a php class from phpclasses.org. When I open up the 'test.php' file the author has supplied, I get this error:

Code:
Warning: Failed opening '/Library/WebServer/Documents/arraytoimage-2002-01-02/test.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

I don't understand this, because the 'include' function works great for the scripts I've written myself.

The include file is in the same directory as 'test.php' (and I've learnt that the '.' in the include_path setting means it searches in the same directory first), so I don't know why it can't find it.

I have installed php 4.2.3 on Mac OS X with a package which didn't give me a php.ini file. Is this a problem???

Thanks for any help ______________________

George
 
I am having the same issue and also added the 'include_path="."'. Anyone know the cause of this problem?

Gary
gwinn7
A+, N+, I+
 
I gave up in the end - decided I could do without the classes! ______________________

George
 
Ouch! Too bad you gave up.

Anyhow, I think I may have some more insight into the problem. Part of this issue seems to have to do with a rights restriction on the folder and files that included file has. When I tinkered with this a bit, the immediate problem went away, but I still got a subsequent inclusion related error.

I will publish what my solution was as soon as I know.

Gary
gwinn7
A+, N+, I+



 

Thanks Gary - there's hope yet.... ______________________

George
 
Ok, I found what the problem was.

It was what I originally suspected. Its user rights to that folder and the respective files. If these aren't configured properly, you will have problems with the include, specifically.

Take care, I hope this eliminates someone else's grief.

Gary
gwinn7
A+, N+, I+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top