+2  A: 

It can't find the file getPhotos.php in the folders c:\wamp\myPhotosWebsite\ or c:\php5\pear

adam
+2  A: 
  • does the getPhotos.php exist?
  • where is it?
  • is it written exactly like that?
tharkun
A: 

Your required file is not in the directory of the main script nor int the configured include dirs.

Csaba Kétszeri
A: 

Looks rather weird. It does look weird because the error message says it can't open file "1", but not file "getPhotoes.php". It makes me think that string 'getPhotoes.php' is a part of arithmetic expression.

I suggest trying

  • replace single quotes with double quotes
  • remove space after closing bracket in require_once call.

Should look like this:

<?php require_once("getPhotos.php"); ?>

Another wild guess is that there is another require_once call in the file (or in another file that is required by require_once) which has an arithmetic expression in its argument.

Max Kosyakov
there is nothing weird about that, and none of your suggestion is relevant.
SilentGhost
It's better to use single quotes the double quotes in general.
Bart S.
text in double quotes gets parsed by php - text in single quotes does not, and is therefore faster
adam
Thanks for the comments, However, if you look at the error, it says that can't open file "1", which is really weird because the string 'getPhotos.php' is passed to the function. My guess (pretty wild guess) was that for some reason php take string 'getPhotos.php' as a part of arithmetic expression.
Max Kosyakov
A: 

better to always use

<?php require_once(".\getPhotos.php"); ?>

Don't forget that if you already use require to "run" your index.php (it should not be the case) then require("xxx.php") maybe doesn't open xxx.php in the same directory as index.php

RomanT
backslash is an escaping character
SilentGhost
The whole "require may open a file in a different directory" thing is why I always use something like "require_once( dirname( __FILE__ ) . '/some_file.php' );". That gives you a full, absolute directory, but doesn't require me to set any path configurations.
Narcissus
A: 

I have exactly the same error you have and I am using wamp as well what could be going wrong? did you fixed the problem

Warning: require_once(error.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\include.all.php on line 2

e-mail me at

joelitos hotmail.com

Thank you