First of all, I know this is a duplicate, but I couldn't find a solution in the other topics.
My PHP Application is running with no issue on my localhost, but whenever I upload it to a Web Server, I get -
500 Internal Server Error
Using some of the answers found on Stack Overflow such as using ini_set('display_errors', 1);
to generate the following error:
Warning:require_once(/home/users/web/b2365/nf.storyboardclubcom/public_html/beta/classes/Cookie.php): failed to open stream: No such file or directory in /hermes/bosnaweb04a/b2365/nf.storyboardclubcom/public_html/beta/core/init.php on line 28 Fatal error: require_once(): Failed opening required '/home/users/web/b2365/nf.storyboardclubcom/public_html/beta/classes/Cookie.php' (include_path='.:/usr/local/lib/php-5.5.22-amd64/lib/php') in /hermes/bosnaweb04a/b2365/nf.storyboardclubcom/public_html/beta/core/init.php on line 28
Naturally I checked and I can confirm that these files exist in their respective folders on the server, and all permissions have been set correctly (755 on folders, and 644 on files).
Here is my code below for my initialization file:
ini_set('display_errors', 1);
// Starting a session for users
session_start();
// Global Configuration
$GLOBALS['config'] = array(
'mysql' => array(
'host' => 'localhost',
'username' => 'root',
'password' => '',
'db' => 'storyboardclub'
),
'remember' => array(
'cookie_name' => 'hash',
'cookie_expiry' => 604800
),
'session' => array(
'session_name' => 'user',
'token_name' => 'token'
)
);
spl_autoload_register(function($class) {
require_once $_SERVER['DOCUMENT_ROOT'] . '/beta/classes/' . $class . '.php';
});
require_once $_SERVER['DOCUMENT_ROOT'] . '/beta/functions/sanitize.php';
if(Cookie::exists(Config::get('remember/cookie_name')) &&
!Session::exists(Config::get('session/session_name'))) {
$hash = Cookie::get(Config::get('remember/cookie_name'));
$hashCheck = DB::getInstance()->get('sessions', array('session_hash', '=', $hash));
if($hashCheck->count()) {
$user = new User($hashCheck->first()->session_user_id);
$user->login();
}
}
Any help on this matter would be much appreciated