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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-09-2004, 12:58 AM
|
#1
|
Member
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316
Rep:
|
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.
|
|
|
04-09-2004, 03:25 AM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Do you have mysql enabled for php? Check your php.ini file first..
|
|
|
04-09-2004, 11:23 AM
|
#3
|
Member
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316
Original Poster
Rep:
|
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 11:27 AM.
|
|
|
04-09-2004, 01:58 PM
|
#4
|
Member
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420
Rep:
|
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)
|
|
|
04-09-2004, 04:23 PM
|
#5
|
Member
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316
Original Poster
Rep:
|
http://64.53.159.50/phptest.php
Yeah I created that before here it is
|
|
|
04-09-2004, 04:59 PM
|
#6
|
Member
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420
Rep:
|
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 05:02 PM.
|
|
|
04-09-2004, 07:34 PM
|
#7
|
Member
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316
Original Poster
Rep:
|
ight but I'm using debian so I do apt-get remove php right?
|
|
|
04-09-2004, 08:07 PM
|
#8
|
Member
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420
Rep:
|
ive never used debian but yeah which ever you use to uninstall apps
|
|
|
04-12-2004, 01:58 PM
|
#9
|
Member
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316
Original Poster
Rep:
|
I already have apache2 installed I did apt-get install apache2 with Deb. Do i have to reinstall that too?
|
|
|
04-26-2004, 11:23 AM
|
#10
|
Member
Registered: Apr 2004
Distribution: Debian
Posts: 80
Rep:
|
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)
|
|
|
04-26-2004, 04:50 PM
|
#11
|
Member
Registered: Feb 2004
Distribution: Ubuntu
Posts: 316
Original Poster
Rep:
|
it's okay I jus reloaded everything and it's all working well
http://quacktasticquotes.kicks-ass.org
|
|
|
04-02-2005, 06:37 AM
|
#12
|
LQ Newbie
Registered: Apr 2004
Location: Earth
Distribution: Slackware 10, FreeBSD 4.10
Posts: 19
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 10:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|