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.

eZ debug

Timing: Jan 18 2025 05:13:24
Script start
Timing: Jan 18 2025 05:13:24
Module start 'layout'
Timing: Jan 18 2025 05:13:24
Module start 'content'
Timing: Jan 18 2025 05:13:24
Module end 'content'
Timing: Jan 18 2025 05:13:24
Script end

Main resources:

Total runtime0.0150 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.4453152.6406
Module start 'layout' 0.00480.0025 742.085939.4766
Module start 'content' 0.00730.0054 781.562589.1641
Module end 'content' 0.01270.0022 870.726630.3047
Script end 0.0149  901.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002416.2510140.0002
Check MTime0.00106.8697140.0001
Mysql Total
Database connection0.00085.333710.0008
Mysqli_queries0.002114.079930.0007
Looping result0.00000.173510.0000
Template Total0.001812.010.0018
Template load0.00106.422410.0010
Template processing0.00085.542210.0008
Override
Cache load0.00074.378710.0007
General
dbfile0.00138.536180.0002
String conversion0.00000.055740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs