Page 1 of 1

Compiling mysql and mysqli ext in PHP

Posted: Thu Sep 13, 2007 2:20 pm
by Ambush Commander
Using the instructions here, I've had reasonable success getting PHP to compile. There are, however, some flaky edges. I am most concerned with my inability to get php_mysql.dll and php_mysqli.dll to compile.

Because most of PHP's extensions rely on external libraries and header files, hunting down all of these dependencies is quite a task for someone who wants to compile the extension. Edin has been so kind as to compile all these libraries and headers into one convenient place. But there are problems.

The first issue I ran into involved the IMAP extension. Apparently, the c-connect header files needed to be in the INCLUDE environment variable, so I added them in, and chugged along. Next, ming started complaining and, at a loss as to the meaning of the warnings, I simply removed the header files to make sure PHP didn't try to compile them. After ming, I discover that if I use nmake snap, nmake will ignore errors during the compilation process. Compilation finishes, I boot things up, and find out (much to my dismay) that mysql and mysqli didn't compile.

The purported problem is an unresolved external symbol, which leads me to believe that I am now in dependency hell. Detailed debug information can be supplied on request, but I'm simply wondering what my next course of action should be. Attempt to patch the source? Download the MySQL source code? Attempt to use my local installation of MySQL's include and lib directories?