Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need help please!


deansyme

Recommended Posts

i am getting the following error - FATAL ERROR: register_globals is disabled in php.ini, please enable it!. i have tried the patch and also uploading a php.ini file, my server has just been upgraded tpo php5,,,any ideas?

Thanks

Dean

the more I learn - The more i'll be able to teach!

deano

Scotland's Gift Shop

Link to comment
Share on other sites

Hmm, another template issue!

 

As I said, the patch should have worked so maybe double check the installation. When you use a local php.ini file, if it works, I think you still need a server re-start for it to take effect. Ask your host if you can use it and if they will re-start the server for you.

Another problem you will encounter, is in PHP5, register_long_arrays is also set to off. If you are going to try the php.ini again, as well as register_globals = On, put in register_long_arrays = On

 

Another thing you can try is the .htaccess file in your document root. Add this to the .htaccess file

 

php_value register_globals 1

php_value register_long_arrays 1

 

There are different permutations of that

 

php_flag register_globals on

php_flag register_long_arrays on

Link to comment
Share on other sites

I cant seem to find the .htaccess files.....where are they or will i need to create them?

The template worked fine for months...then they upgraded to php 5...now it doesnt

 

Thanks

Dean

 

 

Hmm, another template issue!

 

As I said, the patch should have worked so maybe double check the installation. When you use a local php.ini file, if it works, I think you still need a server re-start for it to take effect. Ask your host if you can use it and if they will re-start the server for you.

Another problem you will encounter, is in PHP5, register_long_arrays is also set to off. If you are going to try the php.ini again, as well as register_globals = On, put in register_long_arrays = On

 

Another thing you can try is the .htaccess file in your document root. Add this to the .htaccess file

 

php_value register_globals 1

php_value register_long_arrays 1

 

There are different permutations of that

 

php_flag register_globals on

php_flag register_long_arrays on

the more I learn - The more i'll be able to teach!

deano

Scotland's Gift Shop

Link to comment
Share on other sites

I cant seem to find the .htaccess files.....where are they or will i need to create them?

The template worked fine for months...then they upgraded to php 5...now it doesnt

 

Thanks

Dean

 

 

You get one in the osC catalog directory. Add the code to that.

 

register_globals was probably enabled before the upgrade to PHP5 but now it isn't, which is why you are getting these problems now.

Link to comment
Share on other sites

Dean,

 

Understand I have never had to do this so I'm not really sure how it works, however, if you are using the php.ini method I think you would only need the relevant code. i.e

 

register_globals = On

register_long_arrays = On

 

But for it to work, if it will work - not all hosts will allow you to do this - I think the server will need a re-start. I think it should be in the document root, not the osC root. It may need to go above the root, I'm not sure.

 

Again, if it works, the .htaccess file needs only one of the permutations so comment out one set and try, then try the other if it doesn't.

 

# $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 1
#</IfModule>

#php_value register_globals 1
#php_value register_long_arrays 1
php_flag register_globals on
php_flag register_long_arrays on

 

Sorry I can't help more. Maybe someone who knows better will step in.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...