Jump to content

Archived

This topic is now archived and is closed to further replies.

stv

Unable to load dynamic library

Recommended Posts

I just installed Apache 2 and PHP 5.1.2 on this Windows 2000 pc. All is well, phpinfo is returning what I expect, etc.

But, I have an extension that I'm trying to use. That's not working. My PHP code says "Call to undefined function m_get()", where m_get is one of the functions in the extension.

Here's what happens when I do php -m from the command line:

C:\php>php -m
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php/ext\php503_mgw.dll' - The specified procedure could not be found.
in Unknown on line 0
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
ftp
iconv
libxml
(etc)

As you can see from this, I added an "extension=php503_mgw.dll" to php.ini, changed the "extension_dir" in my php.ini to C:/php/ext, and I copied the dll to there (and also to C:/winnt/system32, for luck). I have tried all combinations of forward and backslashes, trailing slash in extension_dir, upper case, lower case, etc.

So, what am I missing here? I don't think the dll is bad, but would this be the error message I would get if it was?

Share this post


Link to post
Share on other sites
check versions of the extension and the php.exe file. those 2 files must belong to the same version of PHP package

Share this post


Link to post
Share on other sites
It would tell you something about a build mismatch if you had different versions.

Share this post


Link to post
Share on other sites
I have PHP5 installed on Windows XP. After installation I copied all dll's from c:/Program Files/PHP/ext to c:/WINDOWS/system32.
I have "C:\Program Files\PHP;c:\Program Files\PHP\ext" in my environment Path
IN php.ini: include_path = "./PHP/" PHPIniDir = "C:/Program Files/PHP" extension_dir="C:\Program Files\PHP\ext"
I then tried running php -v in Dos and got this:
PHP Warning: PHP Startup:  Unabled to load dynamic library  'c:\Program Files\PHP\ext\php_oci8.dll' The specified module could not be found.
This warning is repeated for:
php_pdo_oci.dll
php_pdo_oci8.dll
php_pdo_sqlite_external.dll
php_pspell.dll
phpsybase.dll
pho_ibm_db2.dll
php_ifx.dll
php_maxdb.dll
php_mcve.dll
php_netools.dll
php_oracle.dll
php_pdo_ibm.dll
php_pdo_informix.dll
php_svn.dll
Also this appeared:
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'php_ingres2.dll'
I got pop up warnings saying the following were missing:
OCI.dll
sqlite3.dll
aspell-15.dll
libcs.dll
DB2CLI.dll
isqlt09a.dll
libSQLDBC_C.dll
libmonetra.dll
Icrzo.dll
OCIW32.dll
ICLIT09B.dll
intl3_svn.dll

Anyone any ideas? 

Share this post


Link to post
Share on other sites
I think the problem you have is because you have enabled all extensions during PHP installation. You have to open php.ini and disable all the extensions (just comment the lines). Just leave the extensions that you need because the others (like Orcales oci8 lib) are looking for external files and libs.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.