LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-27-2004, 03:49 PM   #1
Lars79
Member
 
Registered: Jan 2004
Distribution: Slackware
Posts: 96

Rep: Reputation: 15
Problem with MySQL 4.1.7 and PHP 5.0.2


Hello,

I have a weird problem concerning MySQL 4.1.7. I had a working system with Apache 1.3.32, PHP 5.02 and MySQL 4.0.20. Everything worked (also phpMyAdmin). Because the PHP version was compiled with shared libraries, I had to compile MySQL from source with the appropriate flag and installed it with checkinstall.

Now I wanted to upgrade MySQL to the latest stable release (4.1.7). I removed the MySQL package with removepkg, deleted the /usr/local/mysql folder and compiled MySQL 4.1.7 from source. Everything went fine. I then created the grant tables with

/usr/local/mysql/bin/mysql_install_db

The path to the dynamic libraries in /etc/ld.so.conf already existed

/usr/local/mysql/libmysql

so I didn't do anything with that (in the end I even ran ldconfig again just to be sure =)). PHP should also be configured (as I mentioned above, I already had a running installation). I have the following lines in /etc/apache/php.ini:

extension_dir = "/usr/lib/php/extensions/"
extension=mysql.so

The file mysql.so also exists in /usr/lib/php/extensions/ and is also executable:

-rwxr-xr-x 1 root root 44828 Sep 25 15:19 mysql.so*

But the problem is whenever I try to run phpMyAdmin I get the following error:

cannot load mysql extension,
please check PHP Configuration
Documentation

phpinfo() also doesn't show MySQL anymore. The server is running correctly. I can also access it with other languages, for example with Java and JDBC. No errors there.

I really have no clue what's missing, especially because everything worked before the upgrade. I also looked through the MySQL manual, but couldn't find anything related to my problem. Maybe someone can help me with that. Thanks a lot =).

Lars

Last edited by Lars79; 10-27-2004 at 03:54 PM.
 
Old 10-27-2004, 03:52 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Have you restarted apache since the mysql install?
 
Old 10-27-2004, 03:55 PM   #3
Lars79
Member
 
Registered: Jan 2004
Distribution: Slackware
Posts: 96

Original Poster
Rep: Reputation: 15
Thanks for the fast reply. Yes I did. It wasn't running during the whole process.
 
Old 10-27-2004, 05:30 PM   #4
Lars79
Member
 
Registered: Jan 2004
Distribution: Slackware
Posts: 96

Original Poster
Rep: Reputation: 15
Forgot something. These are the flags with which I compiled MySQL:

./configure --prefix=/usr/local/mysql --enable-shared --enable-static --with-embedded-server

Maybe it has something to do with, even though I used the same for the old version that worked.
 
Old 10-28-2004, 08:09 AM   #5
Lars79
Member
 
Registered: Jan 2004
Distribution: Slackware
Posts: 96

Original Poster
Rep: Reputation: 15
I guess I know what's wrong. After some more reading I found out that MySQL 4.1.x doesn't use the mysql-extension but the mysqli-extension. I always upgraded my PHP versions with the packages from linuxpackages. I'm afraid they are not compiled with mysqli-support. So I think I have to compile PHP from source.

Thanks anyway.
 
  


Reply



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
PHP/MySQL Problem! SpiderIRE Programming 3 10-19-2005 11:24 AM
php-mysql problem need help productive Linux - Software 1 04-28-2005 02:27 PM
MySQL/php problem Basslord1124 Fedora 11 03-06-2005 02:44 PM
Problem getting PHP to recognize MySQL, Using PHP 4.0 and MySQL 4.0.20 d2army Programming 4 06-27-2004 08:54 PM
MySQL / PHP problem jjd228 Linux - Software 5 03-15-2004 10:28 AM

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

All times are GMT -5. The time now is 10:26 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