Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


aideenm

Recommended Posts

I keep receiving the following message:

 

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

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. (index.php)

 

 

My .htaccess reads as follow:

 

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

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

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

 

# php_value session.use_trans_sid 0

# php_value register_globals 1

 

 

 

 

My Php_ini reads as follows:

<?php

// Put all the php.ini parameters you want to change below. One per line.

// Follow the example format $parm[] = "parameter = value";

$parm[] = "register_globals = Off";

$parm[] = "session.use_trans_sid = 0";

// full unix path - location of the default php.ini file at your host

// you can determine the location of the default file using phpinfo()

$defaultPath = '/usr/local/lib/php.ini';

// full unix path - location where you want your custom php.ini file

$customPath = "/home/user/public_html/php.ini";

// nothing should change below this line.

if (file_exists($defaultPath)) {

$contents = file_get_contents($defaultPath);

$contents .= "\n\n; USER MODIFIED PARAMETERS FOLLOW\n\n";

foreach ($parm as $value) $contents .= $value . " \n";

if (file_put_contents($customPath,$contents)) {

if (chmod($customPath,0600)) $message = "The php.ini file has been modified and copied";

else $message = "Processing error - php.ini chmod failed";

} else {

$message = "Processing error - php.ini write failed";

}

} else {

$message = "Processing error - php.ini file not found";

}

echo $message;

?>

Link to comment
Share on other sites

do the search on this forum, this topic is discussed several time, also you will find special contribution.

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...