Page 1 of 1

HTTP ERROR 500

Posted: Mon Dec 19, 2016 4:38 pm
by timypcr
Trouble after migration

I moved a site from a shared host to a dedicated VPS and when accessing the page a get “HTTP ERROR 500” and the apache log shows the following:

Code: Select all

 “PHP Parse error:  syntax error, unexpected end of file, expecting '`' in /usr/local/www/website/index.php on line 41”

Site did not have this program under the shared hosted, here is my index.php

Code: Select all

<?php
die("testing domain on index page");`
/**
 * @package    Joomla.Site
 *
 * @copyright  Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

if (version_compare(PHP_VERSION, '5.3.10', '<'))
{
	die('Your host needs to use PHP 5.3.10 or higher to run this version of Joomla!');
}

/**
 * Constant that is checked in included files to prevent direct access.
 * define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
 */
define('_JEXEC', 1);

if (file_exists(__DIR__ . '/defines.php'))
{
	include_once __DIR__ . '/defines.php';
}

if (!defined('_JDEFINES'))
{
	define('JPATH_BASE', __DIR__);
	require_once JPATH_BASE . '/includes/defines.php';
}

require_once JPATH_BASE . '/includes/framework.php';

// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;

// Instantiate the application.
$app = JFactory::getApplication('site');

// Execute the application.
$app→execute();

Please help

Re: HTTP ERROR 500

Posted: Mon Dec 19, 2016 7:43 pm
by sozzled
Line 41 if your code snippet contains an illegal character ...

Code: Select all

$app→execute();
Perhaps the "→" character should be replaced by "->" ???

Re: HTTP ERROR 500

Posted: Tue Dec 20, 2016 4:15 pm
by timypcr
No dice I added replace what you suggested so the end line looks $app->execute();

I can't tell the difference (just copied and past your character) also why would this same config work on the shared server and not a vps?

Tim

Re: HTTP ERROR 500

Posted: Wed Dec 28, 2016 4:27 pm
by timypcr
anyone?

Re: HTTP ERROR 500

Posted: Wed Dec 28, 2016 4:56 pm
by ribo
Php version in your shared hosting and php version in vps?

Re: HTTP ERROR 500

Posted: Wed Dec 28, 2016 5:39 pm
by ionut
This line

Code: Select all

die("testing domain on index page");`
has at the end after the semicolon.

Code: Select all

`
Eliminate that, that line should end in the semicolon, like this:

Code: Select all

die("testing domain on index page");

Re: HTTP ERROR 500

Posted: Thu Dec 29, 2016 5:54 pm
by timypcr
I've made the suggested modification and now the only thing that loads is a white page with the text "testing domain on index page"


Thanks,
Tim

Re: HTTP ERROR 500

Posted: Thu Dec 29, 2016 6:44 pm
by ionut
Yes. this is the expected behaviour. I supposed that line was intentionally left there.
If not, delete

Code: Select all

die("testing domain on index page");

Re: HTTP ERROR 500

Posted: Thu Dec 29, 2016 8:52 pm
by timypcr
thanks!