Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


awarlock

Recommended Posts

I installed Microsoft IIS 5.1 on Windows XP

I installed PHP 4.3.2

I go to localhost/catalog/catalog/install.php

and i have this error:

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

PLEASE HELP :

:blush:

I too have this problem every time I set up osCommerce on a test server.

First things first: make certain that any PHP file will open. Make a little test file like "Hello World" and give that a whirl.

If PHP is working ok, then the problem is probably that register_globals is actually set to "Off" in php.ini.

First find it, and change the "register_globals" value to "On". Here is the key: save it first in your PHP folder on your "C" drive.

Next save the same php.ini file in your Windows/System 32 folder. It might not hurt to save a copy in INETPUB where your WWWROOT site folders are. This way you fixed your problem and then put the fixed file somewhere that PHP can actually find it.

Link to comment
Share on other sites

Hello, i had this same problem.....

 

you need to create a file (open notepad) and write,

 

register_globals = 1

 

Save the file as

 

php.ini

 

and upload it to the root folder of your site where your stylesheet.css, index.php etc are...

 

PROBLEM SOLVED! (HOPEFULLY)

 

Regards,

Will.

 

Thanks Will, this worked!

Link to comment
Share on other sites

  • 2 weeks later...
Hello, i had this same problem.....

 

you need to create a file (open notepad) and write,

 

register_globals = 1

 

Save the file as

 

php.ini

 

and upload it to the root folder of your site where your stylesheet.css, index.php etc are...

 

PROBLEM SOLVED! (HOPEFULLY)

 

Regards,

Will.

 

 

Hi Will,

 

I tried this one but a new error came up from the server but when I remove it, the "register_globals" error came back again:

 

"CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers."

 

Any idea? Please help.

 

Thanks,

Mike

Link to comment
Share on other sites

Hello, i had this same problem.....

 

you need to create a file (open notepad) and write,

 

register_globals = 1

 

Save the file as

 

php.ini

 

and upload it to the root folder of your site where your stylesheet.css, index.php etc are...

 

PROBLEM SOLVED! (HOPEFULLY)

 

Regards,

Will.

 

I had this same error on my first use of os Commerce, after having it installed w/Fantastico. I followed what you instructed here and that fixed the normal log in for customers (os commerce was loaded into /shop/ directory) - Opening a blank file, adding this one line of text (copy and paste) and saving it as "php.ini" and uploading it made our_domain/shop/ work.

 

BUT- I still had the problem with the shop/admin/ - same error. So I tried it again, only this time uploading the another copy of the file into our /admin/ directory and viola! it fixed that too!

 

Thank you very much.

Link to comment
Share on other sites

  • 3 weeks later...
I installed Microsoft IIS 5.1 on Windows XP

I installed PHP 4.3.2

I go to localhost/catalog/catalog/install.php

and i have this error:

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

PLEASE HELP :

 

I fixed the same problem..

 

just E-mail to web hosting company to fixed php glabal section & they will fixed php problem.

Link to comment
Share on other sites

  • 4 weeks later...

Hi to all to sort the problem put this keys in your .hacces file overwrite all old code

 

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
php_flag register_globals on
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.yoursite.com
AuthUserFile /home/yoursite/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/yoursite/public_html/_vti_pvt/service.grp

do not forget to change code below to your site

 

AuthName www.yoursite.com

AuthUserFile /home/yoursite/public_html/_vti_pvt/service.pwd

AuthGroupFile /home/yoursite/public_html/_vti_pvt/service.grp

Link to comment
Share on other sites

Hello, i had this same problem.....

 

you need to create a file (open notepad) and write,

 

register_globals = 1

 

Save the file as

 

php.ini

 

and upload it to the root folder of your site where your stylesheet.css, index.php etc are...

 

PROBLEM SOLVED! (HOPEFULLY)

 

Regards,

Will.

 

For any new people checking this post out, I followed will's advice and it worked like a charm. The only catch is I was getting this same error message in my root folder and in my admin folder so I had to load the "php.ini" file as Will described into each folder to fix the problem in each area.

 

I'm no PHP pro (I'm quite new to it), but from reading all the posts and relating them to my experience, I made no changes to my website and one day it just wouldn't load and was giving me the "register_globals" error message. The best I can conclude is that the host made a change to the server so that those directories didn't automatically enable the "register_globals" and by simply adding the "php.ini" file you are manually telling it to load "register_globals".

 

Just my observation, it may be way off!

 

-jeff

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

I have the following error as so many people here:

 

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.

 

I tried that with the file to add it to the root folder but same thing happens. My site is located at: www.thehbstore.com

 

Now I heard what a great thing OSC is but so far I have to say that if you are not a programmer then you should stay away...I tried so many things and I can't seem to get it going. Why is a supposed good thing like this OSC giving everyone so much problems? I bought a template from a website for this and paid big bucks for it and now I can not use it...I am somad....arrrrrgh

Link to comment
Share on other sites

Hello :)

I have the same problem: 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.

 

Server PHP Version 5.2.5

 

I tried to comment lines in application_top.php files:

if (function_exists('ini_get')) {

ini_get('register_globals') or exit('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.');

}

 

But after that, sometimes, I get error:

Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home/atvs/domains/atvs.lt/public_html/includes/application_top.php on line 288

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/share/pear') in /home/atvs/domains/atvs.lt/public_html/includes/application_top.php on line 288

 

That default 288 line was:

require(DIR_WS_LANGUAGES . $language . '.php');

I edited it a bit, to:

require('includes/languages/' . $language . '.php');

But still the same...

By the way, I have browsed this forum, found and did this, except applying register_globals patch contribution:

Another alternative is to apply the register_globals patch contribution, and add the following lines at the top of the files:

$HTTP_POST_VARS = $_POST;
$HTTP_GET_VARS = $_GET;


Then the following line to /catalog/include/boxes/languages.php

$PHP_SELF = $_SERVER['PHP_SELF'];


(note, these lines should be added at the top of the file)

and...

$PHP_SELF = $_SERVER['PHP_SELF'];

to /catalog/admin/includes/application_top.php

 

Any good ideas? :blush:

Link to comment
Share on other sites

Here is the problem. I have many osc sites on one host. Everything was going great until they turned off register_globals. I had to install the register_globals contribution and make a few changes here and there with the great help of osc people. Now I think my last problem is this... I have 4 image links near the top of my site that link to internal pages. Everything was ok before the "change" and now they don't work.

 

How can I get these image links working again??

 

Here is a link to the site www.pandbmanufacturing.com

 

The image links are at the top (custom blending, distributors, reverse engineering and private labeling)

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
Hello, i had this same problem.....

 

you need to create a file (open notepad) and write,

 

register_globals = 1

 

Save the file as

 

php.ini

 

and upload it to the root folder of your site where your stylesheet.css, index.php etc are...

 

PROBLEM SOLVED! (HOPEFULLY)

 

Regards,

Will.

 

I had the same problem - this one works!! Thanks so much!! :lol:

 

Cheers,

youlia

Link to comment
Share on other sites

  • 3 weeks later...
Hello, i had this same problem.....

 

you need to create a file (open notepad) and write,

 

register_globals = 1

 

Save the file as

 

php.ini

 

and upload it to the root folder of your site where your stylesheet.css, index.php etc are...

 

PROBLEM SOLVED! (HOPEFULLY)

 

Regards,

Will.

:thumbsup: Thanx you star!! that wrkd a treat Very pleased

Link to comment
Share on other sites

I installed Microsoft IIS 5.1 on Windows XP

I installed PHP 4.3.2

 

I go to localhost/catalog/catalog/install.php

and i have this error:

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

 

 

PLEASE HELP :

If you ar installing a new one go for rc2 osc 2.2.

It takes care of register globals.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

This helped me, thanks

 

 

I purchased a template and after installing it, I received the following error

everytime I tried to access my osCommerce Admin Control Panel.

 

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

 

Solution (This is what worked for me)

Don't touch the (php.ini) file in the Root directory.

Use your favorite text editor to create another (php.ini) file.

Just add the following one line to the (php.ini) file.

register_globals=on

 

Copy this new (php.ini) file to your (public_html/admin) directory.

 

Dan

Link to comment
Share on other sites

i tried everything you guys said and nothing worked

then I found on my working site this .htacces fle

 

 

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

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
#
# AcceptPathInfo On

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

<IfModule mod_php5.c>
 php_value session.use_trans_sid 0
 php_value register_globals 1
</IfModule>
php_value register_globals 1
php_flag display_errors on
php_value error_reporting 7

 

And I copied it in a new site I was trying to install. I have my oscoomerce filew under catalog so in catalog/.htaccess

 

It worked dont know for how long so if you use this keep a back up of the original htaccess file

 

Regards

Link to comment
Share on other sites

  • 2 months later...

By default register_globals is disabled in PHP5 however you should not need to change your php.ini file to get around this problem. If you're paying a hosting company this is probably not a practical solution anyway!

 

Instead, download the latest milestone version and overwrite the following two files on your server -

 

catalog/includes/application_top.php

catalog/includes/functions/session.php

 

 

This solved my register_globals issue

Link to comment
Share on other sites

This helped me, thanks

 

I tried this and it worked! Thank you. However, I also had my host (Ace-Host) edit my servers php.ini file to: register_globals=on

Then I created a file in notepad, named it php.ini put in just the information you gave me and saved it to the main store directory and the admin directory. After that, it all works good again.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...