PHP 5.1 and 5.2 and MySQL 5.1.20+
Today I fell victim of a gotcha when custom compiling PHP 5.1.4 for a customer which runs MySQL 5.1.22. The customer in question requires the mysqli component which appears to be broken with these versions (fixed in 5.2.4 though). So if you configure PHP with --with-mysqli=/usr/bin/mysql_config enabled you will soon find yourself staring at:
/usr/local/src/php-5.1.4/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_stmt_bind_param':
/usr/local/src/php-5.1.4/ext/mysqli/mysqli_api.c:145: error: 'gptr' undeclared (first use in this function)
/usr/local/src/php-5.1.4/ext/mysqli/mysqli_api.c:145: error: (Each undeclared identifier is reported only once
/usr/local/src/php-5.1.4/ext/mysqli/mysqli_api.c:145: error: for each function it appears in.)
/usr/local/src/php-5.1.4/ext/mysqli/mysqli_api.c: In function 'zif_mysqli_stmt_execute':
/usr/local/src/php-5.1.4/ext/mysqli/mysqli_api.c:601: error: 'gptr' undeclared (first use in this function)
To fix this, either upgrade to 5.2.4, or if you’re left with no choice such as myself edit php-5.1.4/ext/mysqli/mysqli_api.c and replace all occurrances of gptr with char*
That ought to get you through the rest of the compilation provided that you’ve got the rest of your setup correct.
Posted in Webservers, php
September 5th, 2009 at 5:35 pm
Hello ,
I think the most stable PHP and Mysql Versions is PHP 5.2.10 and MySQL 5.2.10
September 6th, 2009 at 9:39 am
PHP 5.2.10 and PHP 5.3.0 are stable, and MySQL 5.1.38, but it’s a bit irrelevant at the moment as this post is going on 6 months old by now.