mysql - How to know PHP is set-up correctly for Apache on localhost? -


i trying retrieve data mysql flash application via php, having trouble connecting server. created following .php test whether functioning correctly:

<html> <body>  <?php $link = mysql_connect('localhost', 'root', 'password'); if (!$link) {     die('could not connect: ' . mysql_error()); } echo 'connected successfully';  if (mysql_query("create database testphp",$link))   {   echo "database created";   } else   {   echo "error creating database: " . mysql_error();   } ?>  </body> </html> 

when try , access browser don't back, remains blank? (when localhost/xxx.php displays code, don't know if that's helpful? -aside entering file path) tried other .php files, either error or white web browser screen, above? how can test see whether php setup correctly? know sure working when login using mysql shell , "show databases;" , testphp listed, not. thanks!

solution:

turns out had been using installer while think there lot of assumptions using binaries (or vice versa). anyhow have , running...expletive, expletive! :) everyone!

put following script somewhere within document root. go address should print out lot of useful information.

<?php   phpinfo(); ?> 

Comments