Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-26-2005, 09:49 AM   #1
Registered: Dec 2004
Location: Georgetown, DE
Distribution: Gentoo (Kernel-2.6.18-gentoo-r5, customized :))
Posts: 101

Rep: Reputation: 15
mysql and apache not working quite right

I have set up an apache server and added a module for php4, and these seem to be working okay. But now I seem to be having trouble with mysql. I am trying to set up the program web AimSniff, which uses php scripts to run, but when I attempt to view the file index.php (used by AimSniff) I get the following error:

Fatal error: Call to undefined function: mysql_connect() in /var/www/was/.global.php on line 5

I have no idea what this means or how to fix it.

P.S. Here is some information that may help you help me:

OS: SimplyMEPIS (Debian based distro)
Apache server: Version 1.3.33
Php: version 4.x <--not sure of exact version (4.3.10-9 I think)
Mysql: version 4.x <--not sure of exact version (4.0.24 I think)
Browser: Firefox

To the best of my knowledge, apache and the php module for apache are running correctly. The mysql server is also running, but as is evident, it doesn't appear to be working quite right. Either that, or I've configured something wrong for apache.

Thanks much,

Jeremy Davis Pedersen
Old 03-26-2005, 12:49 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
The problem appears to be with your PHP installation.

a) Apache needs to talk to PHP, and
b) PHP needs to talk to mySQL, and
c) mySQL manages your data.

Please try the following:
1. Check your "phpinfo ();" output
2. Make sure you don't have a second, different
installation of PHP on your system
3. Consider re-building/re-installing PHP. Make sure you explicitly enable mySQL support (this *should* be the default)

'Hope that helps .. PSM
Old 03-26-2005, 03:47 PM   #3
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
First of all configure php.ini to load mysql extension.
And then, you have to configure the mysql server name, database name, username, password properly on AImSniff script files. The file to make changes is /var/www/was/.global.php
Edit this file and make necessary changes.
Other things to consider,
Make sure mysql server is running.
A databse is created for AimSniff or whatever it is.

Plzz post back if you need further help.
Old 03-26-2005, 04:24 PM   #4
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi again, shortname. With all due respect to evil_empire, I think you're picking up a version of PHP that wasn't built to support mySQL. If that's true, modifying php.ini won't help at all - you'll need to either rebuild it, or find a pre-built binary with mySQL support.

This link might help clarify things:

In any case, please:

1. Check your "phpinfo();" output.
2. Make sure you don't have some "rogue version" of PHP that your Apache server isn't picking up, instead of the one you intended.
3. Rebuild and reinstall (explicitly specifying "--with-mysql" in your "configure" script.

Your .. PSM


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
Apache not working after installing mysql and php alaateb Linux - Networking 6 04-22-2005 09:24 AM
[9.1 pro] Apache, MySQL & PHP ... not working! Dannyarr SUSE / openSUSE 5 10-17-2004 02:42 PM
php, mysql, apache not working together like expected atheist Debian 2 09-06-2004 11:48 AM
PHP not working with Apache, nor mysql wldkos Linux - Software 18 05-16-2003 12:23 PM
MySQL (not working with Apache on first boot) Rhapsodic Linux - General 2 10-24-2002 07:46 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:44 AM.

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