471,078 Members | 831 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

PHP, MySQL & FC6

Hello group,

I've inherited a box running FC6.

The website I'm trying to copy across to it ran fine on FC5.. PHP &
MySQL were set up 'out-the-box' so the site just worked.

Somethings changed with FC6.

Trying to run the DB script now gives:

PHP Fatal error: Call to undefined function mysql_connect()

Looking at phpinfo();, the configure command has the switch
"--without-mysql" in it, which I figure is the root of my problem.

MySQL is definitely installed on the box, I've a database up and running
on that just fine. It can be accessed locally and remotely.

My question is, what's the simplest way to get PHP to recognise MySQL is
there to use? Preferably without breaking anything else (e.g., there's a
cron job that calls yum daily to do updates.. This must still work
afterwards!!)

Thanks for any pointers.
Apr 16 '07 #1
4 2497
noi
On Mon, 16 Apr 2007 05:23:27 +0100, martinf wrote this:
Hello group,

I've inherited a box running FC6.

The website I'm trying to copy across to it ran fine on FC5.. PHP & MySQL
were set up 'out-the-box' so the site just worked.

Somethings changed with FC6.

Trying to run the DB script now gives:

PHP Fatal error: Call to undefined function mysql_connect()

Looking at phpinfo();, the configure command has the switch
"--without-mysql" in it, which I figure is the root of my problem.

MySQL is definitely installed on the box, I've a database up and running
on that just fine. It can be accessed locally and remotely.

My question is, what's the simplest way to get PHP to recognise MySQL is
there to use? Preferably without breaking anything else (e.g., there's a
cron job that calls yum daily to do updates.. This must still work
afterwards!!)

Thanks for any pointers.
Are you sure it's MySQL and not PHP? Versions the same in FC5 vs FC6?

Apr 17 '07 #2
noi wrote:
>Somethings changed with FC6.

Trying to run the DB script now gives:

PHP Fatal error: Call to undefined function mysql_connect()

Looking at phpinfo();, the configure command has the switch
"--without-mysql" in it, which I figure is the root of my problem.

MySQL is definitely installed on the box, I've a database up and running
on that just fine. It can be accessed locally and remotely.

My question is, what's the simplest way to get PHP to recognise MySQL is
there to use? Preferably without breaking anything else (e.g., there's a
cron job that calls yum daily to do updates.. This must still work
afterwards!!)

Thanks for any pointers.

Are you sure it's MySQL and not PHP? Versions the same in FC5 vs FC6?
Yup it was PHP. If my question gave the impression MySQL was to blame it
wasn't meant to. There are details on the PHP site about the change
and why it's happened, I just didn't know how to fix it!

The fix (which didn't make it into a.l.r and c.l.p) for the benefit of
any future Googlers is:

yum install php-mysql
service httpd restart
Apr 18 '07 #3
noi <no*@siam.comwrites:
On Mon, 16 Apr 2007 05:23:27 +0100, martinf wrote this:
>Hello group,

I've inherited a box running FC6.

The website I'm trying to copy across to it ran fine on FC5.. PHP & MySQL
were set up 'out-the-box' so the site just worked.

Somethings changed with FC6.

Trying to run the DB script now gives:

PHP Fatal error: Call to undefined function mysql_connect()

Looking at phpinfo();, the configure command has the switch
"--without-mysql" in it, which I figure is the root of my problem.

MySQL is definitely installed on the box, I've a database up and running
on that just fine. It can be accessed locally and remotely.

My question is, what's the simplest way to get PHP to recognise MySQL is
there to use? Preferably without breaking anything else (e.g., there's a
cron job that calls yum daily to do updates.. This must still work
afterwards!!)

Thanks for any pointers.

Are you sure it's MySQL and not PHP? Versions the same in FC5 vs FC6?
It is probably just that the php mysql module is not loaded. In Ubuntu
it can be installed by synaptic.
Apr 18 '07 #4
martinf wrote:
PHP Fatal error: Call to undefined function mysql_connect()
On Mandrake (which is a fork of Redhat from long ago) there is a
particular package called "php-mysql" which includes the MySQL extension.
Try looking for a similarly named package.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Apr 18 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by AF | last post: by
2 posts views Thread by iwasinnihon | last post: by
3 posts views Thread by Steven Sinfield | last post: by
1 post views Thread by Lennie De Villiers | last post: by

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.