For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2005 > RE: [PEAR] Re: WELCOME to pear-general@lists.php.net









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PEAR] Re: WELCOME to pear-general@lists.php.net
Darren Ehlers

2005-05-07, 3:56 am

Here's the result:

string(42) "/usr/local/lib/php"=20
Warning: main(MDB2.php) [function.main]: failed to open stream: No such =
file
or directory in /web/dc/html/index.php on line 8

Fatal error: main() [function.require]: Failed opening required =
'MDB2.php'
(include_path=3D'/usr/local/lib/php') in /web/dc/index.php on line 8

The actual code is:

<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

var_dump(get_include_path());
require_once 'MDB2.php';
?>

When I change it to this, it works fine:

<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

var_dump(get_include_path());
require_once '/usr/local/lib/php/MDB2.php';
?>

There's got to be something on the server affecting it, as the paths all
seem correct...

Darren Ehlers

> -----Original Message-----
> From: Greg Beaver [mailto:cellog@php.net]=20
> Sent: Friday, May 06, 2005 6:10 PM
> To: darren@ehlersconsulting.net
> Cc: pear-general@lists.php.net
> Subject: [PEAR] Re: WELCOME to pear-general@lists.php.net
>=20
>=20
> Darren Ehlers wrote:
> uploaded to my
> For example:
>=20
> try this script:
>=20
> <?php
> var_dump(get_include_path());
> require_once 'MDB2.php';
> ?>
>=20
> Greg
>=20
> --=20
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>=20
>=20

Greg Beaver

2005-05-07, 3:56 am

Darren Ehlers wrote:
> Here's the result:
>
> string(42) "/usr/local/lib/php"
> Warning: main(MDB2.php) [function.main]: failed to open stream: No such file
> or directory in /web/dc/html/index.php on line 8
>
> Fatal error: main() [function.require]: Failed opening required 'MDB2.php'
> (include_path='/usr/local/lib/php') in /web/dc/index.php on line 8
>
> The actual code is:
>
> <?php
> ini_set('error_reporting', E_ALL);
> ini_set('display_errors', 1);
> ini_set('display_startup_errors', 1);
>
> var_dump(get_include_path());
> require_once 'MDB2.php';
> ?>
>
> When I change it to this, it works fine:
>
> <?php
> ini_set('error_reporting', E_ALL);
> ini_set('display_errors', 1);
> ini_set('display_startup_errors', 1);
>
> var_dump(get_include_path());
> require_once '/usr/local/lib/php/MDB2.php';
> ?>
>
> There's got to be something on the server affecting it, as the paths all
> seem correct...


Yeah, that's freaky weird.

Try this and see if it works:
<?php
set_include_path('/usr/local/lib/php/'); // <-- note trailing /
require_once 'MDB2.php';
?>

I doubt it will, but it's worth a try.

Greg
Darren Ehlers

2005-05-07, 3:56 am

I think I might have figured something out....I've got a path in there =
using
a ';' as a separator, instead of the PATH_SEPARATOR value. I'm running =
some
tests, but that may have fixed my problem.

Thanks for helping me in the right direction...

Darren Ehlers

> -----Original Message-----
> From: Greg Beaver [mailto:cellog@php.net]=20
> Sent: Friday, May 06, 2005 11:39 PM
> To: darren@ehlersconsulting.net
> Cc: pear-general@lists.php.net
> Subject: Re: [PEAR] Re: WELCOME to pear-general@lists.php.net
>=20
>=20
> Darren Ehlers wrote:
> stream: No such file
> required 'MDB2.php'
> the paths all
>=20
> Yeah, that's freaky weird.
>=20
> Try this and see if it works:
> <?php
> set_include_path('/usr/local/lib/php/'); // <-- note trailing /
> require_once 'MDB2.php';
> ?>
>=20
> I doubt it will, but it's worth a try.
>=20
> Greg
>=20

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com