From: [EMAIL PROTECTED]
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
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]