PHP 5.x MySQL 4.1
| From: | NFO \(Norman Fox\) | Date: | Mon, 18 Apr 2005 16:37:33 +0000 |
| Subject: | PHP 5.x MySQL 4.1 | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969367891@lists.php.net to get a copy of this message | ||
OK so I develop in an Apache/PHP/MySQL/WinXP environment but production is on a Unix box. We
recently switched production to MySQL 4.1. So I upgraded my development copy. According to you
current documentation I need to be running mysqli to realize the full functionality of 4.1. Ok fine
I switched my module to mysqli. Fortunately I'm using PEAR:DB for my db communication and have
one central connection file so changing that from mysql to mysqli was relatively painless, but the
thousands of lines of code with mysql_escape_string are not working, and a simple find and replace
function will not work because mysqli_escape_string requires different parameters (yes I can and
will replace it with addslashes, but I've always felt mysql_escape_string was more robust for
MySQL).
So first this is a bit of a cathartic rant after 1+ weeks of on and off attempting to get my
development environment to function with my production environment (I can't be the only one out
there whose sandbox runs on their local windows box, but runs production on a Unix server).
Second could you please elaborate on the following (perhaps with a few examples that are more
detailed than those in the mysqli comments:)
If you would like to install the mysql extension along with the mysqli extension you have to use the
same client library to avoid any conflicts.
I can't believe it never occurred to you that backwards compatibility would be useful
thanks,
Norm Fox
DBA, ZymoGenetics, Inc.