By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,347 Members | 1,357 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,347 IT Pros & Developers. It's quick & easy.

Compiling PHP Extensions in Visual C++

P: n/a
Hi,

I'm busy porting a PHP-Extension written by the company I work for from
Linux to Win32 (XP).
Everything worked fine. I fixed the errors and warnings, copied the dll
to the extensions directory, entered the dll as extension into php.ini
and this is, where trouble starts.

When PHP is called on apache starting up, it throws an error at me
saying "Unknown(): Unable to load dynamic library '...' Module not found.

Then I browsed through the source code of the extensions, that are
included in the php-4.3.6-sources, to figure out, what they are doing
different - and at this point, the story gets weird:

I compiled the bz2-Project (no errors, no warnings), and replaced
php_bz2.dll in the extensions-Folder with the version I just compiled -
resulting in the same "Unknown(): ..." Error-Message for php_bz2.dll (of
course I checked, that the original indeed works).

Has anyone heard of this problem before?

TIA

Sebastian Morawietz
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Sebastian Morawietz" <st*************@gmx.de> wrote in message
news:c9**********@sagnix.uni-muenster.de...
Hi,

I'm busy porting a PHP-Extension written by the company I work for from
Linux to Win32 (XP).
Everything worked fine. I fixed the errors and warnings, copied the dll
to the extensions directory, entered the dll as extension into php.ini
and this is, where trouble starts.

When PHP is called on apache starting up, it throws an error at me
saying "Unknown(): Unable to load dynamic library '...' Module not found.

Then I browsed through the source code of the extensions, that are
included in the php-4.3.6-sources, to figure out, what they are doing
different - and at this point, the story gets weird:

I compiled the bz2-Project (no errors, no warnings), and replaced
php_bz2.dll in the extensions-Folder with the version I just compiled -
resulting in the same "Unknown(): ..." Error-Message for php_bz2.dll (of
course I checked, that the original indeed works).

Has anyone heard of this problem before?

TIA

Sebastian Morawietz


Sebastian,

Which compiler environment are you using?
It is possible that a library you're dynamically linking against isn't
available to PHP.

Have you checked the Makefile to determine the exact options used to compile
the extensions?
Nathan
Jul 17 '05 #2

P: n/a
"Sebastian Morawietz" <st*************@gmx.de> wrote in message
news:c9**********@sagnix.uni-muenster.de...
Hi,

I'm busy porting a PHP-Extension written by the company I work for from
Linux to Win32 (XP).
Everything worked fine. I fixed the errors and warnings, copied the dll
to the extensions directory, entered the dll as extension into php.ini
and this is, where trouble starts.

When PHP is called on apache starting up, it throws an error at me
saying "Unknown(): Unable to load dynamic library '...' Module not found.

Then I browsed through the source code of the extensions, that are
included in the php-4.3.6-sources, to figure out, what they are doing
different - and at this point, the story gets weird:

I compiled the bz2-Project (no errors, no warnings), and replaced
php_bz2.dll in the extensions-Folder with the version I just compiled -
resulting in the same "Unknown(): ..." Error-Message for php_bz2.dll (of
course I checked, that the original indeed works).

Has anyone heard of this problem before?

TIA

Sebastian Morawietz


Sebastian,
If your compiler is incrementing the internal version number of the .dll,
you may find you need to run regsvr32 on that new .dll - depending on your
o/s version etc.
I encountered similar problems and this fixed it for me: your mileage may
vary.
Cheers,
Doug

--
Remove the blots from my address to reply
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.