Results 1 to 5 of 5
Thread: PHP Configuration problems???
Aug 16, 2011, 11:13 #1
- Join Date
- May 2011
- 0 Post(s)
- 0 Thread(s)
PHP Configuration problems???
Having recently bought 'Build Your Own Database Driven Web Site Using PHP & MySQL'. I went through the installation process and everything was absolutely fine. Unfortunately I had to do a restore and went through the installation again. I am having hair pulling out inducing problems now.
I have a simple count example that utilises an include, so there is a folder with index.php in it which has an include statement that displays the output in a count.html.php php file. This works fine.
I then have this example which is constantly producing the following:
The website encountered an error while retrieving http://localhost/output/. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
The codes is as follows and password is replaced with my root password:
$link = mysqli_connect('localhost', 'root', 'password');
$output = 'Unable to connect to the database server.';
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <p> <?php echo $output; ?> </p> </body> </html>