note 47531 deleted from ref.mysqli by sean
| From: | sean@php.net | Date: | Fri, 19 Nov 2004 16:32:56 +0000 |
| Subject: | note 47531 deleted from ref.mysqli by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80759@lists.php.net to get a copy of this message | ||
Note Submitter: sergio dot vaccaro at hujuice dot info
----
Take care when deciding to upgrade to MySQL 4.1!
Many new features in MySQL 4.1.+ will create a lot of problems to folks interested to keep the
functionality of programs written thinking to MySQL 4.0.-.
A different client-server authentication method force you to use a different set of functions. In
other words, you will have to rewrite all your programs!
--
I will tell here my (hard) work to install the triad Apache (2.0.52), Php (5.0.2) and MySQL 4.1.7 on
a Win2k OS (my own development machine).
I did't try, at this time, to install on Unix machines.
First, I followed the instruction. As in documentation, the extension for the mysql (php_mysq.dll, I
thought..!) is disabled in the default php.ini.
Well: I did activate it. Without success.
The error in restarting Apache (Unable to load the library) was caused by the lack of the
libmysql.dll. To resolve I wrote at the end of my PATH system variable the path of the library on my
filesystem.
BE CAREFUL! Not the path of the libmysql.dll provided by the MySQL, but the path of the libmysql.dll
provided by Php (e.g. c:\php).
Take care, because every time you change the path you have to restart the system or give also the
instruction "path c:\Php\;%path%" on the command prompt. (Take care again, because if you
omit the final %path% you can loose the previus values of PATH.)
That's all? Surely not.
It works fine, but the different authentication method of MySQL 4.1.+ needs different functions to
dialog with MySQL, and also a different library!!
So, come back to the php.ini and change the "extension=php_mysql.dll" into
"extension=php_mysqli.dll" (note the slim "i" before the dot) and restart
Apache.
And now, all the functions you'll use to write programs are that ones displayed in http://www.php.net/manual/en/ref.mysqli.php
(this page) and not the previous (http://www.php.net/manual/en/ref.mysql.php). So, let rewrite all
the programs!
Also, surely you can desire to have, on one machine, many programs that have to dialog with several
remote MySQL servers. Some of them performing versions *before* 4.1 and others executing the new
versions! Came back to the php.ini again, so. Next to "extension=php_mysqli.dll" (re)write
a line "extension=php_mysql.dll" (without the slim "i") to let the old functions
work..
Be kind with my english.
Have a nice life.. :)
HUjuice