LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-09-2007, 04:59 AM   #1
Aurorius
LQ Newbie
 
Registered: Feb 2007
Posts: 20

Rep: Reputation: 1
MySQL Extension for PHP4


Hello everyone..

I've been trying to load my phpMyAdmin for the past few hours but failed because it says "Cannot load mysql extension". I'm using packages from linuxpackages.net (php-4.4.4-i486-3.tgz and mysql-4.1.14-i486-1.tgz).

Configure commands from phpinfo
Quote:
./configure' '--prefix=/usr' '--disable-static' '--with-apxs=/usr/sbin/apxs' '--enable-discard-path' '--sysconfdir=/etc' '--with-config-file-path=/etc/apache' '--enable-safe-mode' '--with-openssl' '--with-ldap' '--with-mhash' '--enable-bcmath' '--with-bz2' '--with-pic' '--enable-calendar' '--enable-ctype' '--with-gdbm' '--with-db4' '--with-imap-ssl=/usr/local/lib/c-client' '--with-imap=/usr/local/lib/c-client' '--enable-dbase' '--enable-ftp' '--with-iconv' '--with-dom' '--with-exif' '--enable-exif' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png' '--with-ttf' '--with-freetype-dir=/usr' '--with-gmp' '--enable-mbstring' '--with-curl=/usr' '--with-pcre-regex=/usr' '--with-mysql=shared,/usr' '--with-gettext=shared,/usr' '--with-expat-dir=/usr' '--with-xml' '--enable-wddx' '--with-mm=/usr' '--enable-trans-sid' '--enable-shmop' '--enable-sockets' '--with-regex=php' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--enable-memory-limit' '--with-tsrm-pthreads' '--enable-shared' '--disable-debug' '--with-zlib=/usr'
I've been searching from this forum and tried various things, but still failed. I've even tried compiling php myself, but it gets weirder. Could anyone please help ?
 
Old 02-09-2007, 07:26 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
I have no experience with this, but the message suggests that the problem lies with communication with MySQL. Have you configured your system to start the MySQL daemon?
 
Old 02-09-2007, 08:25 AM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
I see you have PHP configured to work with MySQL, but have you got MySQL installed/activated in your Apache installation?
Hopefully yes, but if not, make sure you have uncommented the MySQL (and) MySQLi Apache modules, and have set the port (default=3306), and restart Apache to re-read the httpd.conf.
It's been a couple months since I dealt with MySQL config, but I hope this helps a bit.
SV
PS- Check the Apache.org website and MySQL.net for further details.
 
Old 02-09-2007, 08:35 AM   #4
Aurorius
LQ Newbie
 
Registered: Feb 2007
Posts: 20

Original Poster
Rep: Reputation: 1
I just tried reinstalling all those packages.. this time using packages from slackware website. Still not working.

Quote:
Originally Posted by allend
I have no experience with this, but the message suggests that the problem lies with communication with MySQL. Have you configured your system to start the MySQL daemon?
I can assure you that I've started the daemon. I can query the database. I just can't load the extension for PHP. I can't find mysql section in phpinfo even though the configure command did put --with-mysql.

Quote:
Originally Posted by GrapefruiTgirl
I see you have PHP configured to work with MySQL, but have you got MySQL installed/activated in your Apache installation?
Hopefully yes, but if not, make sure you have uncommented the MySQL (and) MySQLi Apache modules, and have set the port (default=3306), and restart Apache to re-read the httpd.conf.
It's been a couple months since I dealt with MySQL config, but I hope this helps a bit.
SV
PS- Check the Apache.org website and MySQL.net for further details.
I don't think my PHP has been configured to work with MySQL because there's no MySQL section in my phpinfo(); I thought Apache has nothing to do with MySQL (at least for this case) ? But I'll check the docs.

Last edited by Aurorius; 02-09-2007 at 08:39 AM.
 
Old 02-09-2007, 12:48 PM   #5
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Yeah, apache does have 'something' to do with MySQL, more-so perhaps than PHP does. Basically, PHP is the go-between between MySQL and Apache, in the majority of server applications. It will be you or your users accessing the MySQL data, either directly or indirectly. Directly,as an example, is with a website which uses a database; and indirectly is where something behind the scenes, like a user/password database with which the server (Apache) verifies users' identities.
MySQL is like a large extension of the Apache server in these cases.
You need the MySQL modules in the PHP setup, you are correct. But also, MySQL/MySQLi has to be enabled in Apache in order to interact with the database.
 
  


Reply

Tags
phpmyadmin



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
suse php4 extension modules wooot Linux - Networking 1 07-18-2005 07:30 AM
PHP4-MySQL TehIan Linux - Software 2 06-30-2005 01:51 PM
PHP difference between --without-mysql and extension=mysql.so progressdll Linux - Software 0 10-14-2004 07:44 AM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
RedHat8->Apache2->PHP4->Extension (_Unwind_Resume) problem TimeSaver Programming 0 03-19-2003 01:07 PM

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

All times are GMT -5. The time now is 02:21 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
Open Source Consulting | Domain Registration