Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a webserver running CentOS 6. Yesterday, I installed php-gd with yum install php-gd because I couldn't see graphics on my website. However, when I see my php version, it changed from 5.3 to 5.4x.

Because my application uses register_globals (which was removed from php 5.4), I cant even log in to my app.

I tried two ways to downgrade my php:

  1. Using yum again to downgrade; this wouldn't downgrade to 5.3x, just 5.4x
  2. Downloading the php rpm directly; I messed this up, and wound up with dependency hell.
share|improve this question

1 Answer 1

Why not simply fix your code - According to http://ubuntuforums.org/showthread.php?t=1973028 add the following to the top of your PHP script -

foreach ($_REQUEST as $key=>$val) { ${$key}=$val; }

(And ask yourself why you are running insecure code).

Apparently you can even automate this further by adding an "auto_prepend_file" directive to a .htaccess file to make it work for the entire directory in 1 hit.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.