Korin Carpenter

  •  ·  Premium
  • 1 followers
  • 1772 views
Friends
Empty
Add new...
 
 
·
Added a discussion

I should preface this by saying that I am definitely not a web programmer, and that everything I know was learned in the last two days while trying to troubleshoot setting up a UNA server on an AWS EC2 instance.

I made it through the entire web server setup and UNA installation process, needing to alter or fix occasional pieces but on the whole not have any significant difficulties. However, immediately after removing the install folder from the html (my web-server directory) directory, I was met with a 500 Internal Server Error message (or more accurately, a blank webpage). I created a dummy index.php file and was able to view it's contents through my browser. After some trial and error I found that the line which seems to be causing an issue is:

$oTemplate = BxDolTemplate::getInstance();

in the page.php file. I checked to confirm, and the BxDolTemplate.php file is in the ./inc/classes/ folder. I made sure to follow all the procedures in the installation file (although I was never prompted to create cron jobs), and I ensure the system met the requirements.

Here are my system specs: Server version: Apache/2.4.25 (Amazon), mysql  Ver 14.14 Distrib 5.5.56, for Linux (x86_64) using readline 5.1, PHP 5.4.45 (cli), Kernel: Linux 4.9.20-11.31.amzn1.x86_64

Below are my (edited to provide checks) versions of the index.php and page.php scripts. I have not edited any other files within the UNA directory, aside from removing the install folder. I would greatly appreciate whatever help/advice anyone can give.

 

Index.php:

<?php
echo "hello world";
/**
 * Copyright (c) UNA, Inc - https://una.io
 * MIT License - https://opensource.org/licenses/MIT
 *
 * @defgroup    UnaCore UNA Core
 * @{
 */
if (!file_exists("./inc/header.inc.php")) {
    // this is dynamic page - send headers to not cache this page
    $now = gmdate('D, d M Y H:i:s') . ' GMT';
    header("Expires: $now");
    header("Last-Modified: $now");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    echo "It seems to be script is <b>not</b> installed.<br />\n";
    if ( file_exists( "install/index.php" ) ) {
        echo "Please, wait. Redirecting you to installation form...<br />\n";
        echo "<script language=\"javascript\">location.href = 'install/index.php';</script>\n";
    }
    exit;
}
echo "got this far";
require_once('./inc/header.inc.php');
require_once(BX_DIRECTORY_PATH_INC . "profiles.inc.php");
echo "and here";
if (!isLogged() && getParam('sys_site_splash_enabled')) {
    require_once("./splash.php");
    exit;
}
echo "we're almost done!";
$_GET['i'] = 'home';
echo "just one more!";
require_once("./page.php");
echo "we made it all the way!";
/** @} */

 

page.php:

<?php
/**
 * Copyright (c) UNA, Inc - https://una.io
 * MIT License - https://opensource.org/licenses/MIT
 *
 * @defgroup    UnaCore UNA Core
 * @{
 */
require_once('./inc/header.inc.php');
echo "made it one step forward";
echo "inside the page";
require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
echo "step two";
bx_import('BxDolLanguages');
echo "step three ";
check_logged();
echo "step four 4 ";
$oTemplate = BxDolTemplate::getInstance();
echo "step five V ";
/*
$oPage = BxDolPage::getObjectInstanceByURI();
if ($oPage) {
    $oTemplate->setPageNameIndex (BX_PAGE_DEFAULT);
    $oTemplate->setPageContent ('page_main_code', $oPage->getCode());
    $oTemplate->getPageCode();
} else {
    $oTemplate->displayPageNotFound();
}
*/
/** @} */

  • 1315
Korin Carpenter Discussions
Internal Server Error immediately after install