PDA

View Full Version : How to mysqli ?



decafranky
03-13-2007, 01:37 PM
Running apache 2.0.59, PHP 5.2.1 and MySQL 5.x.

Can't find here any good information about how to install/compile mysqli.

Somebody can help me out?

Franky

smtalk
03-13-2007, 01:44 PM
# cd /usr/local/directadmin/customapache
Add this to configure.php file:
--with-mysqli \

Run:
./build php n

decafranky
03-13-2007, 01:46 PM
thanks!

franky

SupermanInNY
05-10-2007, 03:05 PM
# cd /usr/local/directadmin/customapache
Add this to configure.php file:
--with-mysqli \

Run:
./build php n


Hi,

I have a user who is switching from cPanel where he used PHP5 and mysqli.
I'm using php 4.4.7 with the -- with-mysqli option, but the code still complains.
in phpinfo() on his cPanel box he has a whole block of

mysqli
MysqlI Support enabled
Client API version 4.1.19
MYSQLI_SOCKET /var/lib/mysql/mysql.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off


Whereas in my PHP 4, I only see the '--with-mysqli' in the configure command section.

I restarted apache, but to no avail.

Any pointers?

-Alon.

floyd
05-10-2007, 03:40 PM
Whereas in my PHP 4, I only see the '--with-mysqli' in the configure command section.

That means mysqli was not really compiled in. You are missing something that is supposed to be installed first probably.

When you do the compile looks for errors.

SupermanInNY
05-10-2007, 04:09 PM
That means mysqli was not really compiled in. You are missing something that is supposed to be installed first probably.

When you do the compile looks for errors.

clean compile. no errors.
I upgraded from 4.4.5 to 4.4.7, and the build itself is clean.

snaaps
06-21-2007, 02:42 AM
Hello,

Whe used PHP 5.2.3 and MySQL5
I tried to install mysqli to add it to the configure file and then:
# ./build clean
# ./build php n

But after a while we get the following error:
gcc: /usr/lib/mysql/libmysqlclient.so: No such file or directory
make: *** [libphp5.la] Error 1

Also whe have tried to enable mysqli in the php.ini file.
But there is no mysqli.dll file on the server, and i do not know where to download it.

smtalk
06-21-2007, 03:00 AM
DLL is MS windows extension. Use this for MySQL:


cd /usr/lib
cp libmysqlclient.* /usr/lib/mysql/

bdj
12-01-2009, 06:44 AM
I'm trying the same thing as the TS but I get this error

checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.

*** There was an error while trying to configure php. Check the configure.php file

smtalk
12-01-2009, 06:48 AM
MySQLi should be enabled by default. If it's not - just execute (make sure you do not have any custom PHP configuration files in /usr/local/directadmin/custombuild/custom):


cd /usr/local/directadmin/custombuild
./build update
./build php n
If you will still get the error, try:


cd /usr/local/directadmin/custombuild
./build update
./build set mysql 5.1
./build set mysql_inst yes
./build set mysql_backup yes
./build mysql
./build php n

bdj
12-01-2009, 06:51 AM
I still use customapache, i'm afraid of switching to custombuild on this live server. I would love to, because I use it on another server and it works extremely great