Jump to content

Error on index.php line 45


Tom

Recommended Posts

Sorry in advance if this has already been posted about, too busy to search at the moment.

We've recently moved server and after reuploading the files taken from a backup and restoring the database we receive the following error on the index.php:

Parse error: syntax error, unexpected ',', expecting '(' in /var/www/vhosts/europeangateway.info/httpdocs/index.php on line 45

I've also reuploaded a fresh copy of the file from the phpvms download and it's still there.

Any ideas?

Thanks.

Link to comment
Share on other sites

Im not sure what file you want me attaching, but the install check returns the following error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/vhosts/europeangateway.info/httpdocs/core/classes/CodonWebService.class.php on line 42
Link to comment
Share on other sites

The code relating to line 45 at index.php (on my server, at least) relates to maintenance mode. It says:

If maintenance mode is on { RUN CORRUPTED STATEMENT }

The statement on line 45 checks if a user has permissions to override the maintenance mode.

If maintenance mode is on, turn it off, see if that helps.

Lines 42-51 (check if they match)

# Check if we're in maintenance mode, disable the site to non-admins
if(Config::Get('MAINTENANCE_MODE') == true  
&& !Auth::LoggedIn() 
&& !PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN))
{
echo '<html><head><title>Down for maintenance - '.SITE_NAME.'</title></head><body>';
Debug::showCritical(Config::Get('MAINTENANCE_MESSAGE'), 'Down for maintenance');
echo '</body></html>';
die();
}

Could also be to do with the group_has_perm function, I'm not familiar with the API yet so I can't help with that one.

Link to comment
Share on other sites

Try setting it up on a completely different webserver. If it works then you know that your host is the problem.

Try downloading the original scripts from the phpVMS website and replacing the affected files with the factory fresh ones.

If all else fails, just import your MySQL data and do a fresh website install.

Link to comment
Share on other sites

It does work on another webserver, because it worked prior to moving.

I replaced the files earlier on in the topic with no success, and it's a problem with the files themselves (or so the server thinks) rather than the install so another fresh install wouldn't do anything  :-

Link to comment
Share on other sites

  • Administrators

If the maintenance mode check seems to be the problem, could you bypass it by deteing the small chuck of code?

There's other code which is causing problems too, though. He can't run the checkinstall.php page because something else errors out, which brings me to believe that there's something wrong on the server side

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...