Jump to content



Photo
- - - - -

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


This topic has been archived. This means that you cannot reply to this topic.
27 replies to this topic

#1   bhomis

bhomis
  • Members
  • 67 posts

Posted 07 October 2005 - 00:49

Hi.
I am on a shared server without the ability to have register_globals enabled. I downloaded the correct version of osCommerce which doesn't need register_globals enabled. Installation went fine. I slowly began configuring it and everything was working fine for a few days. I was extremely cautious. Today, everything was working, and I went to increase the width of the box column width of the left side from 125 to 158. The only thing I touched on application_top.php was changing the figure from 125 to 158. It was the only file I touched today too. I FTPed it to my server, and got this:
FATAL ERROR: register_globals is disabled in php.ini, please enable it!
So I thought, okay, I'll just change it back to 125 and leave it the way it was. I did that, put on the server, and the error is still there. Why? How do I fix that?
I can still get the admin page working though.
If anyone can offer help, I'd greatly appreciate it.
Thanks so much,
Bruce

#2   bvaatto

bvaatto
  • Members
  • 29 posts

Posted 07 October 2005 - 00:59

I had the same problem and was told to comment out the application_top file lines below.

// 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!');
//}

Hopefully this helps.

#3   bhomis

bhomis
  • Members
  • 67 posts

Posted 07 October 2005 - 02:16

Hi. Thanks.
I just tried that and there was no change.
Any other ideas?
Thanks again,
Bruce




I had the same problem and was told to comment out the application_top file lines below.

// 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!');
//}

Hopefully this helps.



#4   Vger

Vger
  • Members
  • 16,978 posts

Posted 07 October 2005 - 02:22

I downloaded the correct version of osCommerce which doesn't need register_globals enabled.


There is no version of osCommerce which you can download that does not need Register Globals enabled. You can download osCommerce 2.2 MS2 and then apply the Register Globals Patch Files. Is that what you meant?

Vger

#5   freegood

freegood
  • Members
  • 1 posts

Posted 07 October 2005 - 07:43

Hi.
I am on a shared server without the ability to have register_globals enabled. I downloaded the correct version of osCommerce which doesn't need register_globals enabled. Installation went fine. I slowly began configuring it and everything was working fine for a few days. I was extremely cautious. Today, everything was working, and I went to increase the width of the box column width of the left side from 125 to 158. The only thing I touched on application_top.php was changing the figure from 125 to 158. It was the only file I touched today too. I FTPed it to my server, and got this:
FATAL ERROR: register_globals is disabled in php.ini, please enable it!
So I thought, okay, I'll just change it back to 125 and leave it the way it was. I did that, put on the server, and the error is still there. Why? How do I fix that?
I can still get the admin page working though.
If anyone can offer help, I'd greatly appreciate it.
Thanks so much,
Bruce



Hi Bruce;

I am also new to the OsCommerce community. I have the same problem but, I solve it by loggin in to the hosting server. Under Public_html directory, it should have php.ini file or any top lever directory. Just copy that file and place it in any directory that contain PHP file. You should be get rid the error. Let me know it that help.

#6   bhomis

bhomis
  • Members
  • 67 posts

Posted 07 October 2005 - 18:05

Vger,
Thanks for your reply. That is the version of osCommerce that I'm running, but I'm confused with the whole patch thing. I supposedly downloaded the patch, and all I got was another version of osCommerce. It seems as if I'd be installing the whole thing all over again. I figured the patch would be just a handful of files at most. This is the URL I have for the patch:
http://www.infocuscg...merce-patch.tar

Here's something else. The tech support for my server sent me this reply:

"Both URLs come back with a 403 forbidden error message due to a .htaccess file within the includes directory preventing all access. You can remove that .htaccess file so you will be able to test your PHP pages further."

Being that they're not familiar with osCommerce, I wanted to bounce the idea off everyone here first before attempting this.

If anyone could help with this whole patch thing or any other solution, I'd greatly apprecite it.
Thanks again,
Bruce



There is no version of osCommerce which you can download that does not need Register Globals enabled. You can download osCommerce 2.2 MS2 and then apply the Register Globals Patch Files. Is that what you meant?

Vger



#7   Vger

Vger
  • Members
  • 16,978 posts

Posted 07 October 2005 - 21:13

I would download the official osCommerce 2.2 MS2 from www.oscommerce.com and apply the Register Globals Patch Files (link below my name). I don't know what it is that you are downloading.

Vger

#8   bhomis

bhomis
  • Members
  • 67 posts

Posted 08 October 2005 - 19:41

Vger,
Thanks so much. Being that I already had osCommerce installed, I did as it stated at the bottom - to install the files in the folders except those in the install folder. It seems as if everything is working properly now.
If I made a mistake, please let me know.
Thanks again,
Bruce


I would download the official osCommerce 2.2 MS2 from www.oscommerce.com and apply the Register Globals Patch Files (link below my name). I don't know what it is that you are downloading.

Vger



#9   mikcyd

mikcyd
  • Members
  • 1 posts

Posted 14 October 2005 - 06:23

I work on my desktop, and sometimes on my laptop. As I needed both working with osCommerce, only one of the two was working. Found that if I put this line, for php5:

LoadModule php5_module c:/php/php5apache2.dll
AddModule mod_php5.c
AddType application/x-httpd-php .php

inside my httpd.conf file (located under the apache folder, inside the "conf" file), it fixed the register_globals error and had the osCommerce up and running. Although this fixed my error, I had access to my "httpd.conf" file, which isn't usually accessible if you're on a ISP's server.

hope this helps either way.
miky

#10   Vger

Vger
  • Members
  • 16,978 posts

Posted 14 October 2005 - 11:41

As you've guesssed correctly very few people here will have access to the httpd.conf file - only those with dedicated or virtual dedicated servers.

Vger

#11   pa_trick

pa_trick
  • Members
  • 6 posts

Posted 19 October 2005 - 05:53

Vger;

ok, I have down loaded intalled 2.2 ms2 and then applied all three of the patches on the contribution pages in the order that they were presented... Actually I loaded the last one first hoping that it would do the trick, but when it did not work, I down loaded the other 2 then loaded them sequentially, in order then reloaded the last one. It still does not work.

Is there a reason this patch was not included in the 2.2 ms2?

Patrick

#12   adam1987

adam1987
  • Members
  • 110 posts

Posted 19 October 2005 - 11:30

Hi

I attempted to install oscommerce on my web server but i received the error "FATAL ERROR: register_globals is disabled in php.ini, please enable it!"

So then i installed the patched version of OSC

But now when i try to install the STS i receive the "FATAL ERROR: register_globals is disabled in php.ini, please enable it!" Error again.

Could someone please let me know what can be done to overcome this error.

Many Thanks

Adam

#13   Webstera17

Webstera17
  • Members
  • 293 posts

Posted 19 October 2005 - 13:52

Hi

I attempted to install oscommerce on my web server but i received the error "FATAL ERROR: register_globals is disabled in php.ini, please enable it!"

So then i installed the patched version of OSC

But now when i try to install the STS i receive the "FATAL ERROR: register_globals is disabled in php.ini, please enable it!" Error again.

Could someone please let me know what can be done to overcome this error.

Many Thanks

Adam


You might have installed the patch wrong. You just extract the files & replace them on the live server where you found them in the extracted files.

Install this patch. It worked for me!

http://www.oscommerc...als Patch Files

#14   adam1987

adam1987
  • Members
  • 110 posts

Posted 19 October 2005 - 14:00

You might have installed the patch wrong. You just extract the files & replace them on the live server where you found them in the extracted files.

Install this patch. It worked for me!

http://www.oscommerc...als Patch Files



Do you have a patch working with STS template system ?

#15   adam1987

adam1987
  • Members
  • 110 posts

Posted 19 October 2005 - 14:22

Do you have a patch working with STS template system ?



The Patch works fine !!!!!!!!!!!

BUT... as soon as i install the Simple Template System ..... i get that error again ! /pinch.gif' class='bbc_emoticon' alt='>_<' />

#16   darzani

darzani
  • Members
  • 2 posts

Posted 07 July 2006 - 02:09

I have experienced the same problem. The register global patch things work fine with me.

#17   shmekera

shmekera
  • Members
  • 46 posts

Posted 10 October 2008 - 11:28

Open .htaccess (in your catalog root) and add these lines:

<IfModule mod_php4.c>
php_value session.use_trans_sid 0
php_value register_globals 1
</IfModule>

#18   Coopco

Coopco
  • Members
  • 9,557 posts

Posted 10 October 2008 - 11:32

Timely advice.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#19   Kasey Carr

Kasey Carr
  • Members
  • 3 posts

Posted 14 October 2009 - 17:54

Hi. Thanks.
I just tried that and there was no change.
Any other ideas?
Thanks again,
Bruce



Hey

I had the same problem. Which was resolved when I also commented my application.php file and my application_top.pho file in my admin directory

#20   wrangler

wrangler
  • Members
  • 49 posts

Posted 14 January 2010 - 10:04

Hey

I had the same problem. Which was resolved when I also commented my application.php file and my application_top.pho file in my admin directory


I confirm this too.
I have commented out these lines
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.');
 }
in /admin/includes/application_top.php and /includes/application_top.php and the site is now working well.
Hope this helps someone.