Joed Posted March 10, 2008 Posted March 10, 2008 Just upgraded to 2.x and when I go to the admin page I get the following error message. Parse error: syntax error, unexpected T_IF in /home/fhlinux189/y/xxxxxx.org.uk/user/htdocs/catalog/admin/includes/functions/compatibility.php on line 32 Lines 32 to 42 are if (PHP_VERSION >= 4.1) { $HTTP_GET_VARS =& $_GET; $HTTP_POST_VARS =& $_POST; $HTTP_COOKIE_VARS =& $_COOKIE; $HTTP_SESSION_VARS =& $_SESSION; $HTTP_POST_FILES =& $_FILES; $HTTP_SERVER_VARS =& $_SERVER; } else { if (!is_array($HTTP_GET_VARS)) $HTTP_GET_VARS = array(); if (!is_array($HTTP_POST_VARS)) $HTTP_POST_VARS = array(); if (!is_array($HTTP_COOKIE_VARS)) $HTTP_COOKIE_VARS = array(); The php version on my server is 5.2.x
Guest Posted March 10, 2008 Posted March 10, 2008 you need to post a couple of the lines before line 32
Joed Posted March 10, 2008 Author Posted March 10, 2008 you need to post a couple of the lines before line 32 Thanks, I didn't think of that. The lines below start at line 15 and end at line 42. All the lines above 15 are comments, except for the first one which begins the php. // This is due to the possibility of have an array in// $HTTP_xxx_VARS // Ie, products attributes function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($value)) { do_magic_quotes_gpc($value); } else { $ar[$key] = addslashes($value); } } reset($ar); } if (PHP_VERSION >= 4.1) { $HTTP_GET_VARS =& $_GET; $HTTP_POST_VARS =& $_POST; $HTTP_COOKIE_VARS =& $_COOKIE; $HTTP_SESSION_VARS =& $_SESSION; $HTTP_POST_FILES =& $_FILES; $HTTP_SERVER_VARS =& $_SERVER; } else { if (!is_array($HTTP_GET_VARS)) $HTTP_GET_VARS = array(); if (!is_array($HTTP_POST_VARS)) $HTTP_POST_VARS = array(); if (!is_array($HTTP_COOKIE_VARS)) $HTTP_COOKIE_VARS = array(); Just to be sure I've given enough for people to work with, line 43 is blank and line 44 is // handle magic_quotes_gpc turned off. Oh and the file is the one from the archive, I have not edited it in any way. Hope this is enough for someone to point me in the right direction.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.