Click to See Complete Forum and Search --> : Loading DLL Extensions


Anon
02-14-2002, 12:50 PM
I can't seem to be able to load any of the DLL extensions included with PHP. For example when I try to load the pdf extension using:

dl("php_zlib.dll"); or
displaying phpinfo()

I get this message in a warning window:

pdf: Unable to initialize module
Module compiled with debug=o, thread-safety=1 module API=20000809
PHP compiled with debug=o, thread-safety=1 module API=20001222
These options need to match

I am running:
WINNT 4.0 SP 6a
Apache 1.3.12
PHP 4.0.6

php.ini settings:
extension_dir = j:\php\extensions
enable_dl = On
extension=php_pdf.dll


Any thoughts? Thanks.


Zach Curtis
POPULUS

mithril
02-14-2002, 02:47 PM
Apache 1.3.x is a multi-threaded server on Win32 (as is IIS). The dl() function does not work in multi-threaded environments. You'll either have to load the extension in php.ini or do without it:)

-geoff

Anon
02-14-2002, 04:10 PM
OK, So I won't use dl(), however, I still can't load any extensions. When I try and load extensions and try and display what has been loaded using phpinfo(), I still receive the same message.

Any way to get these extensions to run?

Thanks again.

Zach

mithril
02-14-2002, 05:20 PM
After reading through your original post again, I also noticed that you're trying to load an old extension into the current interpreter. The "API=20000809" bit indicates that the extension was built on 08/09/2000. As extensions are build specific, the only interpreter built on 08/09/2000 will run that copy of the extension.

Just grab the zip file for PHP 4.0.6 from php.net. Paste the extensions contained in that archive into your extensions_dir overwriting any existing files. Restart Apache and your problem should (hopefully) be fixed.

-geoff

Anon
02-14-2002, 06:24 PM
AHHHH. Yes, that was it. I don't know how or when the dll extensions were not updated or somehow replaced in the past. I have not changed or installed php in quite a while. Anyways, you were correct that the dll's did not match with the build.

Thanks much.


Zach

gardner1
02-15-2002, 02:36 PM
tag, duly noted

i love error messages =)