By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,727 Members | 768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,727 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
thanks, tried that and still no luck. still getting the fatal error...

Jan 16 '06 #5

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.