Search the Community
Showing results for tags 'config'.
-
I'm trying to convert existing website php code to use config.php on my local server but keep getting the following http 500 error before anything shows on the screen: "This page isn’t working foxtest is currently unable to handle this request." My config directory is within my project directory until I get this working. Here's the contents of config.php: <?php $app_root = DIRNAME(__DIR__); $php_path = $app_root.'config/'; include_once $php_path.'PDO_Connection_Select.php'; include_once $php_path.'GetUserIpAddr.php'; Here's my index.php <?php require_once('config/config.php'); $ip = $php_path.'GetUserIpAddr()'; if (!$pdo = $php_path.'PDOConnect("foxclone_data")') { exit; } $stmt = $pdo->prepare("INSERT INTO access (address) values (?)"); $stmt->execute([$ip]) ; require_once("header.php"); ?> <header class="header"> <div class="header-content"> <div class="text-container"> <div class="header__top" style="text-align:center;">FoxClone</div> <p class="p-small">FoxClone is a image backup, restore, and clone tool for Windows and Linux systems, using a simple point-and-click interface. Being Linux-based, it boots to its own system exclusive of anything on the hard disk drive (HDD) or solid disk drive (SSD), where it takes images of the partitions and stores them for later restoration. The resulting image files can optionally be compressed to save space. .</p> </div> </div> </header> <body> <nav class="navbar" style="background:transparent;"> <div class="navbar-links"> <ul> <li><a href="index.php">Home</a></li> <li><a href="features.php">Features</a></li> <li><a href="legal.php">Legal</a></li> <li><a href="contact.php">Contact</a></li> <li><a href="download.php">Downloads</a></li> </ul> </div> </nav> <header class="header"> <div class="header-content"> <div class="text-container"> <div class="header__top" style="text-align:center;">FoxClone</div> <p class="p-small">FoxClone is a image backup, restore, and clone tool for Windows and Linux systems, using a simple point-and-click interface. Being Linux-based, it boots to its own system exclusive of anything on the hard disk drive (HDD) or solid disk drive (SSD), where it takes images of the partitions and stores them for later restoration. The resulting image files can optionally be compressed to save space. .</p> </div> </div> </header> <?PHP require_once("footer.php"); I know I must be looking past the problem after looking at the code for several hours, but I'm stumped. I'd appreciate some help on this.