That's tough. Let's go for something more basic:
<?php
if (ini_set('display_errors', '1') === false) {
echo "Error: could not set display_errors to On<br />\n";
} else {
echo "ini_set: display_errors set to On<br />\n";
}
echo "Connecting to database server...<br />\n";
$link = mysql_connect("localhost","username","password")
or die("Could not connect to database server: " . mysql_error());
echo "Connected!<br />\nSelecting database...<br />\n";
mysql_select_db("blc")
or die("Could not select database: " . mysql_error());
echo "Selected!<br />\nExecuting SQL statement...<br />\n"
$query = 'SELECT catagory, company, description, value FROM Companies';
$results = mysql_query($query)
or die("Could not execute SQL statement: " . mysql_error());
echo "Executed!<br />\nRetrieving first row from result set...<br />\n";
$row = mysql_fetch_assoc($results);
echo "Retrieved!";
?>
EDIT:
The PHP manual states that: "Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed."
This could be what is happening. An alternative is to create a .htaccess file and set:
<IfModule mod_php5.c>
php_flag display_errors on
</IfModule>
If you are using PHP4, set:
<IfModule mod_php4.c>
php_flag display_errors on
</IfModule>
If the above still does not work, then your setup is unsuitable for development. You have to either install a web server and PHP locally, or request a change of configuration settings from your web server administrator.