Jump to content



Photo
- - - - -

Register Globals


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1   bobsi18

bobsi18
  • Members
  • 438 posts

Posted 15 May 2010 - 00:35

Hey all,
I'm having troubles with this. I'm currently running my heavily modified oscommerce store on a server that is running php 4, and register_globals on. However I have been told this server is being decomissioned, so I need to get my installation up to date. I have installed my site on my computer to try and get it working: my computer is running php 5.3.1, and register globals off.

I'm confident that I have the test server running correctly - I have a clean version of RC2.2 and the beta 3 working fine, with register_globals off (I presume both of these come standard ready to work with register globals off?)

I have tried using the php.ini file with register_globals = on (no difference) and two contributions ("osCommerce 2.2ms2-060817 Register Globals Off Workaround for PHP4 and PHP5" and "REGISTER GLOBALS - V 1.5 - Richard Bentley"). With the contributions, there is no difference (except I lose the error about register globals being off after the application_top.php file is edited.

I have tried playing with the configure file: at the moment, my store is pointing to a non existant database etc, yet it isn't giving me any errors about that. In fact if I delete the configure file altogether, it doesn't throw any errors other than the one about register globals being off. I'm really not sure where to go from here: I thought the configure file was the first thing to load, but obviously something else is happening first. Any ideas at all?

TIA.

#2   DunWeb

DunWeb

    The Censored One

  • Members
  • 13,084 posts

Posted 15 May 2010 - 00:55

You can try this for the registered globals issue:

http://addons.oscommerce.com/info/7084

However, you will have HUGE problems using PHP5.3 because of the deprecated EREG code. There is a contribution to update/overwrite the files on a RC2a installation.

http://addons.oscommerce.com/info/7394




Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

#3   bobsi18

bobsi18
  • Members
  • 438 posts

Posted 15 May 2010 - 07:30

You can try this for the registered globals issue:

http://addons.oscommerce.com/info/7084

However, you will have HUGE problems using PHP5.3 because of the deprecated EREG code. There is a contribution to update/overwrite the files on a RC2a installation.

http://addons.oscommerce.com/info/7394

Chris


Thanks for your reply Chris... I currently have a clean vanilla install of v2.2 RC2a running on my test server, running with global registers off and php version 5.3.1, with no issues that I can see. Is this version supposed to work "out-of-the-box" with register globals off? What are the errors that you're referring to, how could I check if they are happening on my clean install?

I'm about to try the contribution you suggested, will report back when I know how that went...

#4   bobsi18

bobsi18
  • Members
  • 438 posts

Posted 15 May 2010 - 08:37

I'm about to try the contribution you suggested, will report back when I know how that went...


Well, I tried the contribution above, but with no luck, currently my site is still using a configure file that points to a non-existant database, without the contribution I get the error "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.". With the contribution I get a blank page, neither is worried about a lack of database. Any ideas?

#5   bobsi18

bobsi18
  • Members
  • 438 posts

Posted 15 May 2010 - 12:42

Well, I tried the contribution above, but with no luck, currently my site is still using a configure file that points to a non-existant database, without the contribution I get the error "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.". With the contribution I get a blank page, neither is worried about a lack of database. Any ideas?


Ok, so I've started to work this out... I needed to find the error_log file (for future reference, on a local server mac setup, it is in /var/log/apache2/error_log). I've slowly been working through the errors (which did include some of the deprecated EREG errors), and am stuck on the following error:

PHP Warning: mysql_num_rows() expects parameter 1 to be resource, null given in /includes/functions/database.php on line 132


Any ideas out there?