473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Compiling PHP Extensions in Visual C++

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
2 2412

"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
2
by: Girish Srinivasan | last post by:
Hello I would like to know if its possible to compile code in a visual studio .NET environment and then link the objects in a visual studio 6.0 environment with other visual studio compiled...
1
by: webstuff | last post by:
Hi, I recently started getting the BSOD (Stop 0xC5 and others) when compiling my C# application in Visual Studio. I was convinced it was was hardware problems until i checked out the code on my...
0
by: jim | last post by:
Hi Everyone, When I converted one visual .net project from 2002 to 2003, there is an error occursing during compiling under visual studio .net 2003 as followoing: Command Lines Creating...
4
by: tirzanello | last post by:
Hi all, I've found this amusing project: http://inpainting.alpha-sigma.net/ but there are only source codes, the author suggests to compile it with Visual Studio .NET 7.1 or more. The problem...
0
by: Andrea Gavana | last post by:
Hello NG, I'm struggling and googling around, but without big success. I am trying to build a fortran extension with F2PY, and it seems to me an impossible task. At the moment, I have the...
1
by: smack | last post by:
Does anyone know how to create an extension DLL for Windows. I have no problem compiling my selfdevelopt extension for Linux, but can't seem to find any relevant information on how to compile an...
6
by: arielro | last post by:
Hello all! I have a C# application that uses 5 dlls and each time I make a modification to the script and test it(ctrl+F5) the application compiles successfully but doesn't seem to apply the changes...
2
by: eliben | last post by:
On Jun 27, 3:10 pm, eliben <eli...@gmail.comwrote: Problem solved: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.