Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #3043 Pager + mod_rewrite, recursive urlencode() breaks rewrite handler
Submitted: 2004-12-28 12:29 UTC
From: benediktlaube at gmail dot com Assigned: quipo
Status: Closed Package: Pager
PHP Version: 4.3.10 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 11 + 1 = ?

 
 [2004-12-28 12:29 UTC] benediktlaube at gmail dot com
Description: ------------ When mod_rewrite together with Pager, the request argument gets urlencoded by Pager. The mod_rewrite handler needs to urldecode() to be able to parse the request. There needs to be recursive urldecode() for each time a Pager link has been clicked. As the number of urldecodes cannot be guessed, there should be an option for mod_rewrite situations to be used alongside Pager.

Comments

 [2004-12-28 12:32 UTC] benediktlaube at gmail dot com
A hint how to fix the rewrite handler to deal with the unknown number of urlencodes will suffice.
 [2005-01-03 17:24 UTC] quipo
have you tried the latest version (in CVS)? I wonder why you experience this issue, since the url is decoded and encoded at each request, so I can't see the need for a recursive urldecode(). Can you provide a reproducing script? Thanks for your feedback.
 [2005-01-10 12:41 UTC] benediktlaube at gmail dot com
Hi I am still experiencing problems. The main Problem is due to the mod_rewrite. I use URLs like http://www.mysite.com/shop/electronics upon entering the page that has the Pager() Links, everything is fine. The request is attached to the URL by Pager like this: http://www.mysite.com/index.php?request=shop/electronics&PageID=3 (or 4,5,6,7,...) Now, when I click a Pager link to get to another page, there the attached request looks like: http://www.mysite.com/index.php?request=shop%2Felectronics&PageID=3 So when I click a link now, it obviously will not work as my rewrite handler cannot use %2F but needs the '/' as separator. I don't understand why it's not urldecoded...pls help!
 [2005-01-11 10:50 UTC] quipo
Thank you for taking the time to report a problem with the package. Unfortunately you are not using a current version of the package -- the problem might already be fixed. Please download a new version from http://pear.php.net/packages.php If you are able to reproduce the bug with one of the latest versions, please change the package version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PEAR. Actually this is the expected behaviour: the querystring is urlencoded, so every slash will be translated to "%2F". Can't you just add a mod_rewrite rule to handle the case? Anyway, I'll probably add a filter to change "%2F"s back to slashes.
 [2005-01-11 10:53 UTC] quipo
ops, I changed the bug status by mistake... I just wanted to add a comment.
 [2005-01-11 11:23 UTC] quipo
please test the latest CVS revision and tell me if it fixes your problem
 [2005-01-17 13:38 UTC] quipo
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.