Jump to content

PEAR install include_path


henryhenry

Recommended Posts

Here is the error:Warning: include(Benchmark/Timer.php) [function.include]: failed to open stream: No such file or directory in C:\...\benchmark.php on line 4Warning: include() [function.include]: Failed opening 'Benchmark/Timer.php' for inclusion (include_path='.;...\php\pear') in ...\benchmark.php on line 4I'm a bit stumped. In the phpinfo() file it reports my include_path correctly ...\php\pear (or is this correct?).I have tried various different things - changing the include path around a bit. I'm a bit unsure what I'm doing with PEAR - do you just refer it to the main directory and it finds the right file itself?Thanks!Henry

Link to comment
Share on other sites

You don't have to do anything with Pear, Pear just puts its own path in the PHP include_path setting. The warning means that it cannot find the file you are trying to include. If you are trying to do this:include("Benchmark/Timer.php");Then the Timer.php file needs to be in a folder called Benchmark which needs to be in the same folder as the PHP script with the include statement in it. If you are using Apache, keep in mind that Apache is case-sensitive.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...