Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

General Question Regarding $HTTP_GET_VARS


Mort-lemur

Recommended Posts

Hi,

 

In my 2.2 RC2a stores I have replaced $HTTP_GET_VARS with $_GET

 

Im now developing a 2.3.1 store which still has $HTTP_GET_VARS in the code.

 

Should I be looking at replacing the $HTTP_GET_VARS and $HTTP_POST_VARS within my new 2.3.1 stores?

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

OK well I have an almost vanilla install of 2.3.1 which I am slowly modding to the standard I need.

 

So would it be a good thing to replace the $HTTP_GET_VARS etc with $_GET, $_POST etc as I open up files for modification?

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

If you use a programme like Dreamweaver you can do a "find and replace" that can search for every instance of the old code and replace it all in one go for you on the whole site.

 

Faster and easier, and makes sure it gets all of them for you.

 

Good luck

Link to comment
Share on other sites

If you use a programme like Dreamweaver you can do a "find and replace" that can search for every instance of the old code and replace it all in one go for you on the whole site.

 

Faster and easier, and makes sure it gets all of them for you.

 

Good luck

 

DON'T USE DREAMWEAVER to edit PHP files (unless you are looking forward to endless headaches). You can use the find and replace function found in the recommended text editors such as Notepad++ and Editplus+

 

 

 

Chris

Link to comment
Share on other sites

You can change them but you dont need to do so....2.3.1 have a "compatibility" layer which takes care of that automatically.

Link to comment
Share on other sites

Hi Chris - dont worry I dont use dreamweaver - Notepad++ for me.

 

Nick - so although I dont need to - would it be a good idea to change them whilst I have the files open?

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

You can change them but you dont need to do so....2.3.1 have a "compatibility" layer which takes care of that automatically.

 

Does this apply to 2.2 RC2 as well

 

I have both versions on my local machine and they both have over 600 instances of this code.

Would a bulk copy and replace break the site?

 

Martin

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

Martin,

 

My question exactly !

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

I have solved the problem or rather I have an explanation

 

In catalog/includes/functions/compatibility.php around line 32 you will find this

 

if (PHP_VERSION >= 4.1) {
$HTTP_GET_VARS =& $_GET;
$HTTP_POST_VARS =& $_POST;
$HTTP_COOKIE_VARS =& $_COOKIE;
$HTTP_SESSION_VARS =& $_SESSION;
$HTTP_POST_FILES =& $_FILES;
$HTTP_SERVER_VARS =& $_SERVER;

 

This converts all the instances of these commands to the correct version for phps greater than 4.1 so you can leave them in place if you wish.

 

Martin

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

Thanks for that - so that code looks for depreciated functions in each file as the pages load - does anyone know if this has any implications on general site speed?

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...