Jump to content

Recommended Posts

Posted

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.

Posted

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
  • Administrators
Posted

You have files corrupted, that's what it seems to be, make sure files are being uploaded (your client could be skipping files which seem to be the same change time)

Posted

I deleted and totally reuploaded every file from a fresh download and it's still showing :/

And again on the Install Check I get the same error.

Also, the VMS on my own site on the same host is showing these errors after being reuploaded.

Posted

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.

Posted

Well if you tested exactly the same scripts on a different host and they turned out to be OK, then you know that the recent php changed must be the cause.

Posted

Well they upgraded the php version in an attempt to fix this error, it wasn't working before the change either..

Ill ask about APC caching and accelerators.

Posted

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.

Posted

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  :-

  • Administrators
Posted

Doesn't seem like the file itself, since you're uploading fresh to a new directory, and when you open it, it's not mangled either. I think something in the PHP install is screwy.

  • Administrators
Posted

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

Posted

Just realised that :S

If he speaks to his host and provides some samples of the scripts then perhaps they would be able to help him sort any problems.

Best of luck.

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...