Upgrade to MySQL-5.0.18 breaks PHP mysql functions
I need to run mysql5 on a Slackware 10.2 box (with all latest security patches).
I've done the following...
which seems to have cured most problems but I cannot now access mysql from within a php web page. I get the following error when apache starts...
PHP Warning: Unknown(); Unable to load dynamic library '/usr/lib/php/extensions/mysql.so' - libmysqlclient.so.14: cannot open shared object file: No such file or directory in Unknown on line 0
This seems to indicate that the php-4.4.2-i486-3 package is expecting mysql4 not mysql5.
Anyone had the same problem and found a work around or know what I need to recompile?
Thanks for any help,
try compiling PHP from source and add --with-mysql=/path/to/MySQL
it worked for me :D
Thanks willysr, tried that but the compiled php4 didn't work very well. Not sure what I did wrong yet. :confused:
However, have discovered a working upgrade path using packages in slackware-current. It does use the php5 in /testing but that seems to be working on everything I've tried as yet.
Upgrade went as follows...
*modified /etc/mod_php.conf to LoadModule php5_module libexec/apache/libphp5.so instead of php4
I now have a working mysql5 and php5 web server! :D
congratulations, but it strange that it worked for me and didn't for you. Perhaps you missed some parameter. What kind of parameter did you have on your configure script??
MySQL 5 with PHP 5
I just did this on Slackware 10.2 (su or logged in as root for all this)
99% of the time I manually install via configure, make, make install. Usually I have been following the latest Apache and PHP, and using MySQL 4.1.x. But have decided to make the jump to MySQL 5.0.x
On a new server, I manually installed Apache 2.0.55 (Often use 2.2.x as well)
./configure --prefix=/usr/local/apache2 --enable-so --enable-ssl
edit your httpd.conf (Sorry I am not covering this in detail here.)
Then I tried manually compiling MySQL 5.0.20a and also tried the general linux binary, but couldn't get php5 to compile with support for it working. So I broke down and found the slackware package for it.
installed mysql-5.0.20a-i486-1.tgz using pkgtool
then followed these post install instructions: http://dev.mysql.com/doc/refman/5.0/...tallation.html
Which is basically:
bin/mysqld_safe --user=mysql &
check that it's running and connection works:
setup a password
/bin/mysqladmin -u root password 'newpassword'
If these steps don't work, you might have to do this:
chown -R root mysql
chown -R myusername mysql
chown -R mysql mysql
Once MySQL 5.0.20a is installed and working from the package install, move on.
PHP 5.1.2 source install:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib --with-bz2 --with-openssl --with-https --with-ftps --enable-mbstring
edit your php.ini file (sorry I am not covering this in detail here)
Make sure Apache and MySQL are started, do a phpinfo() to make sure you see:
Client API version 5.0.20a Listed in the mysql section
Also make sure it shows the php.ini path you expect and that it shows the correct Apache version and path as well.
And to finish up, I installed phpmyadmin 2.7 (because I don't like the current 2.8 right now) and make sure phpmyadmin can connect and works. This will verify that php5 and mysql5 are working together. --enable-mbstring is so you can properly do utf-8 if you ever need to. And it keeps phpmyadmin from having a notice about mbstring not being enabled.
i use a source code version for my PHP and everytime there is a newer MySQL from Slackware repository, i upgrade the MySQL first and then i recompile my PHP to reflect the new MySQL library from the newer MySQL.
|All times are GMT -5. The time now is 09:13 PM.|