[PHP] Re: exclude_once(); ?

2004-05-10 Thread Matthias H. Risse

or if your PHP versions is prior to 4.3.0 use ini_set('include_path',
'.:/path'):
http://de3.php.net/manual/en/function.ini-set.php
Yes that was my idea, too. Probably its best to kick there whole 
include-path and substitute it with my own.

Lets hope it has nothing to do with the auto_append
thing.
I am just a little curious why they, by default, include old
PEAR classes. Thats def a bad trap if you dont do a $ pear upgrade-all
by cronjob.
Thanks for your assistance,
M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: exclude_once(); ?

2004-05-10 Thread Torsten Roehr
Matthias H. Risse [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 Hi again!

 Question:
 Does anyone know of a possibility to exclude files which
 have been included _before_ my script starts on the
 fly (e.g. at the first lines after the entrypoint) ?

 Reasons:
 This ISP of my customer somehow includes a bunch of
 old PEAR files by default which I dont need or of which I
 need in a later version. So when several PEAR-packages
 perform a require_once('HTML/foo.php') PHP recognizes that
 it has already included foo.php and does not overload with
 the one specified in my user space code.

This could also be the case if the include path is set to the ISP's version
of PEAR and when you try to include your own PEAR packages then the
conflicts arises. So maybe the ISP's PEAR is not automatically included via
auto_prepend but it is in the include path. You could use set_include_path()
to overwrite the global settings:
http://de3.php.net/manual/en/function.set-include-path.php

or if your PHP versions is prior to 4.3.0 use ini_set('include_path',
'.:/path'):
http://de3.php.net/manual/en/function.ini-set.php

Hope this helps.

Regards, Torsten


 Maybe there is a general possibility from blocking
 my ISP including some files by default?

 Anyone knows why this has become practice by some
 ISPs? (Doesnt make sense to me to have overhead
 for dozens of requests which scripts most of the
 dont require those classes to be used).

 Yours,
 M

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