rsanchez/resource_router

Parse error after moving from localhost to server

Closed this issue · 7 comments

Hello Rob,

Thanks for your nice library, it's very helpfull.

When I moved my project from localhost to the live server I got an error message and I don't know how to solve this.

I ran the ExpressionEngine 2.x Server Compatibility Wizard. It seems that the server doesn't support "URL Segment Support".

Thanks in advance for your reply.

Message:
Warning: Unexpected character in input: '' (ASCII=92) state=1 in /system/expressionengine/third_party/resource_router/ext.resource_router.php on line 91

Warning: Unexpected character in input: '' (ASCII=92) state=1 in /system/expressionengine/third_party/resource_router/ext.resource_router.php on line 91

Parse error: syntax error, unexpected T_STRING in /system/expressionengine/third_party/resource_router/ext.resource_router.php on line 91

The problem is definitely upstream in EE itself, not in Resource Router. EE's User Guide has some advice for servers who fail the "URL Segment Support" test.

I've got the "URL Segment Support" working now. But still these messages apair and the site crashes. Any idea why this is happening? I'm stuck here

Send me an FTP login so I can take a look. A control panel login, too. info at robsanchez dot com

I'm having the same problem with a 2.7.3 site that's been running for a while with no issues. I've been working on some template changes locally and everything's been fine and I've just deployed them to the server (running PHP 5.2.17) and the site's now down with the error reported by the OP.

At the moment the front end of the site is giving me:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /system/expressionengine/libraries/Functions.php(680) : eval()'d code on line 115

and then rendering a small part of a snippet below that.

I can't enable the router extension from the CP because I get the OP's error. If I manually create an entry in the extensions table for the extension I get the OP's error on the front end too.

I've run the wizard and everything checks out except for the minimum PHP version, but as I said, the site's been running fine up until now.

I can't seem to revert back to a state where the site's not broken either at the moment so really need to find out pretty quick if you found a solution to Tim's problem.

Hello Rob,
Sorry for my late reaction. Here are the credentials. Thanks in advance!
Tim

@tyssen The bad news is that Resource Router requires PHP 5.3. This is likely the cause of your issue. It would surprise me if it worked at all on 5.2.

I've got something to help you debug. If you replace the evaluate method in system/expressionengine/libraries/Functions.php with this code here, you can see where in the template the error is occurring. It'll show you which line in the template is erroring out.

@TimMMG The issue is that your server is running PHP 5.2.17. Resource Router requires PHP 5.3 and above.