I've got a little problem with my Ubuntu install of Xampp... I'm working through some books to bring my PHP and mySQL up to speed. For the record, the install I have on my Windows laptop seems OK, but I am retiring from all things MicroSoft so I'd like to wrap my head around this problem.
Code from book used in test file starts:
test php file wrote:<?php
/* Program: mysql_up.php
* Desc: Connects to MySQL Server and
* outputs settings.
*/
echo "<html>
<head><title>Test MySQL</title></head>
<body>";
$host="I have the correct text here";
$user="I have the correct text here";
$password="I have the correct text here";
$cxn = mysqli_connect($host,$user,$password);
$sql="SHOW STATUS";
$result = mysqli_query($cxn,$sql);
if($result == false)
{
echo "<h4>Error: ".mysqli_error($cxn)."</h4>";
}
else
{
/* Table that displays the results */
This should connect to mySQL and provide a table on the page, but what I get is the following message:
browser error message wrote:Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Warning: Unknown: Failed opening '/opt/lampp/htdocs/sparky/mysql_up.php' for inclusion (include_path='.:/opt/lampp/lib/php') in Unknown on line 0
Anybody know what the problem is?
Many thanks