Bug #17798 Updated: OS Independat Extension Loading dl()
| From: | edink@php.net | Date: | Mon, 17 Jun 2002 11:17:13 +0000 |
| Subject: | Bug #17798 Updated: OS Independat Extension Loading dl() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10844@lists.php.net to get a copy of this message | ||
ID: 17798
Updated by: edink@php.net
Reported By: cox@idecnet.com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: All
PHP Version: 4.2.1
New Comment:
Stig already added constant PHP_SHLIB_SUFFIX so you can do something
like (in PHP >= 4.3.0):
dl($ext.'.'.PHP_SHLIB_SUFFIX);
Previous Comments:
------------------------------------------------------------------------
[2002-06-17 07:07:47] cox@idecnet.com
Change the actual behaviour of dl() to be OS independant, avoiding the
actual workarround:
+ if (!extension_loaded($ext)) {
+ if (OS_WINDOWS) {
+ return @dl("php_$ext.dll");
+ } elseif (PHP_OS == 'HP-UX') {
+ return @dl("$ext.sl");
+ } elseif (PHP_OS == 'AIX') {
+ return @dl("$ext.a");
+ } else {
+ return @dl("$ext.so");
+ }
+ }
+ return true;
-- Tomas V.V.Cox
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17798&edit=1