Upgrading to PHP version 5.4 – Global Variables

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

briandroberts
New php-forum User
New php-forum User
Posts: 1
Joined: Fri Dec 07, 2012 1:44 am

Upgrading to PHP version 5.4 – Global Variables

Postby briandroberts » Fri Dec 07, 2012 1:50 am

I need to upgrade my site from PHP 4.4 to 5.4. I am concerned about one of the backward incompatible changes. Until 5.4, the EGPCS (Environment, GET, POST, Cookie, Server) variables could be global. For example, you can use $customer_name instead of $_POST[customer_name].

I know that my source code includes some examples of this. I have over 250 php files containing a total of about 20,000 lines of source code. I’m looking for an automated method of finding them.

I would be grateful for any ideas.

User avatar
Barrikor
New php-forum User
New php-forum User
Posts: 16
Joined: Sun Dec 12, 2010 3:14 pm

Re: Upgrading to PHP version 5.4 – Global Variables

Postby Barrikor » Fri Dec 07, 2012 12:23 pm

That's a problem :(

I assume that you validated/sanitized the REQUEST data, even if you had them as globals, right?

Maybe search by your validation/sanitation functions... I can't think of any other way to automate finding it.


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 3 guests