July 26, 2014, 03:09:35 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Fatal error: Call to undefined function: mysql_connect()  (Read 20643 times)

Offline jaishal

  • Linux Noob !
  • *
  • Posts: 19
Fatal error: Call to undefined function: mysql_connect()
« on: October 16, 2004, 06:57:53 AM »
hey all
i m facing this problem
can anyone help me plz

Fatal error: Call to undefined function: mysql_connect()

in response of this  i tried to cnfigure the mysql again through the command

./configure --with-mysql \


it shows that

-bash: ./configure: No such file or directory

wat should i do.....?????? can any one help me plz :(

Offline jaishal

  • Linux Noob !
  • *
  • Posts: 19
./configure command is not working
« Reply #1 on: October 18, 2004, 07:08:41 AM »
no one here to help me out .......?????? :shock:

plz help me ./configure is not working and shows the error

-bash: ./configure: No such file or directory

plz help me ...i found that mysql is install but not configured and i want to configure mysql in redhat 8
help me plz ..........its very urgent...... hope the masters come to help me... and how do i solbe the problem.?? :cry:

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Fatal error: Call to undefined function: mysql_connect()
« Reply #2 on: October 18, 2004, 10:53:34 AM »
THat is not the command to use when u configure mysql.

./configure is used to configure ur c scripts before compiling ur programs.

AND

It doesn't work coz u must be in the source folder of mysql  to do that.

If u have installed mysql,  make sure u started the service. Else it wont work.

Now, to solve ur problem.

1. Check ur mysql service is running. To do that, type:

     service mysqld status
---> U should see mysqld is running or u can start it by typing;
        "service mysqld start"

2. If it's started, type "mysql" and u will reach the "mysql>" prompt.

U r doing php and i believe ur mysql is not running or there is sth wrong with ur script friend. ;)

Offline mudface

  • New Member
  • Posts: 2
Fatal error: Call to undefined function: mysql_connect()
« Reply #3 on: January 04, 2005, 11:49:49 AM »
Hi, i know its my first post, and that this thread has been inactive for a while, and that this problem has probably already been solved but:

I have just installed linux on a server and have got it all working etc etc accept i got that error when running a mysql_connect() function, i have yet to find the exact solution, but what the problem is, is that whe you install php/mysql manualy on a machine you do mysql first then php so that php configures it self to run with that mysql server. The problem with some versions of linux (i am using mandrake 10.1) is that they install php then mysql so php isn't configured to run with mysql. you can tell this if this is your problem by running

<?php
phpinfo();
?>

if there is a section on mysql then this isnt your problem, but if there is not mysql section it isnt set up properly. I am now working on a way to re-install php so it can see mysql.

Hope this helps

Offline 0511_martin

  • New Member
  • Posts: 1
Solution: activate the module in php.ini
« Reply #4 on: June 10, 2005, 09:56:23 AM »
As written before, check phpinfo() for the mysql section. If not present, have a look at your php.ini (find it with `locate php.ini` or try /etc/php4/apache/php.ini)

find the section
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

and uncomment or add:

extension=mysql.so

the same applies for the gd extension (if you would like to use it):
extension=gd.so

restart apache and thats it

Offline marklassoff

  • New Member
  • Posts: 1
Sounds like you need to install the PHPX-MYSQL library
« Reply #5 on: February 05, 2006, 12:19:41 AM »
It sounds like you need to install the PHPx-mySQL library for your particular version of PHP.  

The PHP install alone doesn't recognize mySQL commands unless the appropriate library is installed.  You can, however, get into the mySQL command line and create databases, change the, query, etc., however can't from PHP unless you have the library installed.

Mark Lassoff
Web Design, Coding and Training
marklassoff@gmail.com