INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
Come Join Us!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Member Feedback
"...Congratulations on a brilliant idea and a great site..."
Geography
Where in the world do Tek-Tips members come from?
|
Compile PHP with MYSQL Support
|
|
|
mikri (TechnicalUser) |
4 Dec 07 7:53 |
Hi,
i need help with compiling PHP with MYSQL Support under AIX 5.3. I am not realy a Specialist in Compile Programs, it is my first Project. I have download the following Archives: mysql-5.0.45-aix5.2-powerpc-64bit and php-5.2.4 MYSQL is installed and works fine, if i compile PHP with this command:
./configure --prefix=/usr/local --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf --with-gd --with-pear --with-gettext --with-mime-magic --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-png --with-zlib --with-bz2 --with-xml --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib
it works also (phpinfo())
But for our Aplication i need the MYSQL Support for PHP, so i try to compile with this command:
./configure --prefix=/opt --with-apxs2=/opt/apache2/bin/apxs --with-config-file-path=/opt/apache2/conf --with-gd --with-pear --with-gettext --with-mime-magic --with-mysql=./ext/mysql --with-mysqli=./ext/mysql --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-png --with-zlib --with-bz2 --with-xml --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib > /data/install/php.log
Now i become the following Meaasge:
configure: error: Cannot find MySQL header files under ./ext/mysql. Note that the MySQL client library is not bundled anymore!
Now i was copy the files from "mysql-5.0.45-aix5.2-powerpc-64bit/lib" and from "mysql-5.0.45-aix5.2-powerpc-64bit/include" to "php-5.2.4/ext" but i become the same error.
Can some one help me to fix it.
Regards Mikri |
|
|
p5wizard (IS/IT--Management) |
4 Dec 07 8:16 |
I'd copy the lib files to .../ext/mysql/lib and the include files to .../ext/mysql/include HTH,
p5wizard |
|
|
mikri (TechnicalUser) |
5 Dec 07 4:40 |
Thank you, i was make the Directorys und copy the files, but now i become an other error, i tried it also with the new Version of PHP (5.2.5), but I think now i have a Problem with some MYSQL Library. CODEroot@p5-1ww1:/data/install/php-5.2.5>>tail -60 config.log int main() { iconv_ccs_init(NULL, NULL); ; return 0; } configure:46538: checking if iconv supports errno configure:46573: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -L/opt/freeware/lib -L/opt/freeware/lib -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lintl -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lbz2 -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5 configure:46605: checking if your cpp allows macro usage in include lines configure:46617: gcc -c -I/usr/include -g -O2 conftest.c 1>&5 configure:46962: checking for IMAP support configure:47009: checking for IMAP Kerberos support configure:47035: checking for IMAP SSL support configure:49301: checking for InterBase support configure:50228: checking whether to enable JavaScript Object Serialization support configure:50277: checking for ANSI C header files configure:50676: checking for LDAP support configure:50723: checking for LDAP Cyrus SASL support configure:53549: checking whether to enable multibyte string support configure:53596: checking whether to enable multibyte regex support configure:53622: checking whether to check multibyte regex backtrack configure:53648: checking for external libmbfl configure:55241: checking for mcrypt support configure:56076: checking for mhash support configure:56552: checking whether to include mime_magic support configure:56910: checking for MING support configure:58142: checking for mSQL support configure:58655: checking for MSSQL support via FreeTDS configure:59308: checking for MySQL support configure:59355: checking for specified location of the MySQL UNIX socket configure:59413: checking for MySQL UNIX socket location configure:59604: checking for mysql_close in -lmysqlclient configure:59623: gcc -o conftest -I/usr/include -g -O2 -L/data/install/php-5.2.5/ext/mysql/lib -L/data/install/php-5.2.5/ext/mysql/lib -L/usr/lib -L/opt/freeware/lib -L/opt/freeware/lib -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lmysqlclient -lintl -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lbz2 -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5 ld: 0711-317 ERROR: Undefined symbol: .mysql_close ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status configure: failed program was: #line 59612 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close();
int main() { mysql_close() ; return 0; } configure:59846: checking for mysql_error in -lmysqlclient configure:59865: gcc -o conftest -I/usr/include -g -O2 -L/data/install/php-5.2.5/ext/mysql/lib -L/data/install/php-5.2.5/ext/mysql/lib -L/usr/lib -L/opt/freeware/lib -L/opt/freeware/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lintl -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lbz2 -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5 ld: 0711-317 ERROR: Undefined symbol: .mysql_error ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status configure: failed program was: #line 59854 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error();
int main() { mysql_error() ; return 0; } root@p5-1ww1:/data/install/php-5.2.5>> is it possible that the Compiler ist the Problem? I use GCC CODEroot@p5-1ww1:/data/install/php-5.2.5>>gcc -v Using built-in specs. Target: powerpc-ibm-aix5.3.0.0 Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.3.0.0 Thread model: aix gcc version 4.0.0 root@p5-1ww1:/data/install/php-5.2.5>> My configure command is: CODE./configure --prefix=/opt --with-apxs2=/opt/apache2/bin/apxs --with-config-file-path=/opt/apache2/conf --with-gd --with-pear --with-gettext --with-mime-magic --with-mysql=./ext/mysql --with-mysqli=./ext/mysqli --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-png --with-zlib --with-bz2 --with-xml --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib > /data/install/php.log I hope this Information is useful. Thanks Mikri |
|
Try adding --with-mysqli-dir=/usr/lib/mysql... or where ever your libraries are use "find / -name libmysqlclient* 2>/dev/null" Mike
"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
|
|
|
mikri (TechnicalUser) |
5 Dec 07 8:21 |
I try this : CODE--with-mysqli-dir=/opt/mysql-5.0.45-aix5.2-powerpc-64bit/lib than this: CODE--with-mysql-dir=/opt/mysql-5.0.45-aix5.2-powerpc-64bit/lib and both together, but every time i become a Error different from the Post before: CODEtail -60 config.log int main() { iconv_ccs_init(NULL, NULL); ; return 0; } configure:46538: checking if iconv supports errno configure:46573: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -L/opt/freeware/lib -L/opt/freeware/lib conftest.c -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5 configure:46605: checking if your cpp allows macro usage in include lines configure:46617: gcc -c -I/usr/include -g -O2 conftest.c 1>&5 configure:46962: checking for IMAP support configure:47009: checking for IMAP Kerberos support configure:47035: checking for IMAP SSL support configure:49301: checking for InterBase support configure:50228: checking whether to enable JavaScript Object Serialization support configure:50277: checking for ANSI C header files configure:50676: checking for LDAP support configure:50723: checking for LDAP Cyrus SASL support configure:53549: checking whether to enable multibyte string support configure:53596: checking whether to enable multibyte regex support configure:53622: checking whether to check multibyte regex backtrack configure:53648: checking for external libmbfl configure:55241: checking for mcrypt support configure:56076: checking for mhash support configure:56552: checking whether to include mime_magic support configure:56910: checking for MING support configure:58142: checking for mSQL support configure:58655: checking for MSSQL support via FreeTDS configure:59308: checking for MySQL support configure:59355: checking for specified location of the MySQL UNIX socket configure:59413: checking for MySQL UNIX socket location configure:59604: checking for mysql_close in -lmysqlclient configure:59623: gcc -o conftest -I/usr/include -g -O2 -L/data/install/php-5.2.5/ext/mysql/lib -L/data/install/php-5.2.5/ext/mysql/lib -L/usr/lib -L/opt/freeware/lib -L/opt/freeware/lib conftest.c -lmysqlclient -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5 ld: 0706-006 Cannot find or open library file: -l mysqlclient ld:open(): No such file or directory collect2: ld returned 255 exit status configure: failed program was: #line 59612 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_close();
int main() { mysql_close() ; return 0; } configure:59846: checking for mysql_error in -lmysqlclient configure:59865: gcc -o conftest -I/usr/include -g -O2 -L/data/install/php-5.2.5/ext/mysql/lib -L/data/install/php-5.2.5/ext/mysql/lib -L/usr/lib -L/opt/freeware/lib -L/opt/freeware/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5 ld: 0706-006 Cannot find or open library file: -l mysqlclient ld:open(): No such file or directory collect2: ld returned 255 exit status configure: failed program was: #line 59854 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error();
int main() { mysql_error() ; return 0; } root@p5-1ww1:/data/install/php-5.2.5>> For testing i have also strip my configure command: CODE./configure --prefix=/opt --with-apxs2=/opt/apache2/bin/apxs --with-config-file-path=/opt/apache2/conf --with-mysql=./ext/mysql --with-mysql-dir=/opt/mysql-5.0.45-aix5.2-powerpc-64bit/lib --with-mysqli=./ext/mysqli --with-mysqli-dir=/opt/mysql-5.0.45-aix5.2-powerpc-64bit/lib --with-zlib-dir=/opt/freeware/lib > /data/install/php.log My $LIBPATH CODEecho $LIBPATH /opt/mysql-5.0.45-aix5.2-powerpc-64bit/lib:/usr/lib:/opt/freeware/lib Also i was make a "make clean" before Any Idears? Thank you Mikri |
|
|
 |
|