HTTP ERROR 500

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
timypcr
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Dec 19, 2016 4:30 pm

HTTP ERROR 500

Post by timypcr » Mon Dec 19, 2016 4:38 pm

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

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 7869
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: HTTP ERROR 500

Post by sozzled » Mon Dec 19, 2016 7:43 pm

Line 41 if your code snippet contains an illegal character ...

Code: Select all

$app→execute();
Perhaps the "→" character should be replaced by "->" ???
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

timypcr
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Dec 19, 2016 4:30 pm

Re: HTTP ERROR 500

Post by timypcr » Tue Dec 20, 2016 4:15 pm

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

timypcr
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Dec 19, 2016 4:30 pm

Re: HTTP ERROR 500

Post by timypcr » Wed Dec 28, 2016 4:27 pm

anyone?

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3397
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: HTTP ERROR 500

Post by ribo » Wed Dec 28, 2016 4:56 pm

Php version in your shared hosting and php version in vps?
chat room spontes : http://www.spontes.com

User avatar
ionut
Joomla! Ace
Joomla! Ace
Posts: 1264
Joined: Thu May 27, 2010 1:00 pm
Location: EU

Re: HTTP ERROR 500

Post by ionut » Wed Dec 28, 2016 5:39 pm

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");

timypcr
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Dec 19, 2016 4:30 pm

Re: HTTP ERROR 500

Post by timypcr » Thu Dec 29, 2016 5:54 pm

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

User avatar
ionut
Joomla! Ace
Joomla! Ace
Posts: 1264
Joined: Thu May 27, 2010 1:00 pm
Location: EU

Re: HTTP ERROR 500

Post by ionut » Thu Dec 29, 2016 6:44 pm

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");

timypcr
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Dec 19, 2016 4:30 pm

Re: HTTP ERROR 500

Post by timypcr » Thu Dec 29, 2016 8:52 pm

thanks!


Locked

Return to “Migrating and Upgrading to Joomla! 2.5”