Re: Apache public_html question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mogens Kjaer wrote:
Don Russell wrote:
...
Maybe I'll just defer this project a couple of months until FC7.... how easy is it to reinstall php so it has mysql support in it?

yum install php-mysql

Mogens


It cannot be much simpler than that. :-) So, I did that and some things were installed.

I guess there are still some buttons to push because this line still causes the php gape to die... function_exists('mysql_connect') or die('mysql functions are not available from php');

and a page that only has
   <?php phpinfi(); ?>

still shows ... --without=mysql

However, rebooting the machine solved the first problem: function "mysql_connect" must be defined now, but the other indicator remains... a bit misleading, but appears to be irrelevant.

Now, I get as far as:
if (false === ($dbh = mysql_connect('localhost',$uid,$pwd))) {
   die("Can't connect to mySQL database: ".mysql_error());
}


and sure enough, results in:
Can't connect to mySQL database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I was expecting an error like "incorrect userid/password or something... but not this...

Is this a SELinux thing preventing a connection even from the same machine?



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux