Latest News: (loading..)

Archived

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

bobsi18

Register Globals

5 posts in this topic

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites