Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Register Globals


Guest

Recommended Posts

Posted

Hi, I'm a complete nube when it comes to osCommerce but would like to give it a whirl and see if it works for my requirements.

 

I've downloaded the latest version and moved the catalog directory to wwwroot/catalog but when I use

 

http://mydomain.com/catalog/install/install.php I get the following error:

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

 

I have contacted my host but they will not enable gloabals... google searches show a number of threads but no resolutions short of enable globals - is there anything I can do???

 

Ps. Host is a Windows server, PHP 4.1, and MySQL

 

thx.. Paul

Posted

You can find another webhost, or wait for the release of MS3, or install the Register Globals contribution :)

 

Matti

Posted

Hi, I've had the same problem stopping me from installing smoothly, when I try and access the install file to start the install procedure it warns me that register_globals is disabled, after checking the php.ini file and changing it - it only reverts back to 'off' from the 'on' I changed it to after every reboot. I couldn't unerstand the contribution - maybe you'll have more success with it possibly.

 

I eventually found that someone had commented out the bit about checking the globals in the : application.php file, which can be found in the catalog/install/includes folder. Below is the version I run which enabled me to somehow by pass this problem, if you want to try it just make a back up your extisting one - there is only x2 slashes commenting out 1 line though!

 

<?php
/*
 $Id: application.php,v 1.5 2003/07/09 01:11:05 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Set the level of error reporting
 error_reporting(E_ALL & ~E_NOTICE);

// Check if register_globals is enabled.
// Since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.
// if (function_exists('ini_get')) {
// ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');
// }"

 require('includes/functions/general.php');
 require('includes/functions/database.php');
 require('includes/functions/html_output.php');
?>

 

 

If anyone else thinks I've compromised something by using this code snippet then please say. Thanks. Sean

Posted

I'm sure that when I installed a previous copy of osCommerce, I had register globals off and I didn't get any errors - has something changed in this latest version regarding this?

 

Don't they recommend running php with register globals off anyway?

 

Lar

Posted
Don't they recommend running php with register globals off anyway?

 

this is true - and I did turn them off after the installation was complete, also the version that I had problems with installing was being run locally on my computer - the one on the web I run didn't give me any such problems curiously. But yes I think that's right about running PHP with register globals off.

 

Sean

Posted

Hi,

 

You can find another webhost, or wait for the release of MS3, or install the Register Globals contribution  :)

 

I have been informed by some Sitepoint guru that having register globals on is a big security risk. As I do hosting myself and have one osCommerce site going, and 2 more in the pipeline, the default setting for register globals as on at present would seem not to be a wise choice. :(

 

Is osCommerce at risk with register globals "on" ??

 

(We can change .htaccess to turn it off).

 

Peter

  • 1 year later...
Posted

I have a original version of OSC working then I decided to update the look and feel of the website and bought something from Template Monster (140$).

 

When I installed this new template it told me to turn register globals on. Knowing a bit of php, I knew there is a security risk linked and that my hosting will never in a lifetime do this. Template Monster literally told me to change hosting. They asked for my FTP access so they can "Fix" it and nothing is fixed, nothing is done and nothing was working.

 

I've installed the patch as they said and it still do not work.

 

In the end, I created my own design template, intalled STS. Now my online store works.

 

Template Monster still did not reimbursed my money. Their template is useless to me. They put my tickets on HOLD and the other one they IGNORED.

Posted

I have a original version of OSC working for several months already then I decided to update the look and feel of the website and bought something from Template Monster (140$).

 

When I installed this new template it told me to turn register globals on. Knowing a bit of php, I knew there is a security risk linked and that my hosting will never in a lifetime do this. Template Monster literally told me to change hosting. They asked for my FTP access so they can "Fix" it and nothing is fixed, nothing is done and nothing was working.

 

I've installed the patch as they said and it still do not work.

 

In the end, I created my own design template, intalled STS. Now my online store works.

 

Template Monster still did not reimbursed my money. Their template is useless to me. They put my tickets on HOLD and the other one they IGNORED.

Posted
after checking the php.ini file and changing it -

 

Hi it seems to me that the php.ini file has no importance here. when i uploaded my files to the host, I only uploaded the /catalog directory and php.ini is not therein.

Posted

I assume that users have in the past installed OS Commerce on both windows and linux hosts?

Posted

Is this the right .htaccess file to have in the /catalog directory?

 

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals on

#</IfModule>

 

php_flag register_globals on

php_value register_globals on

Archived

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

×
×
  • Create New...