Trying to get a PHP webpage package up. I haven't dabbled with PHP in a long time, and back then it was in windows. This is in a Linux environment and I'm out of my league at this point. Wondering if anyone can give me some pointers:
Webpage http://127.0.0.1/stats/index.php is returning the following:
Warning: include_once(/opt/lampp/htdocs/stats/includes/settings.inc.php): failed to open stream: Permission denied in /opt/lampp/htdocs/stats/index.php on line 3
Warning: include_once(): Failed opening '/opt/lampp/htdocs/stats/includes/settings.inc.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/stats/index.php on line 3
Warning: include_once(/opt/lampp/htdocs/stats/includes/template.class.php): failed to open stream: Permission denied in /opt/lampp/htdocs/stats/index.php on line 4
Warning: include_once(): Failed opening '/opt/lampp/htdocs/stats/includes/template.class.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/stats/index.php on line 4
Fatal error: Uncaught Error: Class 'Template' not found in /opt/lampp/htdocs/stats/index.php:6 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/stats/index.php on line 6
And the index.php code has the following:
<?php define("_INSIDE",1);
require_once(realpath('./loader.inc.php'));
include_once(INC_PATH.'settings.inc.php');
include_once(INC_PATH.'template.class.php');
$tmpl = new Template('index.tpl');
$tmpl->setContent("HeaderHeight", $GLOBALS['_dnet']['web']['header_height']);
$tmpl->setContent("NavigationWidth", $GLOBALS['_dnet']['web']['navi_width']);
if (!empty($GLOBALS['_dnet']['web']['google_verify'])) {
$tmpl->addHeaderMeta('<meta name="verify-v1" content="'.$GLOBALS['_dnet']['web']['google_verify'].'" />'."\n");
}
// render without HTML-Envelope but get default Meta-data from template and set it as content replacement.
$tmpl->setContent("MetaHead", $tmpl->getHeader());
echo $tmpl->Render(false);
?>
I have LAMPP installed and the index file is installed under '/opt/lampp/htdocs/stats/' and the settings.inc.php is located at '/opt/lampp/htdocs/stats/includes/'.
I changed the permission for the '/opt/lampp/htdocs/stats/' to everyone via 'sudo chmod ugo+rwx /opt/lampp/htdocs/stats/'.
However I still get the original error when trying to access the webpage using http://127.0.0.1/stats/index.php.
Any assistance would be greatly appreciated.
Jay
Webpage http://127.0.0.1/stats/index.php is returning the following:
Warning: include_once(/opt/lampp/htdocs/stats/includes/settings.inc.php): failed to open stream: Permission denied in /opt/lampp/htdocs/stats/index.php on line 3
Warning: include_once(): Failed opening '/opt/lampp/htdocs/stats/includes/settings.inc.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/stats/index.php on line 3
Warning: include_once(/opt/lampp/htdocs/stats/includes/template.class.php): failed to open stream: Permission denied in /opt/lampp/htdocs/stats/index.php on line 4
Warning: include_once(): Failed opening '/opt/lampp/htdocs/stats/includes/template.class.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/stats/index.php on line 4
Fatal error: Uncaught Error: Class 'Template' not found in /opt/lampp/htdocs/stats/index.php:6 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/stats/index.php on line 6
And the index.php code has the following:
<?php define("_INSIDE",1);
require_once(realpath('./loader.inc.php'));
include_once(INC_PATH.'settings.inc.php');
include_once(INC_PATH.'template.class.php');
$tmpl = new Template('index.tpl');
$tmpl->setContent("HeaderHeight", $GLOBALS['_dnet']['web']['header_height']);
$tmpl->setContent("NavigationWidth", $GLOBALS['_dnet']['web']['navi_width']);
if (!empty($GLOBALS['_dnet']['web']['google_verify'])) {
$tmpl->addHeaderMeta('<meta name="verify-v1" content="'.$GLOBALS['_dnet']['web']['google_verify'].'" />'."\n");
}
// render without HTML-Envelope but get default Meta-data from template and set it as content replacement.
$tmpl->setContent("MetaHead", $tmpl->getHeader());
echo $tmpl->Render(false);
?>
I have LAMPP installed and the index file is installed under '/opt/lampp/htdocs/stats/' and the settings.inc.php is located at '/opt/lampp/htdocs/stats/includes/'.
I changed the permission for the '/opt/lampp/htdocs/stats/' to everyone via 'sudo chmod ugo+rwx /opt/lampp/htdocs/stats/'.
However I still get the original error when trying to access the webpage using http://127.0.0.1/stats/index.php.
Any assistance would be greatly appreciated.
Jay
