problem to compile PHP with MySQL [external module type]
I have virtual server which I would like to customize and use the following:
PHP version 4.4.9 MySQL version 4.1.22 I am struggling for the 2nd day with PHP compile. the problem is that I need to compile PHP with "Client API version" which is 4.1.22 and not 3.23.49 this means that I need to compile PHP with "MYSQL_MODULE_TYPE" which is "external" and not "builtin" and the problem is to compile PHP with "MYSQL_MODULE_TYPE" which is "external" I cant achieve until now this target. here are some information regarding my system: we are talking about 64bit OS , means x86_64 we are talking about centos 4.8 we are talking about Virtual Server / Virtual machine [based on Virtuozzo] Code:
# uname -a Code:
# cat /etc/redhat-release Code:
# rpm -qa | grep mysql Code:
# rpm -qa | grep php Code:
# /usr/bin/mysql_config --libs Code:
# /usr/bin/mysql_config --version Code:
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --with-libdir=lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir --with-gd --enable-gd-native-ttf --without-gdbm --with-gettext --with-ncurses=shared --with-gmp --with-iconv --with-jpeg-dir --with-openssl --with-png --with-pspell --with-xml --with-expat-dir=/usr --with-dom=shared,/usr --with-dom-xslt=/usr --with-dom-exslt=/usr --with-xmlrpc=shared --with-pcre-regex=/usr/lib64 --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear --with-imap --with-imap-ssl --with-kerberos --with-ldap=shared --with-mysql=/usr --with-mysqli --enable-dom --with-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-mime-magic --enable-dbase --with-apxs2=/usr/sbin/apxs --with-libdir=lib64 --with-mysql=/usr note: in case that I will not specify DIR for --with-mysql , then in such case PHP compilation will success , BUT the problem is that "MYSQL_MODULE_TYPE" will be "builtin" and not "external" [and I need "external"] , so any suggestion regarding leaving the path of MySQL empty , is not eligible for my scenario. WHICH ERROR MSG i GET: sometime I get: configure: error: Cannot find MySQL header files under sometime I get: configure: error: Cannot find libmysqlclient library under /usr I already tried to run the following command line: Code:
LDFLAGS=-L/usr/lib64/mysql ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --with-libdir=lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir --with-gd --enable-gd-native-ttf --without-gdbm --with-gettext --with-ncurses=shared --with-gmp --with-iconv --with-jpeg-dir --with-openssl --with-png --with-pspell --with-xml --with-expat-dir=/usr --with-dom=shared,/usr --with-dom-xslt=/usr --with-dom-exslt=/usr --with-xmlrpc=shared --with-pcre-regex=/usr/lib64 --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear --with-imap --with-imap-ssl --with-kerberos --with-ldap=shared --with-mysql=/usr --with-mysqli --enable-dom --with-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-mime-magic --enable-dbase --with-apxs2=/usr/sbin/apxs so for not continuing spending my time , I have decided to open a post here , and lets see if someone here has a solution for this common issue. |
some more info which can help:
Code:
# /usr/lib64/mysql/mysql_config --cflags Code:
# /usr/lib64/mysql/mysql_config --libs Code:
# LDFLAGS="-L/usr/lib64/mysql" CPPFLAGS="-I/usr/include/mysql" ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --with-libdir=lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir --with-gd --enable-gd-native-ttf --without-gdbm --with-gettext --with-ncurses=shared --with-gmp --with-iconv --with-jpeg-dir --with-openssl --with-png --with-pspell --with-xml --with-expat-dir=/usr --with-dom=shared,/usr --with-dom-xslt=/usr --with-dom-exslt=/usr --with-xmlrpc=shared --with-pcre-regex=/usr/lib64 --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-pear=/usr/share/pear --with-imap --with-imap-ssl --with-kerberos --with-ldap=shared --with-mysql --with-mysqli --enable-dom --with-pgsql=shared --with-snmp=shared,/usr --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-mime-magic --enable-dbase --with-apxs2=/usr/sbin/apxs "MYSQL_MODULE_TYPE" will be "builtin" and not "external" and I must have "MYSQL_MODULE_TYPE" which is "external" and not "builtin" |
All times are GMT -5. The time now is 06:45 PM. |