Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I have just installed Simple Template System 4.2 from the Contributions section. when I fire up my web site I get the message "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" The web site was working prior to this contribution.

 

Tried the ususl modifying PHP files to set globals to on but doesnt work. Should I install the Globals patch, will this cause problems for the STS files etc.

 

Any help appreciated.

Posted (edited)
I have just installed Simple Template System 4.2 from the Contributions section. when I fire up my web site I get the message "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" The web site was working prior to this contribution.

 

Tried the ususl modifying PHP files to set globals to on but doesnt work. Should I install the Globals patch, will this cause problems for the STS files etc.

 

Any help appreciated.

What version of osCommerce do you have, Ms1 or Ms2? What version of PHP do you have on your server?

 

STSv4.2 does not modify your configure.php or php.ini file. You may have not installed all of the STS files during the FTP upload.

 

Bill Kellum

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Posted
What version of osCommerce do you have, Ms1 or Ms2? What version of PHP do you have on your server?

 

STSv4.2 does not modify your configure.php or php.ini file. You may have not installed all of the STS files during the FTP upload.

 

Bill Kellum

 

Hi Bill, using OSC 2.2ms2, PHP 4.4.2 and XAMPP on local win pc xp for development. XAMPP v 1.5.3.

 

Thanks, Dave

Posted
Hi Bill, using OSC 2.2ms2, PHP 4.4.2 and XAMPP on local win pc xp for development. XAMPP v 1.5.3.

 

Thanks, Dave

Dave, take a look at this:

 

osCommerce has .htaccess files already in place in the (admin directory, for example). These files are in fact Apache server configuration files so they can do more than control access. Because they start with a dot, they do not appear on normal unix directory listings, so they are easy to miss.

 

More information on what can be done in .htaccess (or the main Apache configuration files) is available online at www.apache.org

 

Explanation of .htaccess in osCommerce

 

The osCommerce .htaccess file in the catalog folder is as follows:

 

# $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)

# The <IfModule container should be used to house these listings otherwise, if the PHP installation fails so will the web server.

<IfModule mod_php4.c>

#php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

 

 

NOTE: If the register_globals error does not go away after this section above is uncommented then uncomment the one line only like shown below for the error "register_globals is not enabled in php.ini ... Please enable it!" The "IfModule" directive for PHP doesn't work for all Apache servers (it depends on how PHP was installed). It is not needed if you know that your Apache installation will always include the PHP module.

 

 

#<IfModule mod_php4.c>

#php_value session.use_trans_sid 0

php_value register_globals 1

#</IfModule>

 

# Add for oscommerce safe engine urls set to true in admin - uncomment to use if you get a blank page while clicking on any product links.

# AcceptPathInfo On

 

 

This appears to be a PHP server issue between you and your host provider. Try the fix above and see if it works for you. STS v4.2 has been designed to work under "default" conditions for a standard osCommerce store.

 

Hope this helps,

 

Bill Kellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

  • 4 weeks later...
Posted
Dave, take a look at this:

 

osCommerce has .htaccess files already in place in the (admin directory, for example). These files are in fact Apache server configuration files so they can do more than control access. Because they start with a dot, they do not appear on normal unix directory listings, so they are easy to miss.

 

More information on what can be done in .htaccess (or the main Apache configuration files) is available online at www.apache.org

 

Explanation of .htaccess in osCommerce

 

The osCommerce .htaccess file in the catalog folder is as follows:

 

# $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)

# The <IfModule container should be used to house these listings otherwise, if the PHP installation fails so will the web server.

<IfModule mod_php4.c>

#php_value session.use_trans_sid 0

php_value register_globals 1

</IfModule>

NOTE: If the register_globals error does not go away after this section above is uncommented then uncomment the one line only like shown below for the error "register_globals is not enabled in php.ini ... Please enable it!" The "IfModule" directive for PHP doesn't work for all Apache servers (it depends on how PHP was installed). It is not needed if you know that your Apache installation will always include the PHP module.

#<IfModule mod_php4.c>

#php_value session.use_trans_sid 0

php_value register_globals 1

#</IfModule>

 

# Add for oscommerce safe engine urls set to true in admin - uncomment to use if you get a blank page while clicking on any product links.

# AcceptPathInfo On

This appears to be a PHP server issue between you and your host provider. Try the fix above and see if it works for you. STS v4.2 has been designed to work under "default" conditions for a standard osCommerce store.

 

Hope this helps,

 

Bill Kellum

 

Bill, prior to doing any mods I have confirmed first the following. I can run a fresh version of the very latest OSC on my local XAMPP Apache server on XP ok. I follow your instructions for the Copy Files (for new store only) and then try running the store again. It gives me the "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." error. I can however still run the admin screen ok.

 

I have then convinced myself that the problem arrises when I install STS by copying the original Catalog directory back to my XAMPP directory, over writing your Admin and Includes directorys and all works again.

 

Can you confirm you want me to follow the path as detailed in your last post,

 

Mant thanks for your time

Dave

Posted
Bill, prior to doing any mods I have confirmed first the following. I can run a fresh version of the very latest OSC on my local XAMPP Apache server on XP ok. I follow your instructions for the Copy Files (for new store only) and then try running the store again. It gives me the "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." error. I can however still run the admin screen ok.

 

I have then convinced myself that the problem arrises when I install STS by copying the original Catalog directory back to my XAMPP directory, over writing your Admin and Includes directorys and all works again.

 

Can you confirm you want me to follow the path as detailed in your last post,

 

Mant thanks for your time

Dave

Dave, the issue here is not whether the problem lies with STS, rather, it is "why do you need to need Register Globals turned off?". It is suggested that Register Globals should be turned on for security reasons (see my above post). You may just have your local server mis-configured by having RG turned off and your live server does indeed have RG turned "on" so once you upload your store to the live server you will not have any issues.

 

Otherwise, you can follow the post above and "hack" your way around the RG issue. Also, you may need the Register Globals patch located in the osCommerce Contribution section.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Posted
Dave, the issue here is not whether the problem lies with STS, rather, it is "why do you need to need Register Globals turned off?". It is suggested that Register Globals should be turned on for security reasons (see my above post). You may just have your local server mis-configured by having RG turned off and your live server does indeed have RG turned "on" so once you upload your store to the live server you will not have any issues.

 

Otherwise, you can follow the post above and "hack" your way around the RG issue. Also, you may need the Register Globals patch located in the osCommerce Contribution section.

 

 

Hi Bill, Yes thanks for that, got the idea know. Turned globals to on in the php.ini files and its now working ok, will carry on with the install database changes next.

 

Thanks again

 

Dave

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...