Re: Safe to load extension twice ?
| From: | Rasmus Lerdorf | Date: | Thu, 16 Aug 2001 00:38:05 +0000 |
| Subject: | Re: Safe to load extension twice ? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-63360@lists.php.net to get a copy of this message | ||
> From a technical aspect, is it safe to load a particular
> extension twice ? Does it only hit performance (loading the
> .dll/.so twice) or are there some other caveats which can lead to
> unexpected behaviour ?
>
> Example is an extension already loaded in php.ini via
> extension=foo.so and in the script its also loaded via
> dl('foo.so');
>
> Will this do any harm ?
You will see lots and lots of errors about functions being redefined, so
yes, it is a very bad idea to load a shared library twice.
-Rasmus