Online shop help/ Registerd globals

thebigos

New Member
Messages
5
Reaction score
0
Points
0
I have read the fourms and lernt that it is a risk to have globals turned on so i have been following this page so you dont need it for my script,
http://www.magic-seo-url.com/oscommerce/tips/running-oscommerce-with-register-globals-off.html
Now when i go to my page to install it comes up with,
http://thebigos.x10hosting.com/HTML/catalog/install/
Parse error: syntax error, unexpected '=' in /home/thebigos/public_html/HTML/catalog/install/includes/application.php on line 19

Can any one see what ive done wrong?
 

vTech

New Member
Messages
34
Reaction score
0
Points
0
can u post up the codes to application.php starting from line 1 to 30
seems like a simple editing mistake...
 

thebigos

New Member
Messages
5
Reaction score
0
Points
0
<?php
/*
$Id: application.php,v 1.5 2003/07/09 01:11:05 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);


// Register Globals MOD - http://www.magic-seo-url.com
if (version_compare(phpversion(), "4.1.0", "&lt;") === true) {
$_GET &amp;= $HTTP_GET_VARS;
$_POST &amp;= $HTTP_POST_VARS;
$_SERVER &amp;= $HTTP_SERVER_VARS;
$_FILES &amp;= $HTTP_POST_FILES;
$_ENV &amp;= $HTTP_ENV_VARS;
if (isset($HTTP_COOKIE_VARS)) $_COOKIE &amp;= $HTTP_COOKIE_VARS;
}

if (!ini_get("register_globals")) {
extract($_GET, EXTR_SKIP);
extract($_POST, EXTR_SKIP);
extract($_COOKIE, EXTR_SKIP);
}
// 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!'); }*/
}

require('includes/functions/general.php');
require('includes/functions/database.php');
require('includes/functions/html_output.php');
/database.php');
require('includes/functions/html_output.php');
?>
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
As I said in my previous post, you need to replace the html entities. Also, it looks like there's some useless code with those require statements at the bottom. I believe this would work as intended:

PHP:
<?php
/*
$Id: application.php,v 1.5 2003/07/09 01:11:05 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);


// Register Globals MOD - http://www.magic-seo-url.com
if (version_compare(phpversion(), "4.1.0", "<") === true) {
$_GET &= $HTTP_GET_VARS;
$_POST &= $HTTP_POST_VARS;
$_SERVER &= $HTTP_SERVER_VARS;
$_FILES &= $HTTP_POST_FILES;
$_ENV &= $HTTP_ENV_VARS;
if (isset($HTTP_COOKIE_VARS)) $_COOKIE &= $HTTP_COOKIE_VARS;
}

if (!ini_get("register_globals")) {
extract($_GET, EXTR_SKIP);
extract($_POST, EXTR_SKIP);
extract($_COOKIE, EXTR_SKIP);
}
// 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!'); }*/
}

require('includes/functions/general.php');
require('includes/functions/database.php');
require('includes/functions/html_output.php');
?>
 

thebigos

New Member
Messages
5
Reaction score
0
Points
0
Hi, Thanks for reply ive just tryed that code and now this error comes up,

Parse error: syntax error, unexpected '}' in /home/thebigos/public_html/HTML/catalog/install/includes/application.php on line 33
 

thebigos

New Member
Messages
5
Reaction score
0
Points
0
hi i got rid of that then was able to install it now when i go on the cat or admin i get this come up.

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.
 

thebigos

New Member
Messages
5
Reaction score
0
Points
0
Hi, My account has just been transferd but i still get
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.
Any ideas?
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
Are you sure that you followed all of the steps in that tutorial and uploaded all of the edited files? Specifically the ones which were supposed to have this code commented out:

PHP:
  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.');
  }
 
Top