require_once, include not finding files
Posted by: natty (---.insight.res.rr.com)
Date: December 04, 2007 03:14AM

Just installed WAMP2 and copied my proj "Test" into www directory. My first file gave this error below.

1. I have checked the forum and have installed PEAR accordingly
2. updated the include_path in the php.ini as indicated in the error msg below.
3. localhost, phpmysqladmin, mysqllite all works ok

Just can't find the fix for error below

Warning: require_once(/Test/include/header.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\Test\store\shopfront.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '/Test/include/header.php' (include_path='.;c:/wamp;c:/wamp/bin/php/php5.2.5/pear') in C:\wamp\www\Test\store\shopfront.php on line 2

Thanks for any and all help

Options: ReplyQuote
Re: require_once, include not finding files
Posted by: rip_pit (---.w90-5.abo.wanadoo.fr)
Date: December 04, 2007 04:51PM

1. Look in the logs to see what happens.
Wamp icon > Left click > Apache >
- Look in Apache access.log
- Look in Apache error.log

2. Try turning On the "allow url include" option in PHP configuration menu
Wamp icon > Left click > PHP >Configuration PHP >
Turn on : Allow url include

---------------------------------------------
XP SP3 - pIV - 3.2Ghz - 1.5Go de ram - Wamp 2.0

Options: ReplyQuote
Re: require_once, include not finding files
Posted by: natty (---.insight.res.rr.com)
Date: December 04, 2007 11:58PM

Resolved. I just added the www directory to the include_path and removed the first "/" that was in the file path given to the require_once function......thanks for your feedback

Options: ReplyQuote


Sorry, only registered users may post in this forum.