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.
5 replies to this topic

#1   webmaster69

webmaster69
  • Members
  • 116 posts

Posted 24 January 2007 - 17:20

I am trying to install a new copy of OScommerce but get the following warning.

I have used ftp in ASCII mode to upload the directories as instructed. I have entered the URL from my browser which calls the script from the install directory. But I get this error before anything starts to install??

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

#2   nrqln

nrqln
  • Members
  • 12 posts

Posted 26 January 2007 - 15:03

I am trying to install a new copy of OScommerce but get the following warning.

I have used ftp in ASCII mode to upload the directories as instructed. I have entered the URL from my browser which calls the script from the install directory. But I get this error before anything starts to install??

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


-----------------------------
You must edit the /etc/php.ini file; around line 365 there is the directive register_globals = on (yours is off); change it, save the file and restart apache (/etc/init.d/apache2 restart) so that it re-reads the php.ini file; that will solve the problem

Edited by nrqln, 26 January 2007 - 15:03.


#3   chicken

chicken
  • Members
  • 2 posts

Posted 26 January 2007 - 16:49

-----------------------------
You must edit the /etc/php.ini file; around line 365 there is the directive register_globals = on (yours is off); change it, save the file and restart apache (/etc/init.d/apache2 restart) so that it re-reads the php.ini file; that will solve the problem


I also have same problem /crying.gif' class='bbc_emoticon' alt=':'(' /> - where do I find the /etc/php.ini file?

#4   Vger

Vger
  • Members
  • 16,978 posts

Posted 26 January 2007 - 16:51

Server Requirement Error: register_globals is disabled in your PHP configuration
--------------------------------------------------------------------------------
You get this message when Register Globals is set to 'off' in a file called php.ini.
On a shared server you may have access to a 'local' copy of php.ini, but it's most
likely that you won't. If you do then you can edit your local copy to set
Register Globals to 'on'. On a shared server you certainly won't have access to
the main php.ini file which is for all sites on the server.

What can you do if you don't have access to a php.ini file?

1. You can create a file called php.ini and put this inside the file: Register Globals = On
2. You then put this file in the catalog folder (if you use one), and again inside the
admin folder, and yet again inside the install folder.
3. If your site is hosted on an Apache server with a Unix or Linux Operating System then
you can try turning on Register Globals by the use of a .htaccess file in the folder level
where your osCommerce website will be located, with this code in it: php_flag register_globals on
and you can also try: php_value register_globals on or you can try using 1 instead of on
4. You cannot use .htaccess files on a Windows server and the use of .htaccess to turn
on Register Globals may not even work on an Apache server, because your host may have
disallowed it.
5. If all else fails you can install the Register Globals Patch by Richard Bentley which
is available from the Contributions section of the osCommerce Forums. This enables the
default osCommerce to work with Register Globals set to off in php.ini.
6. Be aware that if you use the Register Globals Patch most Contributions (add-ons)
available for osCommerce won't work on your website without modification, because
most are not written to work with Register Globals set to off in php.ini

Vger

#5   chicken

chicken
  • Members
  • 2 posts

Posted 26 January 2007 - 17:14

[quote name='Vger' date='Jan 26 2007, 04:51 PM' post='1012731']
Server Requirement Error: register_globals is disabled in your PHP configuration
--------------------------------------------------------------------------------
You get this message when Register Globals is set to 'off' in a file called php.ini.
On a shared server you may have access to a 'local' copy of php.ini, but it's most
likely that you won't. If you do then you can edit your local copy to set
Register Globals to 'on'. On a shared server you certainly won't have access to
the main php.ini file which is for all sites on the server.

What can you do if you don't have access to a php.ini file?


Many thanks for this - I will start working my through the options.

#6   astronaute

astronaute
  • Members
  • 1 posts

Posted 26 January 2007 - 18:19

Don't EVER enable register_globals.

It's a security hole in your system.

Don't listen people who say that you need it and such things.

http://www.oscommerc...egister_globals

I really hope next versions of osc will implement globals correctly.

cheers.