I can't figure out why my php program running on an apache server can't connect to this MySQL databse. The db is running fine and I can log into it through the command line prompts and make modifications.
My code follows:
<html>
<body>
<table border="1">
<tr bgcolor="orange">
<th>Company</th>
<th>Issue #</th>
<th>Auditor</th>
<th>Date Issue Recognized</th>
<th>Recognized By</th>
<th>KPMG Issue #</th>
<th>Process</th>
<th>Process/System Owner</th>
<th>KPMG Control Objectives</th>
<th>Affected Applications</th>
<th>Detailed Process Description</th>
<th>Issue Summary</th>
<th>Issue Detail</th>
<th>Individual Item Significant Deficiency or Material Weakness</th>
<th>Issue Severity</th>
<th>Previous Issue Severity</th>
<th>Issue Owner</th>
<th>Expected Correction Date</th>
<th>Management Status</th>
<th>% Completed</th>
<th>Date Resolved</th>
<th>Action Plan/Action Taken</th>
</tr>
<?php
$db = mysql_connect("localhost", "root", "a071584a");
mysql_select_db("issues",$db) or die("Unable to access the database.");
$result = mysql_query("SELECT * FROM issue_log",$db);
$num=mysql_numrows($result);
$i=0;
while ($i <= $num) {
//Defining table results so that they can be displayed easier.
$company=mysql_result($result,$i,"company");
$Issue=mysql_result($result,$i,"issue");
$Auditor=mysql_result($result,$i,"auditor");
$Issue_Date_Rec=mysql_result($result,$i,"issue_date_rec");
$Rec_By=mysql_result($result,$i,"rec_by");
$KPMG_Number=mysql_result($result,$i,"kpmg_number");
$process=mysql_result($result,$i,"process");
$proc_sys_own=mysql_result($result,$i,"proc_sys_own");
$kpmg_objective=mysql_result($result,$i,"kpmg_objective");
$affected_app=mysql_result($result,$i,"affected_app");
$detailed_desc=mysql_result($result,$i,"detailed_desc");
$issue_summary=mysql_result($result,$i,"issue_summary");
$issue_detail=mysql_result($result,$i,"issue_detail");
$deficiency_weakness=mysql_result($result,$i,"deficiency_weakness");
$issue_severity=mysql_result($result,$i,"issue_severity");
$prev_severity=mysql_result($result,$i,"prev_severity");
$issue_owner=mysql_result($result,$i,"issue_owner");
$expected_correction=mysql_result($result,$i,"expected_correction");
$manage_status=mysql_result($result,$i,"manage_status");
$completed=mysql_result($result,$i,"completed");
$date_resolved=mysql_result($result,$i,"date_resolved");
$action_plan=mysql_result($result,$i,"action_plan");
//Table to display results.
echo("<tr>");
echo("<td>");
echo("$company");
echo("</td>");
echo("<td>");
echo($Issue);
echo("</td>");
echo("<td>");
echo($Auditor);
echo("</td>");
echo("<td>");
echo($Issue_Date_Rec);
echo("</td>");
echo("<td>");
echo($Rec_By);
echo("</td>");
echo("<td>");
echo($KPMG_Number);
echo("</td>");
echo("<td>");
echo($process);
echo("</td>");
echo("<td>");
echo($proc_sys_own);
echo("</td>");
echo("<td>");
echo($kpmg_objective);
echo("</td>");
echo("<td>");
echo($affected_app);
echo("</td>");
echo("<td>");
echo($detailed_desc);
echo("</td>");
echo("<td>");
echo($issue_summary);
echo("</td>");
echo("<td>");
echo($issue_detail);
echo("</td>");
echo("<td>");
echo($deficiency_weakness);
echo("</td>");
echo("<td>");
echo($issue_severity);
echo("</td>");
echo("<td>");
echo($prev_severity);
echo("</td>");
echo("<td>");
echo($issue_owner);
echo("</td>");
echo("<td>");
echo($expected_correction);
echo("</td>");
echo("<td>");
echo($manage_status);
echo("</td>");
echo("<td>");
echo($completed);
echo("</td>");
echo("<td>");
echo($date_resolved);
echo("</td>");
echo("<td>");
echo($action_plan);
echo("</td>");
echo("</tr>");
$i++;
}
?>
</table>
</body>
</html>