altermate Posted May 14, 2010 Share Posted May 14, 2010 I install Securitypro and there was a syntax error as follows Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/sharingy/public_html/includes/application_top.php on line 75 any ideas?? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 14, 2010 Share Posted May 14, 2010 (edited) I install Securitypro and there was a syntax error as follows Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/sharingy/public_html/includes/application_top.php on line 75 any ideas?? You should post in the support threads of contributions as opposed to general support. But .. security pro is an easy install you have simply added the application_top code incorrectly. Take it out and try again. Edited May 14, 2010 by FWR Media Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
altermate Posted May 14, 2010 Author Share Posted May 14, 2010 (edited) I did and now it says line 76 error... I'll keep tryin. // FWR Media Security Proif ( defined('FWR_SECURITY_PRO_ON') && FWR_SECURITY_PRO_ON === 'true' ) {$fwr_security_excludes = array();if ( defined('FWR_SECURITY_PRO_FILE_EXCLUSIONS_ON') && FWR_SECURITY_PRO_FILE_EXCLUSIONS_ON === 'true' )$fwr_security_excludes = explode(',', FWR_SECURITY_PRO_FILE_EXCLUSIONS);if ( !in_array(basename($_SERVER['PHP_SELF']), $fwr_security_excludes) )include('includes/functions/security.php');}if ( function_exists('tep_clean_get__recursive') ) {// Recursively clean $HTTP_GET_VARS and $_GET// There is no legitimate reason for these to contain anything but ..// A-Z a-z 0-9 -(hyphen).(dot)_(underscore) {} space$HTTP_GET_VARS = tep_clean_get__recursive($HTTP_GET_VARS);$_GET = tep_clean_get__recursive($_GET);$_REQUEST = $_GET + $_POST; // $_REQUEST now holds the cleaned $_GET and std $_POST. $_COOKIE has been removed.fwr_clean_global($_GET); // Change the $GLOBALS value to the cleaned value}// END - FWR Media Security Pro thats what i entered Edited May 14, 2010 by altermate Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 14, 2010 Share Posted May 14, 2010 I did and now it says line 76 error... I'll keep tryin. // FWR Media Security Proif ( defined('FWR_SECURITY_PRO_ON') && FWR_SECURITY_PRO_ON === 'true' ) {$fwr_security_excludes = array();if ( defined('FWR_SECURITY_PRO_FILE_EXCLUSIONS_ON') && FWR_SECURITY_PRO_FILE_EXCLUSIONS_ON === 'true' )$fwr_security_excludes = explode(',', FWR_SECURITY_PRO_FILE_EXCLUSIONS);if ( !in_array(basename($_SERVER['PHP_SELF']), $fwr_security_excludes) )include('includes/functions/security.php');}if ( function_exists('tep_clean_get__recursive') ) {// Recursively clean $HTTP_GET_VARS and $_GET// There is no legitimate reason for these to contain anything but ..// A-Z a-z 0-9 -(hyphen).(dot)_(underscore) {} space$HTTP_GET_VARS = tep_clean_get__recursive($HTTP_GET_VARS);$_GET = tep_clean_get__recursive($_GET);$_REQUEST = $_GET + $_POST; // $_REQUEST now holds the cleaned $_GET and std $_POST. $_COOKIE has been removed.fwr_clean_global($_GET); // Change the $GLOBALS value to the cleaned value}// END - FWR Media Security Pro thats what i entered Are you using a decent flat file editor or something horrible like dreamweaver? If you are at a loss try something like notepad++. Back to your problem .. revert to your backup of the file and just add the code again .. the code is correct. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
altermate Posted May 14, 2010 Author Share Posted May 14, 2010 thanx..... I'll persist.. Quote Link to comment Share on other sites More sharing options...
MrPhil Posted May 14, 2010 Share Posted May 14, 2010 Start by using [ code ] tags when you post code. What you posted is unreadable. If I untangled it correctly, it's: // FWR Media Security Pro if ( defined('FWR_SECURITY_PRO_ON') && FWR_SECURITY_PRO_ON === 'true' ) { $fwr_security_excludes = array(); if ( defined('FWR_SECURITY_PRO_FILE_EXCLUSIONS_ON') && FWR_SECURITY_PRO_FILE_EXCLUSIONS_ON === 'true') $fwr_security_excludes = explode(',', FWR_SECURITY_PRO_FILE_EXCLUSIONS); if ( !in_array(basename($_SERVER['PHP_SELF']), $fwr_security_excludes) ) include('includes/functions/security.php'); } if ( function_exists('tep_clean_get__recursive') ) { // Recursively clean $HTTP_GET_VARS and $_GET // There is no legitimate reason for these to contain anything but .. // A-Z a-z 0-9 -(hyphen).(dot)_(underscore) {} space $HTTP_GET_VARS = tep_clean_get__recursive($HTTP_GET_VARS); $_GET = tep_clean_get__recursive($_GET); $_REQUEST = $_GET + $_POST; // $_REQUEST now holds the cleaned $_GET and std $_POST. $_COOKIE has been removed. fwr_clean_global($_GET); // Change the $GLOBALS value to the cleaned value } // END - FWR Media Security Pro I have to wonder about the line $_REQUEST = $_GET + $_POST; -- is that legit? I've never seen two arrays added together like that. I have seen array_merge() used. Which line is 76? Does this add-on specify a certain minimum level of PHP? Are you running at least that level? What level of osC? Recent levels of PHP don't by default define $HTTP_GET_VARS -- recent versions of osC have a compatibility layer to create it from the contents of $_GET. Quote Link to comment Share on other sites More sharing options...
altermate Posted May 15, 2010 Author Share Posted May 15, 2010 I'm using Osc 2.2 and I only copied and pasted it into the correct .php.... I'm an extreme amatuer at this and It's all a hit and miss. Thanx Quote Link to comment Share on other sites More sharing options...
MrPhil Posted May 15, 2010 Share Posted May 15, 2010 Which osC 2.2? 2.2 has been out for at least 7 or 8 years and has gone through many iterations -- MS1, MS2, RC1, RC2, RC2a. Where did you get the osC install package from? What is the latest copyright date in the files? For example, includes/application_top.php should say Copyright © 2008 osCommerce. It looks like your code is what is posted in the add-on (assuming you put it in the right place), but I'm still worried about that line I mentioned. Anyone know if that's legit? ($_GET + $_POST) Does that require a certain minimum level of PHP? What error are you getting now, and what is the line it's happening on? Quote Link to comment Share on other sites More sharing options...
altermate Posted May 15, 2010 Author Share Posted May 15, 2010 It's 2008 osCommerce... ($_GET + $_POST) Does that require a certain minimum level of PHP? I'm unsure what that line above means... Ummm... I just copied and pasted what you entered above and it seems to be working. I have turned security pro turned on in the admin and so far theres no error... thanx.. fingers crossed. A big THANK YOU... Oh, is there a way I can tell it's working? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 15, 2010 Share Posted May 15, 2010 I have to wonder about the line $_REQUEST = $_GET + $_POST; -- is that legit? I've never seen two arrays added together like that. I have seen array_merge() used. No it's perfectly valid, the addition operator behaves differently when its operands are arrays, it creates a union of its two operands. It has a few "gotchas" though it doesn't necessarily behave the same as array_merge(); += can also be used as well as equivalence and identity operators. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Ariadnetheweaver Posted May 25, 2010 Share Posted May 25, 2010 Hi! I've also got a problem with Security Pro. Following the instructions. Uploaded the SecurityPro_installer.php to my website (I don't have a /catalog directory, so uploaded it to root. Your instructions say to run the installer and THEN upload the security.php file, and THEN make the page changes. However, on navigating to /(mywebsite)/securitypro_installer.php, I get the following error: Fatal error: Call to a member function add_current_page() on a non-object in C:\Domains\ariadnetheweaver.org\wwwroot\includes\application_top.php on line 313 can you help please? Quote Link to comment Share on other sites More sharing options...
♥FWR Media Posted May 25, 2010 Share Posted May 25, 2010 Hi! I've also got a problem with Security Pro. Following the instructions. Uploaded the SecurityPro_installer.php to my website (I don't have a /catalog directory, so uploaded it to root. Your instructions say to run the installer and THEN upload the security.php file, and THEN make the page changes. However, on navigating to /(mywebsite)/securitypro_installer.php, I get the following error: Fatal error: Call to a member function add_current_page() on a non-object in C:\Domains\ariadnetheweaver.org\wwwroot\includes\application_top.php on line 313 can you help please? That is not a security pro issue it is a well known osCommerce issue. Close ALL your browser windows and try again. Quote Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Ariadnetheweaver Posted May 25, 2010 Share Posted May 25, 2010 found the solution :) in this thread here: http://www.oscommerce.com/forums/topic/265215-call-to-a-member-function-add-current-page-on-a-non-object/ interestingly enough, searching on the forum failed to find it, but google managed. thanks for your reply though Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.