CerealBH Posted December 30, 2007 Share Posted December 30, 2007 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 More sharing options...
Daniel0 Posted December 30, 2007 Share Posted December 30, 2007 What's the error? Try $ sudo aptitude install php5-mysql Link to comment https://forums.phpfreaks.com/topic/83723-linux-php-mysql/#findComment-425992 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.