LinuxQuestions.org
Help answer threads with 0 replies.
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 08-04-2004, 08:21 AM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
Mysql module.. confused =/


Lo all,

Firstly, my system consists of
Slack 10
Apache 2.0.50
Mysql 4.0.20
php-apache2 4.3.8 (from linuxpackages.net)

Everything used to work on my system, untill i tried upgrading to php 5, then downgrading back to php 4.3.8., where mysql doesn't want to work anymore from php. (eg, phpbb). After checking around, i noticed mysql is not showing in phpinfo() (see for yourself if you want at http://xushi.co.uk/test.php ).

After reading some of the threads in LQ (especially the ones which tell of the difference between php4 and php5) it just confused me a bit more... Does anyone know how to just allow apache<>php to interact with mysql again? or to load the mysql module once more?


On a side note, someone suggested to revert back to apache 1.3, because 2 is still experimental, or something like that... Do you all recommend to roll back, or to stick to the current versions i have?

Thank you please =)
 
Old 08-04-2004, 08:44 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
Frankly, I would recommend you to use mysql, php, apache from official slackware packages, they are stable and can be used in a production environment.

Specially for servers, I always use official packages for my part and I installed one time Apache 2 proprely, compiling it myself with good options, and I noticed no additional performances so I use Apache 1.3 from official package for now.
 
Old 08-04-2004, 09:00 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
hmm, still i'd like to solve the problem before reverting back to slackware's preffered versions.

It seems like a good idea, especially when swaret screwes up everything everytime mysql or apache gets updated.
 
Old 08-06-2004, 12:04 PM   #4
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Help guys, i'm really confused now... i reinstalled apache, and php-apache2 (this one http://www.linuxpackages.net/pkg_details.php?id=3904 ) (configured with mysql '--with-mysql=shared,/usr' ) , but if you look in
http://xushi.co.uk/test.php it still wont display mysql there.

Mysql is installed and running, if i
ps -ef, its there (10 of them)
00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/xushi.pid --skip-locking --port=3306 --socket=/tmp/mysql.sock
as well as
00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/xushi.pid

I don't know what i'm missing.. but it seems like its something small and very irritating. Any help is appreciated.
 
Old 08-06-2004, 02:12 PM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
What is the output for :
Code:
php -r 'echo mysql_connect();'
 
Old 08-06-2004, 04:46 PM   #6
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
The output:

PHP Fatal error: Call to undefined function: mysql_connect() in Command line code on line 1

And from the tone of it i guess it meens bad news... heh excuse linda (my box's name)... she's been lonley for a few months =)
 
Old 08-07-2004, 05:12 AM   #7
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Thanks Cedrik, i used the error i got from your code as a base for my search, and it led me to get the answer =)

For all you out there who have the same problem, it usually happens when you upgrade or reinstall php (or php-apache2)

firstly you need to add the line in php.ini
extension=mysql.so
if its not there... (search for it). I didn't have it, and that was the main problem.

secondly locate where mysql.so is (incase you start getting errors when starting up apache),
locate mysql.so

mine was in /usr/lib/php/extensions

edit /etc/apache2/php.ini and edit the line to look like
extension_dir = "/usr/lib/php/extensions/"

Thats it.
Thanks for the tips everyone, and hope this helps.

Last edited by xushi; 08-07-2004 at 05:13 AM.
 
Old 08-07-2004, 07:51 AM   #8
Lars79
Member
 
Registered: Jan 2004
Distribution: Slackware
Posts: 96

Rep: Reputation: 15
Just wanted to add something I discovered the last days which is a quite similar problem.

I had a fresh install of Slackware 10 with precompiled Apache 1.3.31 and PHP 4.3.7 (added those packages during installation). I dowloaded the MySQL binaries and started Apache and the MySQL server. The settings xushi postet were set exactly that way. Even though phpinfo() doesn't show MySQL. The problem was that the precompiled PHP used static libraries while the MySQL binaries used dynamic ones. The solution was to download the MySQL sources, ./configure with --enable-shared and compile. Works great then...

Maybe that helps someone...
 
  


Reply


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
mysql module not loaded Die Woud Linux - Networking 1 11-12-2005 02:30 AM
confused on php and Mysql install spedsta Linux - Software 3 11-05-2004 01:36 PM
MySQL Module vladimir-dk *BSD 0 09-12-2004 06:56 AM
Apache MySQL module vladimir-dk Linux - Software 8 04-01-2004 02:39 AM
Confused with mySQL leetcrew Linux - Software 11 03-12-2004 11:06 PM

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

All times are GMT -5. The time now is 09:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration