
November 10th, 2012, 01:12 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 8
Time spent in forums: 5 h 15 m 36 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by web_developer Try enabling error reporting on top of the script:
PHP Code:
ini_set ('display_errors', true);
error_reporting (E_ALL);
|
That worked. However, now it causes an error for this script:
Code:
<?php
mysql_connect("localhost", "root", "mypass") or die(mysql_error());
echo "Connected to MySQL!!!<br />";
mysql_select_db("data") or die(mysql_error());
echo "Connected to Database!!";
?>
When this script previously produced the proper output. When I view this page without errors enabled it shows me the proper output, but when I enable errors it makes it so that instead of showing: "Connected to Database!!" it shows me this:
Code:
Fatal error: Call to undefined function mysql_connect() in /home/user/code/php/connect.php on line 2
Is there some other configuration that I have messed up somewhere? Oh, and yes I have restarted the http daemon.
|