Error while Upgrade to PHP 5.3.3 and MySQL 5.1.50

mmgenius

Verified User
Joined
Jan 20, 2004
Messages
178
Last week I installed a new server (with custombuild) without any problem. (PHP 5.3.3 and MySQL 5.1.49).

Today I wanted to install another server (also with custombuild), but when installing PHP 5.3.3 I got this error message:
Code:
/usr/include/mysql/my_global.h:626:25: error: my_compiler.h: No such file or directory
make: *** [ext/mysqli/mysqli.lo] Error 1

The only thing that was changed was the MySQL version (5.1.50 instead of 5.1.49). So I changed the versions.txt file back to MySQL 5.1.49 and I ran
Code:
./build update_versions
This time with succes.

Then after this is updated the versions.txt file again so I had MySQL 5.1.50 installed. This also worked fine.
 
help!

hi,buddy,thanks for your post,i finally find the same question,but how can i fix it?
my os is centos5.3,php version is 5.3.3,mysql version is 5.1.50,but i encounter a error when i install mysqli :as your describe above:

"/usr/include/mysql/my_global.h:626:25: error: my_compiler.h: No such file or dir"

can you give me some suggest to resolve it,any help will be appreciate!
 
Like told above :) : I downgraded to MySQL 5.1.49 installed PHP 5.3.3 and upgraded again to MySQL 5.1.50
 
thanks

hi,buddy,thanks so much,these day,i find all domestic site ,try all and failure.......finally i find how to resolve the problem from a abroad site,
amazing simple,:mad:
when i compile php5.3.3,my compile Command has a Improper option "--enable-embedded-mysqli "
so remove it,compile well done....
thanks for your Reply,thanks
 
Last edited:
use mysql native driver instead

Hi,

I had the same (or similar) problem, php 5.3 wouln't compile with mysqli, no matter which version of mysql I tried.

However:
"With versions of PHP 5.3.0 and newer, mysqli uses MySQL Native Driver by default."

I found the solution to set the configure option to use the mysql native driver.
--with-mysqli=mysqlnd \

http://php.net/manual/en/mysqli.installation.php

greetings!
Thatcher
 
Hi,

I had the same (or similar) problem, php 5.3 wouln't compile with mysqli, no matter which version of mysql I tried.

However:
"With versions of PHP 5.3.0 and newer, mysqli uses MySQL Native Driver by default."

I found the solution to set the configure option to use the mysql native driver.
--with-mysqli=mysqlnd \

http://php.net/manual/en/mysqli.installation.php

greetings!
Thatcher

This worked! Thanks so much!
 
Has anyone else got this working? I downgraded to MySQL 5.1.49 for the mean time, but where in the ./build script do I enter the extra flag for the ./configure of PHP? --with-mysqli=mysqlnd \

Thanks.
 
This what I did:

If you are using Apache 2:

nano -w /usr/local/directadmin/custombuild/configure/ap2/configure.php5

make your changes to look like:

--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \

Robert
 
You dont need the -w flag with nano it will issue that by default.
 
This what I did:

If you are using Apache 2:

nano -w /usr/local/directadmin/custombuild/configure/ap2/configure.php5

make your changes to look like:

--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \

Robert

Just an update , your method worked a treat crazylane, couldn't work out why the config file for php5 DA supplied kept dropping errors until i found this post , nice work mate.
 
Almost there, i found this thread by googling
make: *** [ext/mysqli/mysqli.lo] Error 1

But there is also another error
asm/atomic.h: No such file or directory

Which is fixed here:
http://help.directadmin.com/item.php?id=333

When trying to compile php 5.3, if you get this error:
/usr/include/mysql/my_global.h:361:24: error: asm/atomic.h: No such file or directory
Then you can type the following to comment out the include line from the asm/atomic.h from the my_global.h file (it's not required).
perl -pi -e 's#\#include <asm/atomic.h>#//\#include <asm/atomic.h>#' /usr/include/mysql/my_global.h
Then try the php compile again.
 
Back
Top