Tom Posted February 2, 2010 Report Share Posted February 2, 2010 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. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 3, 2010 Administrators Report Share Posted February 3, 2010 That's odd. That points to a corrupted file - can you attach it? Also run /install/checkinstall.php and see what that comes up with Quote Link to comment Share on other sites More sharing options...
Tom Posted February 6, 2010 Author Report Share Posted February 6, 2010 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 7, 2010 Administrators Report Share Posted February 7, 2010 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) Quote Link to comment Share on other sites More sharing options...
Tom Posted February 7, 2010 Author Report Share Posted February 7, 2010 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. Quote Link to comment Share on other sites More sharing options...
Kieran Posted February 7, 2010 Report Share Posted February 7, 2010 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. Quote Link to comment Share on other sites More sharing options...
Tom Posted February 7, 2010 Author Report Share Posted February 7, 2010 Yup mine looks exactly like that.. Quote Link to comment Share on other sites More sharing options...
Kieran Posted February 7, 2010 Report Share Posted February 7, 2010 Can you also confirm that lines 114 to 141 in: core/common/PilotGroups.class.php look like lines 114 to 141 in: http://docs.phpvms.net/internals/de/d70/_pilot_groups_8class_8php_source.html Quote Link to comment Share on other sites More sharing options...
Tom Posted February 7, 2010 Author Report Share Posted February 7, 2010 Also the same. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 7, 2010 Administrators Report Share Posted February 7, 2010 Also this http://bugs.phpvms.net/browser/trunk/core/classes/CodonWebService.class.php#L42 Line 42, is yours the same? Contact your host, did they make any PHP changes? Are any other apps on your server broken? Quote Link to comment Share on other sites More sharing options...
Tom Posted February 7, 2010 Author Report Share Posted February 7, 2010 Line 42 the same. The host have recently updated their version of php. No problems with anything else. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 8, 2010 Administrators Report Share Posted February 8, 2010 I would contact them, it might be something related to that, that's strange. Are they/you using APC caching or any PHP accelerators? Quote Link to comment Share on other sites More sharing options...
Kieran Posted February 8, 2010 Report Share Posted February 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
Tom Posted February 8, 2010 Author Report Share Posted February 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 8, 2010 Administrators Report Share Posted February 8, 2010 If you create a new folder and upload your install to that, do you get the error there? Quote Link to comment Share on other sites More sharing options...
Tom Posted February 8, 2010 Author Report Share Posted February 8, 2010 If you create a new folder and upload your install to that, do you get the error there? Yes Quote Link to comment Share on other sites More sharing options...
Kieran Posted February 8, 2010 Report Share Posted February 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
Tom Posted February 8, 2010 Author Report Share Posted February 8, 2010 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 :- Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 8, 2010 Administrators Report Share Posted February 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
Kieran Posted February 8, 2010 Report Share Posted February 8, 2010 If the maintenance mode check seems to be the problem, could you bypass it by deteing the small chuck of code? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 8, 2010 Administrators Report Share Posted February 8, 2010 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 Quote Link to comment Share on other sites More sharing options...
Kieran Posted February 8, 2010 Report Share Posted February 8, 2010 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. Quote Link to comment Share on other sites More sharing options...
Tom Posted February 11, 2010 Author Report Share Posted February 11, 2010 Problem fixed now, host upgraded php (there was an error upgrading previously) Thanks for all your help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.