November 22, 2024, 04:27:03 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: mysql problem  (Read 14179 times)

Offline redskin

  • New Member
  • Posts: 1
mysql problem
« on: November 11, 2004, 11:38:59 PM »
gday

I recently setup a new server at work with the following details

debian         testing sarge
kernel         2.6.9 no patches
hardware       i386

libdbd-mysql-p 2.9003-3
libmysqlclient 3.23.56-2
libmysqlclient 4.0.22-2
mysql-client   4.0.22-2
mysql-common   4.0.22-2
mysql-server   4.0.22-2
php4           4.3.9-1
apache         1.3.33-1

The programmer put the db on there and it was working fine
then all of a sudden we get this error

Fatal error: Call to undefined function: mysql_connect() in /home/apache/www/admin/dbtable.php on line 8

This is line 8

Fatal error: Call to undefined function: mysql_connect() in /home/apache/www/admin/dbtable.php on line 8

Ive restarted apache and mysql can quite configure out firstly
if its a apache php mysql or system error

Any help would be greatly appreciated
thanks

Paul
Cable Layers WA :)

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
mysql problem
« Reply #1 on: November 13, 2004, 10:29:29 AM »

Offline nih

  • New Member
  • Posts: 3
mysql problem
« Reply #2 on: November 26, 2004, 10:13:15 PM »
Quote from: "Ricky"
Is this the solution for you ? ---> Fatal error: Call to undefined function: mysql_connect()

I and many others have the same problem, it's something to do with a recent build of Sarge cocking things up.

The symptoms are: basically everything obvious is set correctly and mysql is running. I'm also using this guide as a starting point.

My setup is apache2, php4 and mysql.

Has anyone found a solution for this one yet?

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
mysql problem
« Reply #3 on: November 27, 2004, 09:13:32 AM »
hmm.
What I think is that it is PHP error not the mysql error!
I think I found the reason, I think you are using PHP 5  which don't contains mysql client library and that is why there is undefined funtion error..

What you have to do is reinstall php using source ie not rpm with proper method, you can find that in php 5 installation manual !

Offline nih

  • New Member
  • Posts: 3
mysql problem
« Reply #4 on: December 18, 2004, 11:37:43 PM »
Quote from: "Ricky"
hmm.
What I think is that it is PHP error not the mysql error!
I think I found the reason, I think you are using PHP 5  which don't contains mysql client library and that is why there is undefined funtion error..

What you have to do is reinstall php using source ie not rpm with proper method, you can find that in php 5 installation manual !

In actual fact I am using the current stable release of PHP 4.

In the end I gave up and moved to Fedora Core 3 and all my problems disappeared.

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
mysql problem
« Reply #5 on: December 19, 2004, 08:49:16 AM »
Quote from: "nih"
Quote from: "Ricky"
hmm.
What I think is that it is PHP error not the mysql error!
I think I found the reason, I think you are using PHP 5  which don't contains mysql client library and that is why there is undefined funtion error..

What you have to do is reinstall php using source ie not rpm with proper method, you can find that in php 5 installation manual !

In actual fact I am using the current stable release of PHP 4.

In the end I gave up and moved to Fedora Core 3 and all my problems disappeared.
It is so b'coz your fedora core 3 consist of php with all the required library ~

Offline nih

  • New Member
  • Posts: 3
mysql problem
« Reply #6 on: December 19, 2004, 10:27:47 AM »
Quote from: "Ricky"
Quote from: "nih"
Quote from: "Ricky"
hmm.
What I think is that it is PHP error not the mysql error!
I think I found the reason, I think you are using PHP 5  which don't contains mysql client library and that is why there is undefined funtion error..

What you have to do is reinstall php using source ie not rpm with proper method, you can find that in php 5 installation manual !

In actual fact I am using the current stable release of PHP 4.

In the end I gave up and moved to Fedora Core 3 and all my problems disappeared.
It is so b'coz your fedora core 3 consist of php with all the required library ~

That's right. I was surprised at how nice Fedora was to set up. It still had a few problems, but not nearly as many as Debian Sarge.

I had avoided anything Redhat previously because I'd been told Redhat stuff in general wasn't as pleasant as Debian - quite frankly apart from some installers and some wizards to an end user they're damn near identical.

I would strongly urge anyone who feels out of their depth with other distros to try Fedora. It's not a lightweight OS - just easier to set up.

Offline mudface

  • New Member
  • Posts: 2
mysql problem
« Reply #7 on: January 04, 2005, 11:53:29 AM »
Checkout URL Fatal error: Call to undefined function: mysql_connect() again i posted a half solution there and am working on the rest of it.

Offline wrodrigues201

  • New Member
  • Posts: 1
Got it to work with Debian Sarge.
« Reply #8 on: May 03, 2005, 04:37:21 AM »
Got it to work with Debian Sarge.

Added to php.ini

extensions = mysql.so

Commented out the following.
;extension_dir = /usr/lib/php4/20020429-zts/
;include_path = ".:/usr/share/php"