Error configuring PHP

Hello,

When I attempt to run:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=/usr/local/mysql/bin/mysql_config

I receive this error:

configure: error: wrong mysql library version or lib not found. Check config.log for more information.

Is there an easy fix for this?

platform: Ubuntu
php version: 5.3.4
apache:2.2.17
mysql-5.5.8-linux2.6-i686

I’m pretty sure you don’t need to specify the location of MySQL.

Have you tried with just:


--with-mysql --with-mysqli

?

Failing that, have you checked the config.log for more information?

Additionally, I see there’s a bug raised (#58987) which relates to 5.3.4 and MySQL 5.5; it maybe worth a look.


--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

Yes, I looked at the bug but the workaround looked very cryptic to a newbee. I’m just wondering if I should attempt configuring another version of php that is compatible with mysql 5.5 as I’ve already got mysql up and running. I’m new to these individual components and just started working with Linux today. So I wouldn’t even know what to make of config.log even if I knew how to find it. I will try removing the path to mysql, first, before attempting anything else.

If that doesn’t work, “I’ll be back!”.

Thx

I’ve just fired up a clean Ubuntu Server 10.04 (32bit) VM instance and having a go myself.

It’s getting late though, and I’m not exactly au fair with this myself; so I may be joining you in the hunt for a solution! :slight_smile:

See you on the other side.

If you get it php installed, definitely tell me how you did it. I’ll do the same. Thanks a bunch.

OK, it’s 3am here and I’m very sleepy.

The good news is I can compile it just fine with…


 ./configure --with-apxs2=/usr/bin/apxs2 --enable-cgi --with-openssl --with-mysql=[B]/usr/local/mysql[/B] --with-tidy --with-curl --with-xsl --with-xmlrpc --with-mcrypt --with-gd --with-jpeg-dir=/usr --with-config-file-path=/etc/php5/php.ini --with-config-file-scan-dir=/etc/php5/ --enable-cli --with-zlib-dir=/usr --enable-mbstring --enable-zip --enable-gd-native-ttf --with-freetype-dir=/usr --with-png-dir=/usr

anthony@ubuntu:~$ php -v
PHP 5.3.4 (cli) (built: Dec 28 2010 02:58:10)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

I’m still working on MySQLi support.

Yay.


./configure --with-apxs2=/usr/bin/apxs2 --enable-cgi --with-openssl --with-tidy --with-curl --with-xsl --with-xmlrpc --with-mcrypt --with-gd --with-jpeg-dir=/usr --with-config-file-path=/etc/php5/php.ini --with-config-file-scan-dir=/etc/php5/ --enable-cli --with-zlib-dir=/usr --enable-mbstring --enable-zip --enable-gd-native-ttf --with-freetype-dir=/usr --with-png-dir=/usr --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

anthony@ubuntu:~/php-5.3.4$ php -m
[PHP Modules]
Core
ctype
curl
date
dom
ereg
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
openssl
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
SQLite
sqlite3
standard
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]

anthony@ubuntu:~/php-5.3.4$ php -i | grep mysql
mysql
MYSQL_SOCKET => /tmp/mysql.sock
MYSQL_INCLUDE => -I/usr/local/mysql/include
MYSQL_LIBS => -L/usr/local/mysql/lib -lmysqlclient
mysql.allow_local_infile => On => On
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => /tmp/mysql.sock => /tmp/mysql.sock
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off

I tried running that exact script and I got: Error–couldn’t find SSL’s <ev> or something like that. Any suggestions?

I think I’ll let you try and figure that one out. For now. :wink: