473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Totally lost! "Fatal error: Call to undefined function: mysql_connect()"

Hi,

I'm a noob with a server so keep that in mind :) Been trying to connect
with php to mysql and all I get is:

"Fatal error: Call to undefined function: mysql_connect()"

I've read and read and can't figure out what is wrong. My current set
up is:

# rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent

# rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent

On RedHat 3.2ES

Can someone please help? I've been trying for 2 weeks now and I still
don't know what to do. TIA!

Jan 15 '06 #1
5 2758
Is this from the command line, or from a browser-driven app? If the
former, this is usual, as MySQL ab are doing stupid things with licensing.

If you wand mysql support from the command line, you'll have to roll your
own.

Steve

On Sun, 15 Jan 2006 09:01:12 -0800, awdsites wrote:
Hi,

I'm a noob with a server so keep that in mind :) Been trying to connect
with php to mysql and all I get is:

"Fatal error: Call to undefined function: mysql_connect()"

I've read and read and can't figure out what is wrong. My current set
up is:

# rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent

# rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent

On RedHat 3.2ES

Can someone please help? I've been trying for 2 weeks now and I still
don't know what to do. TIA!


Jan 15 '06 #2
thanks steve, but I need specifics to get this thing going.
Is this from the command line, or from a browser-driven app?


not sure what you mean there, but mysql is on my server that I use
webmin to administer, but I'll happily go command line if that will get
things working

Jan 15 '06 #3
aw******@gmail.com wrote:
Hi,

I'm a noob with a server so keep that in mind :) Been trying to connect
with php to mysql and all I get is:

"Fatal error: Call to undefined function: mysql_connect()" ==snip== # rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent


I haven't worked with PHP4 in quite a while, but I seem to remember that you
have to enable the mysql.so extension in your php.ini file. On PHP5 that
isn't necessary any more.
$ locate php.ini
/etc/php/apache2-php5/php.ini
^^^ This will be different for you.
--- The mysql.so extension should be listed in the file, you just uncomment
it.
$ grep mysql.so /etc/php/apache2-php5/php.ini
--- Now use a text editor to open that file and uncomment the correct
line(s)
--- Then you restart your apache
$ su
Password:
# apachectl restart

That should have you fixed up :)

Albe
Jan 16 '06 #4
thanks, tried that and still no luck. still getting the fatal error...

Jan 16 '06 #5
I've just been told it is because I need to change this:

'--with-mysql=shared,/usr'

to this:

'--with-mysql=/var/lib'

does that seem correct? if so, how the heck do I do that *exactly*
without screwing up all the other php settings?

Jan 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ronald W. Roberts | last post by:
I'm not sure where this routine came from, but here is the problem. On certian computers this error occurs, but it does not on others. The error is: "Undefined Function "DIR" in expression". ...
9
by: sam.s.kong | last post by:
Hello! I have a very basic question. a.c: <code> #include <stdio.h> main()
9
by: java | last post by:
Hey there, I just removed an elderly PHP4-Installation from my Windows-Box and installed PHP 5.2.1. I used the PHP4-Module as local batchfile- interpreter by E:\ersDHCP>php ./extractLog.php ...
3
by: MLH | last post by:
I got this error twice in 72-hours. Each time, a different global procedure was not found. One was being used in an SQL statement and the other in a Set stmt in DAO routine. Both FNs, of...
3
patjones
by: patjones | last post by:
Good morning all: In what seems like an ongoing saga to make the DSum function do what I need it to, I am now having trouble with a user-defined function in my VBA module. Here's the offending...
6
by: blackdogharry | last post by:
Hi, I am a novice VBA user. My access version is 2007 on Windows XP PC. I need to create a query that will take pre-existing text values of the B_status field (such as "Received_Emailed",...
2
by: CCHDGeek | last post by:
I created a database with a separate front-end that is installed on each computer and linked to a back-end server. After installing the file on several computers, I realized I was getting this...
0
by: Sebastian | last post by:
Hello I develop my applications in Access 2002. My development system is running Windows XP SP2 and I have Microsoft Office XP Developer. Microsoft Office XP is at SP3. I used Inno Setup (great...
4
by: William Hamilton | last post by:
Hi all, Hoping someone might be able to point me in the right direction with getting the code below to work properly. Effectively, the code: Requerys the listbox in lstPrintCheckedStaff...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.