RE: PHP require_once() opens some files but not others in same library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris,

At no point am I using a URL.
Under normal circumstances the code includes (require_once) things like
"Zend/Loader/blablabla". Because this does not resolve in the local
directory it is supposed to consult the PHP include_path to look this up.
And it does this successfully up to a point.
The full path is "/usr/local/php5/lib/php/library/Zend/Loader/blablabla".

When I say "up to a point" I mean that my code includes files in "Zend/..."
and it eventually ends up in the file "Zend/Loader/PluginLoader.php". So the
whole include mechanism worked up to this point. However in this
PluginLoader.php file on line 389 it calls
require_once("Zend/Loader/PluginLoader/Exception.php") and this is when
things go bad.

To see if it makes a difference I modified line 389 to read
require_once("/usr/local/php5/lib/php/library/Zend/Loader/PluginLoader/Excep
tion.php") and got the slightly different error as described in my original
post.

I have tried to find something about this type of error on Google, but most
search results are pages of web sites that are written in php that at the
time of indexing displayed this error. The sites don't actually have
anything to do with PHP development.

I have even gone as far as downloading the php source code to try and see if
I can figure out why this type of error world be caused. No luck yet.

Cheers
Henning

-----Original Message-----
From: Chris [mailto:dmagick@xxxxxxxxx] 
Sent: Monday, April 06, 2009 11:05 PM
To: hglattergotz
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  PHP require_once() opens some files but not others in
same library


<snip>

> Here are the warnings and the error that I get:
> 
> Warning: Zend_Loader_PluginLoader::require_once()
> [function.Zend-Loader-PluginLoader-require-once]: couldn't resolve host
name
> in /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line
389

Why is this trying to load something via http (or ftp even)?

"couldn't resolve hostname" is not something you get when you include or 
require a file locally.

> when I hard code the absolute path on line 389 the first warning changes
to
> Warning: Zend_Loader_PluginLoader::require_once()
> [function.Zend-Loader-PluginLoader-require-once]: URL using bad/illegal
> format or missing URL in
> /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389

What is the absolute path you are putting in? It looks like a url 
according to the message.

It should be a file path:

/usr/local/php5/lib/php/library/Zend/blah/blah/blah

-- 
Postgresql & php tutorials
http://www.designmagick.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux