LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2004, 11:58 PM   #1
compu73rg33k
Member
 
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316

Rep: Reputation: 30
php mysql_connect error


I'm using Debian and I got apache2 php4 and mysql all installed. I tried to install an invision forum. After I tried to make the forum this is the error I received:

Code:
Fatal error: Call to undefined function: mysql_connect() 
in /var/www/forum/sm_install.php on line 342
Now I know it's something wrong with the php. I installed the php4-mysql module thing and it's still not working.
 
Old 04-09-2004, 02:25 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Do you have mysql enabled for php? Check your php.ini file first..
 
Old 04-09-2004, 10:23 AM   #3
compu73rg33k
Member
 
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316

Original Poster
Rep: Reputation: 30
what do I look for?

I have three php.ini files which one do I wanna edit?
/etc/php4/apache/php.ini
/etc/php4/apache2/php.ini
/etc/php4/cgi/php.ini

Last edited by compu73rg33k; 04-09-2004 at 10:27 AM.
 
Old 04-09-2004, 12:58 PM   #4
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
make a file called phpinfo.php

inside type in:

<?php

phpinfo();

?>

save that and then give us a link to that (http://yourserver/phpinfo.php)
 
Old 04-09-2004, 03:23 PM   #5
compu73rg33k
Member
 
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316

Original Poster
Rep: Reputation: 30
http://64.53.159.50/phptest.php

Yeah I created that before here it is
 
Old 04-09-2004, 03:59 PM   #6
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
yeah you dont have php enable with mysql... i had the same problem

your going to have to recompile php

first:

cd /var/log/packages/
removepkg php*

that will remove php

and download the complete source code from http://www.php.net/downloads.php

and then follow the instructions here http://www.php.net/manual/en/install.apache2.php
to get the basic idea to configure/compile/install it

make sure you do :

./configure --with-mysql

to enable mysql when you get to that step

Last edited by Longinus; 04-09-2004 at 04:02 PM.
 
Old 04-09-2004, 06:34 PM   #7
compu73rg33k
Member
 
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316

Original Poster
Rep: Reputation: 30
ight but I'm using debian so I do apt-get remove php right?
 
Old 04-09-2004, 07:07 PM   #8
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
ive never used debian but yeah which ever you use to uninstall apps
 
Old 04-12-2004, 12:58 PM   #9
compu73rg33k
Member
 
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316

Original Poster
Rep: Reputation: 30
I already have apache2 installed I did apt-get install apache2 with Deb. Do i have to reinstall that too?
 
Old 04-26-2004, 10:23 AM   #10
Matt Collier
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 80

Rep: Reputation: 15
Like many other Debian pkgs, php4 is crippled by default for security purposes. mod_php4 doesn't have mysql support enabled, but it is compiled in as a loadable module.
All you have to do is open /etc/php4/apache2/php.ini and uncomment the line

extension=mysql.so

then reload apache2

(sorry for the very late reply, but i browsed in with a similar problem and i'm sure others may too, so this reply is mainly for google)
 
Old 04-26-2004, 03:50 PM   #11
compu73rg33k
Member
 
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316

Original Poster
Rep: Reputation: 30
it's okay I jus reloaded everything and it's all working well

http://quacktasticquotes.kicks-ass.org
 
Old 04-02-2005, 05:37 AM   #12
makko
LQ Newbie
 
Registered: Apr 2004
Location: Earth
Distribution: Slackware 10, FreeBSD 4.10
Posts: 19

Rep: Reputation: 0
well mine still aint working i get this error;

PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/mysql.so' - libmysqlclient.so.12: cannot open shared object file: No such file or directory in Unknown on line 0
[Sat Apr 2 14:36:50 2005] [notice] Apache/1.3.31 (Unix) mod_ssl/2.8.18 OpenSSL/0.9.7d PHP/4.3.9 configured -- resuming normal operations

and mysql.so is in that exact position, but for some reason apache aint seeing it. i'm on Slackware10 mysql 4.1.10a

regards,
Makko.
 
  


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_connect Guru - Install Question/Issue whohasit Programming 4 07-16-2004 06:28 PM
mysql_connect problem w/apache+php CodeCrush Linux - Software 0 05-24-2004 08:35 AM
PHP and MYSQL ("mysql_connect") smaida Programming 4 05-18-2004 05:27 PM
Redhat Enterprise AS, php-mysql-4.3.3-4.1.i386.rpm, mysql_connect() error apradhan Linux - Distributions 0 02-18-2004 03:11 PM
Redhat PHP 4.2 Problem, no mysql_connect() nehalem Linux - Software 1 11-20-2003 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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