LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-16-2006, 05:39 PM   #1
MarkVickers
LQ Newbie
 
Registered: Nov 2002
Location: United Kingdom
Distribution: Slackware Current
Posts: 13

Rep: Reputation: 2
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...
upgradepkg mysql-5..18-i486-1.tgz
upgradepkg apache-1.3.34-i486-2.tgz
upgradepkg db4-4.2.20-i486-1.tgz
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,
Mark
 
Old 03-16-2006, 06:51 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,870

Rep: Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913
try compiling PHP from source and add --with-mysql=/path/to/MySQL
it worked for me
 
Old 03-17-2006, 03:12 AM   #3
MarkVickers
LQ Newbie
 
Registered: Nov 2002
Location: United Kingdom
Distribution: Slackware Current
Posts: 13

Original Poster
Rep: Reputation: 2
Thanks willysr, tried that but the compiled php4 didn't work very well. Not sure what I did wrong yet.
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...
*upgragepkg mysql-5.0.18-i486-1.tgz
*upgradepkg apache-1.3.34-i486-2.tgz
*upgradepkg db4-4.4.20-i486-1.tgz
*upgradepkg php-5.1.2-i486-2.tgz
*installpkg openldap-client-2.3.17-i486-1.tgz
*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!
 
Old 03-17-2006, 03:20 AM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,870

Rep: Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913
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??
 
Old 05-02-2006, 09:22 AM   #5
xenon2000
LQ Newbie
 
Registered: Sep 2004
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
Lightbulb 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
make
make install
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/mysql_install_db --user=mysql
bin/mysqld_safe --user=mysql &

check that it's running and connection works:
bin/mysqladmin version

setup a password
/bin/mysqladmin -u root password 'newpassword'

If these steps don't work, you might have to do this:
cd /var/lib/mysql
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:
apachectl stop

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib --with-bz2 --with-openssl --with-https --with-ftps --enable-mbstring
make
make install
edit your php.ini file (sorry I am not covering this in detail here)
apachectl start

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.
 
Old 05-03-2006, 12:10 AM   #6
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,870

Rep: Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913Reputation: 1913
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.
 
  


Reply

Tags
apache, lamp, mysql, mysql5, php, php5, phpmyadmin, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 4 Issue with PHP not recognizing Upgrade to MYSQL DoubleAce3 Linux - General 0 02-17-2006 04:31 PM
enabling MySql functions in PHP luna6 Linux - Networking 1 02-12-2006 07:12 AM
php-mysql dependancy problem after nitemare mysql upgrade. RHEL4 andrewc Red Hat 1 01-03-2006 04:16 PM
cyrillic chars - should I upgrade mysql or php ojav Linux - Software 0 05-29-2005 04:46 AM
Upgrade mysql and php acrors Red Hat 1 08-31-2004 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration