PATH_INFO not working correctly.

Author Message

Mariusz Kruk

Wednesday 28 July 2010 7:22:59 am

Hello.

I've got a site built over eZPublish 3.9.0 (I know, quite old but I can't change it for now) that works with URLs passed as query string (index.php?/whatever). But since some services (most notably Facebook) mangle the URL changing slashes to %2F which gets eZ confused, we tried to pass URLs as pathinfo. And I've got no idea why it's not working. If I try to reach /any/path/inside/the/site I'm getting the main page without many elements (styles, for example) loading properly.

The question is - where can I look to see what's going on and why it's behaving this way.

Or maybe you know a way to make eZ treat %2F as normal slash?

Mariusz Kruk

Thursday 05 August 2010 1:09:41 am

I've done some research and found out that:

1. 3.9 simply can't percent-decode query string. Newer version I have on another host can. Tough luck because I can't upgrade for now for reasons described below.

2. A clean installation of vanilla 3.9 can handle pathinfo correctly (set up in another directory of the same host, so the apache settings are the same). So it seems something is broken inside that particular installation. It seems that even tho index.php gets called with the proper REQUEST_URI, the apropriate module is not called. Instead the main page is loaded (but most related files (styles, scripts) have relative pathnames so they do not load correctly). Unfortunately, the service was set up by a third-party and, as far as I know they were not very familiar with eZPublish so they did some dirty hacking (and that's why I can't simply upgrade to a current version and I'm stuck with php4 :-/). The problem is - I don't know where to look for causes of my problem. What could they have broken so that my eZPublish doesn't interpret pathinfo correctly?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.