PHP 4.0 Bug #9637: MySQL extension doesn't want to compile as SELF-CONTAINED-EXTENSION (SCE)
| From: | ab@php.net | Date: | Thu, 08 Mar 2001 20:37:18 +0000 |
| Subject: | PHP 4.0 Bug #9637: MySQL extension doesn't want to compile as SELF-CONTAINED-EXTENSION (SCE) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48309@lists.php.net to get a copy of this message | ||
From: ab@php.net
Operating system: Linux 2.2, glibc 2.2.2
PHP version: 4.0 Latest CVS (08/03/2001)
PHP Bug Type: Compile Failure
Bug description: MySQL extension doesn't want to compile as SELF-CONTAINED-EXTENSION (SCE)
MySQL extension doesn't want to compile as self contained extension because localy created
php_config.h didn't included and global php_config.h from /usr/include/php/main/ contains no
HAVE_MYSQL defined. It bails out with undefined functions php_if_mysql_xxx because
php_mysql.h escapes definitions when HAVE_MYSQL undefined.
Intention was to create a set of RPMs with straight PHP (doesn't depend on anything for
extensions) and additional RPMs for extensions
which depend on particular external library (PgSQL, MySQL, IMAP, GTK, etc).
Configure options for main PHP:
configure --with-apxs=/usr/sbin/apxs --disable-static --disable-debug --enable-pic
--enable-inline-optimization \
--prefix=%{_prefix} --with-zlib --disable-magic-quotes --enable-debugger --enable-track-vars \
--enable-safe-mode --with-exec-dir=%{_bindir} --with-regex=system --enable-sysvsem \
--enable-sysvshm --with-mod_charset --enable-force-cgi-redirect --with-mm --enable-trans-sid \
--with-dbase --with-filepro --enable-ftp --with-xml=/usr --with-gettext --enable-yp \
--enable-calendar --enable-bcmath
Configure options for MySQL module after calling 'phpize':
configure --with-mysql=/usr
(no need to --with-mysql=shared,/usr due $ext_shared always set to 'yes' for SCE).
Patch to solve problem:
--- ext/mysql/php_mysql.c.orig Mon Feb 26 08:07:04 2001
+++ ext/mysql/php_mysql.c Thu Mar 8 18:42:42 2001
@@ -26,6 +26,7 @@
#include "php.h"
#include "php_globals.h"
+#include "php_config.h"
#include "php_mysql.h"
#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
--
Edit Bug report at: http://bugs.php.net/?id=9637&edit=1