Jump to content

Linux PHP MySQL


CerealBH

Recommended Posts

Im trying to Run PHP locally on my Linux Gutsy Gibbon 7.10 Unbuntu box, anyone know what all i need, i thought i had all the modules and everything am trying to connect to a MySQL database and return some values but i can't connect, but if i upload the same file to a webserver it works perfectly, any ideas if thers possibly something im missing?

 

	$link = mysql_connect("host", "un", "pw") or die('Could not connect: ' . mysql_error());
$db_selected = mysql_select_db("db", $link);
	if (!$db_selected) 
		{
		die ('Can\'t use '.database. mysql_error());
		}
	else echo 'CONNECTED FINE';

Link to comment
https://forums.phpfreaks.com/topic/83723-linux-php-mysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.