0
$db_server = mysql_connect('localhost', 'root', 'Kazibwe') or die(mysql_error());

have failed to connect and receive no error in my browser, actually the browser shows nothing. please help

George Udosen
  • 36,677
james
  • 1
  • Do you have libapache2-mod and mysql modules installed and enabled in your apache, but first off - is this also happening when you run other pages with php from you browser ? – George Udosen Jan 10 '17 at 08:18
  • 1
    Add this on top of your PHP script after the <?php tag so as to show errors on the browser: ini_set("display_errors",1); Then edit your question and include the error message. – Parto Jan 10 '17 at 09:47

2 Answers2

0

I cant comment, so I must answer you this way:

Do you have installed the following packages on your db server:

libapache2-mod-php5

php5-mysql

If not, then run the following command:

sudo apt-get install libapache2-mod-php5 php5-mysql
0

Do :

 sudo apt-get install lamp-server^

This will install all missing files with complete LAMP-STACK

minigeek
  • 1,071