Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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  

Thanks for any pointers.

Re: PHP, MySQL & FC6

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Re: PHP, MySQL & FC6

On Mon, 16 Apr 2007 05:23:27 +0100, martinf wrote this:

Quoted text here. Click to load it

Are you sure it's MySQL and not PHP?  Versions the same in FC5 vs FC6?

Re: PHP, MySQL & FC6

noi wrote:
Quoted text here. Click to load it

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

Re: PHP, MySQL & FC6

Quoted text here. Click to load it

It is probably just that the php mysql module is not loaded. In Ubuntu
it can be installed by synaptic.

Site Timeline