php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9637 MySQL extension doesn't want to compile as SELF-CONTAINED-EXTENSION (SCE)
Submitted: 2001-03-08 15:37 UTC Modified: 2001-06-02 22:00 UTC
From: ab@php.net Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0 Latest CVS (08/03/2001) OS: Linux 2.2, glibc 2.2.2
Private report: No CVE-ID: None
 [2001-03-08 15:37 UTC] ab@php.net
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"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-02 22:00 UTC] sniper@php.net
should be fixed now.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 01:01:30 2024 UTC