I developed a PHP script that uses $ _REQUEST [] superglobal. A typical client request may consist of:
http://host.name/socnet/add.php?shortid=1&author=NewUser2&comment=Dad%20dad%20dad
This URL is rewritten by Apache in my production environment to the equivalent https: // URL according to the following rewrite rule:
RewriteRule ^socnet/add.php(.*) https://%{SERVER_NAME}/socnet/add.php$1 [R,L]
During development with PHP 5.3.2 and debugging using NetBeans, everything works as expected $_REQUEST['comment']="Dad dad dad"
However, when I deployed to my VPS host environment running PHP 5.2.4 and which was rewriting the URL described above ... $_REQUEST['comment']="Dad%20dad%20dad"
So it looks like the $_REQUEST['comment']url is not decrypted, as expected in 5.2.4, and my rewrite rule
Any ideas as to why this is happening and a reasonable workaround would be greatly appreciated. Is this a problem with the PHP version or something more subtle? Interested in hearing from everyone who encountered this problem during deployment before and how they resolved it.
source
share