0

I'm on Ubuntu 8.04 LTS server, i upgrade my php from 5.2 (forgot version) into latest 5.2.4 from official repo.

After some error with eaccelerator, it run fine, but i have errors in many places in my legacy application (coded by someone else)

Take a look some code, likely he use most PHP4 notation and i would ask if any php setting to compatible with this type of code:

  • didn't use " or ' in global variable, example $_GET[id], $_SERVER[REQUEST_METHOD]
  • use $variable_name instead $_POST['variable_name']
  • use $REQUEST_METHOD=="POST"

already turning on register_globals but doesn't solve problem

Clive
  • 36,918
  • 8
  • 87
  • 113
Dels
  • 2,375
  • 9
  • 39
  • 59
  • 1
    Install PHP4? Webservers should be able to run multiple versions for different Directories. PHP5.x is not always fully backwards compatible – Halcyon Dec 09 '11 at 02:05
  • for 1, it does not matter (best practice is quote the string). 2 & 3, if not mistaken, it won't work nor a setting to turn that on. it might using the variable variable. do you have something similar to that? – ajreal Dec 09 '11 at 02:24
  • for installing PHP4 is $_GET, $_POST, $_SERVER will work as intended? – Dels Dec 09 '11 at 02:57

1 Answers1

0

There's no such setting in PHP and the PHP 5.2 version tree is not supported anymore. I know this is not the answer you're looking for, but what you should really do is update the application's code to meet the "newly" enforced standards.

Narf
  • 14,600
  • 3
  • 37
  • 66