View Full Version : php browser return error

05-09-2011, 02:08 AM
I get the following errors when a browser tries to display a simple php page.

"Warning: require_once(Connections/test1.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\t5.php on line 1"

"Fatal error: require_once() [function.require]: Failed opening required 'Connections/test1.php' (include_path='.;C:\php\pear') in C:\wamp\www\t5.php on line 1"

I'm using DWCS3, publishing to WAMPserver and I've had no problems in the past making use mySQL and php for simple dynamic sites through pro hosting services, but his is the first time I've ever set up my own server. I can see from the 1st error that it's looking for a file in a "Connections" directory that doesn't exists at my site root, but I can't figure out how to resolve this correctly. For the second error, I'm not sure what "(include_path='.;C:\php\pear')" is referring to. There is no such directory at that path. Maybe that's the point... I'm guessing that's the current set path, but it shouldn't be . Again, I'm not sure how to remedy this. What do I edit and what's the logic behind it?

Any help/guidance is greatly needed and appreciated. Thanks.

05-09-2011, 03:44 AM
iti is saying the file is not where it is expected Connections/test1.php

and this file wamp\www\t5.php is looking for a file. are you using pear framework?

05-09-2011, 04:53 AM
After trying to figure out what the default "include_path" should be on the version of WAMPserver and trying to edit the php.ini to reflect it I found it had nothing to with editing and config file. It was an insanely easy answer... just add a empty directory named "Connections" to C:\wamp\www. The thing is, it only works for new php pages i publish, not the old. DW codes the page differently with that directory present.

The whole second error is a red herring for reasons I'm too tired to elaborate on at this hour.

Thanks for taking the time to reply.