dr_lucas Posted August 8, 2009 Share Posted August 8, 2009 TROUBLESHOOTING============================================ 1. If your carts don't display, check the setting of STORE_SESSIONS in both includes/configure.php and admin/includes/configure.php. They should match. If not, carts will not display. Hi, For several reasons I must keep my catalog sessions in default and admin stored in mysql, so they don't match, but other user tracking contributions show the visitors cart just fine except for this one which requires the STORE_SESSION match. Why is it required? Is there any workaround to make it work without this requirement? Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
dr_lucas Posted August 8, 2009 Share Posted August 8, 2009 ok, I fixed that annoyance myself. If anybody STORE_SESSIONS set to default in catalog side and STORE_SESSIONS set to mysql in admin do this: Find: if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $session_id . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ((file_exists(tep_session_save_path() . '/sess_' . $session_id)) && (filesize(tep_session_save_path() . '/sess_' . $session_id) > 0)) { $session_data = file(tep_session_save_path() . '/sess_' . $session_id); $session_data = trim(implode('', $session_data)); } } And replace with: /* if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $session_id . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ((file_exists(tep_session_save_path() . '/sess_' . $session_id)) && (filesize(tep_session_save_path() . '/sess_' . $session_id) > 0)) { $session_data = file(tep_session_save_path() . '/sess_' . $session_id); $session_data = trim(implode('', $session_data)); } } */ if ((file_exists(tep_session_save_path() . '/sess_' . $session_id)) && (filesize(tep_session_save_path() . '/sess_' . $session_id) > 0)) { $session_data = file(tep_session_save_path() . '/sess_' . $session_id); $session_data = trim(implode('', $session_data)); } Find: if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $info . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ( (file_exists(tep_session_save_path() . '/sess_' . $info)) && (filesize(tep_session_save_path() . '/sess_' . $info) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $info); $session_data = trim(implode('', $session_data)); } } And replace with: /* if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $info . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ( (file_exists(tep_session_save_path() . '/sess_' . $info)) && (filesize(tep_session_save_path() . '/sess_' . $info) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $info); $session_data = trim(implode('', $session_data)); } } */ if ( (file_exists(tep_session_save_path() . '/sess_' . $info)) && (filesize(tep_session_save_path() . '/sess_' . $info) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $info); $session_data = trim(implode('', $session_data)); } Done. Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
dr_lucas Posted August 9, 2009 Share Posted August 9, 2009 (edited) Actually, here is an even more elegant solution, not just a workaround: Find: if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $session_id . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ((file_exists(tep_session_save_path() . '/sess_' . $session_id)) && (filesize(tep_session_save_path() . '/sess_' . $session_id) > 0)) { $session_data = file(tep_session_save_path() . '/sess_' . $session_id); $session_data = trim(implode('', $session_data)); } } Replace with: // First we check if the session exist in a file, else we will use mysql if ((file_exists(tep_session_save_path() . '/sess_' . $session_id)) && (filesize(tep_session_save_path() . '/sess_' . $session_id) > 0)) { $session_data = file(tep_session_save_path() . '/sess_' . $session_id); $session_data = trim(implode('', $session_data)); } else { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $session_id . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } Find: if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $info . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ( (file_exists(tep_session_save_path() . '/sess_' . $info)) && (filesize(tep_session_save_path() . '/sess_' . $info) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $info); $session_data = trim(implode('', $session_data)); } } Replace with: // First we check if the session exist in a file, else we will use mysql if ( (file_exists(tep_session_save_path() . '/sess_' . $info)) && (filesize(tep_session_save_path() . '/sess_' . $info) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $info); $session_data = trim(implode('', $session_data)); } else { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $info . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } Edited August 9, 2009 by dr_lucas Quote Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
azer Posted August 9, 2009 Share Posted August 9, 2009 for the last version Who's Online Enhancement 3.5.5 Full + IP Address geolocation + Visitors World Map i had an error if you got php the fonction simplexml doesnt exsit it s in php5 you can download a class over there simplexml44 - PHP4 backport of PHP5 SimpleXML then put it in admin/ functions and call it like this : require_once(DIR_WS_FUNCTIONS . 'simplexml/class/IsterXmlSimpleXMLImpl.php'); Because it's not possible to use the PHP5 ArrayIterator interface with PHP4 there are some differences between this implementation and that of PHP5: * The access to the root node has to be explicit in IsterXmlSimpleXMLImpl, not implicit as with PHP5. Write $doc->root->node instead of $doc->node * You cannot access CDATA using array syntax. Use methods CDATA() and setCDATA() instead. * You cannot access attributes directly with array syntax. Always use attributes() to read and setAttribute() to write attributes. * Comments are ignored. * Last and least, this is not as fast as PHP5 SimpleXML--it's pure PHP4. give me some feedback please Quote MS2 Link to comment Share on other sites More sharing options...
azer Posted August 9, 2009 Share Posted August 9, 2009 strange even with included the php4 class i got Fatal error: Cannot instantiate non-existent class: simplexmlelement in v:\easyphp\www\ms2fr\shop\admin\whos_online.php Quote MS2 Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2009 Share Posted August 11, 2009 Hi all, I have just installed 3.5.5 but I see no customer markers on the Google map; has anyone else had a similar problem? Cheers, Paul Quote Link to comment Share on other sites More sharing options...
MichaelB Posted August 11, 2009 Share Posted August 11, 2009 Hi all, I have just installed 3.5.5 but I see no customer markers on the Google map; has anyone else had a similar problem? Cheers, Paul I had it too .... what you have to do is this .... the step where you put your domain in, you have to put in full path to the visitors_georss.php file. That should fix it. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2009 Share Posted August 11, 2009 I had it too .... what you have to do is this .... the step where you put your domain in, you have to put in full path to the visitors_georss.php file. That should fix it. Hi Michael, I am gonna give this a go later tonight; thank you very much for your reply. I'll let ya know how I got on. Cheers, Paul Quote Link to comment Share on other sites More sharing options...
MichaelB Posted August 11, 2009 Share Posted August 11, 2009 Hi Michael, I am gonna give this a go later tonight; thank you very much for your reply. I'll let ya know how I got on. Cheers, Paul NP Paul .... hope that helps you. Just in case, an example ..... 3)In the text you pasted at 2), replace geoXml = new GGeoXml("<?php echo "http://www.example.com/catalog/admin/visitors_georss.php";?>"); with your domain Quote Link to comment Share on other sites More sharing options...
GwilliamP Posted August 13, 2009 Share Posted August 13, 2009 I just tested 3.5.5 on my sandbox site and have a problem. I previously had 3.5.4 running smoothly. The instructions said "Simply run mod.sql and upload files to the admin directory" which I did. The page loads fine with zero activity but as soon as I view any page the following error(s) appear after a slightly longer than usual page reload. Warning: file_get_contents(http://ipinfodb.com/ip_query2.php?ip=<my IP>): failed to open stream: Connection refused in /home/www/<mydomain>.com/_shop_Sandbox/admin/whos_online.php on line 120 Warning: file_get_contents(http://backup.ipinfodb.com/ip_query2.php?ip=<my IP>): failed to open stream: Connection refused in /home/www/<mydomain>.com/_shop_Sandbox/admin/whos_online.php on line 124 Fatal error: Cannot instantiate non-existent class: simplexmlelement in /home/www/<mydomain>.com/_shop_Sandbox/admin/whos_online.php on line 125 I tried a file content search for "simplexmlelement" and drew a blank so wondered if an includes/functions file is missing from the download. I tried a copy/paste of http://ipinfodb.com/ip_query2.php?ip=<my IP> into the browser and get the following. <Locations><Location id="0"> <Ip><my IP></Ip> <Status>OK</Status> <CountryCode>GB</CountryCode> <CountryName>United Kingdom</CountryName> <RegionCode/> <RegionName/> <City/> <ZipPostalCode/> <Latitude>54</Latitude> <Longitude>-2</Longitude> <Gmtoffset>0.0</Gmtoffset> <Dstoffset>1.0</Dstoffset> </Location> </Locations> I have not yet added the Visitors Map, just uploaded the content of the 3.5.5 download. Any suggestions anyone? Paul. Quote Link to comment Share on other sites More sharing options...
MichaelB Posted August 13, 2009 Share Posted August 13, 2009 (edited) I just tested 3.5.5 on my sandbox site and have a problem. I previously had 3.5.4 running smoothly. The instructions said "Simply run mod.sql and upload files to the admin directory" which I did. The page loads fine with zero activity but as soon as I view any page the following error(s) appear after a slightly longer than usual page reload. I tried a file content search for "simplexmlelement" and drew a blank so wondered if an includes/functions file is missing from the download. I tried a copy/paste of http://ipinfodb.com/ip_query2.php?ip=<my IP> into the browser and get the following. I have not yet added the Visitors Map, just uploaded the content of the 3.5.5 download. Any suggestions anyone? Paul. What version of PHP are you running? simplexmlelement is a PHP 5.0+ function (http://us2.php.net/manual/en/function.simplexml-element-attributes.php) A solution to this problem was listed on the 9th by azer. Edited August 13, 2009 by MichaelB Quote Link to comment Share on other sites More sharing options...
GwilliamP Posted August 13, 2009 Share Posted August 13, 2009 What version of PHP are you running? simplexmlelement is a PHP 5.0+ function (http://us2.php.net/manual/en/function.simplexml-element-attributes.php) A solution to this problem was listed on the 9th by azer. I just looked and it is 4.4.2 so I guess I am out of luck. I checked the 'fix' and it look way beyond my ability. I have dabbled with Ubuntu but the Sourceforge download contains a make file that immediately puts me off. I guess I will stick with the old version. Paul. Quote Link to comment Share on other sites More sharing options...
AndreD Posted August 13, 2009 Share Posted August 13, 2009 All I get is: Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /xxxxxxxxxxxxxx/whos_online.php on line 125 As my host said told me, this uses a well known, well exploited security issue, and CURL should be used instead to fetch data. Is there any plan to upgrade this contribution to use curl instead ? Quote Link to comment Share on other sites More sharing options...
AndreD Posted August 13, 2009 Share Posted August 13, 2009 ok, solved it myself, contribution updated with CURL - the secure way to do it.. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2009 Share Posted August 13, 2009 NP Paul .... hope that helps you. Just in case, an example ..... 3)In the text you pasted at 2), replace geoXml = new GGeoXml("<?php echo "http://www.example.com/catalog/admin/visitors_georss.php";?>"); with your domain Hi Michael, I have my domain inserted into the line you pointed me towards in "admin/whos_online.php", but I am still seeing no markers on the map; I have also checked to ensure that my domain is entered correctly in the two defines at the top of "visitors_georss.php". Do you have any other ideas as to what might be preventing this from working correctly? Cheers, Paul Quote Link to comment Share on other sites More sharing options...
golfman2006 Posted August 14, 2009 Share Posted August 14, 2009 Weird SQL error since applying 3.5.5 with the IP Address GeoLocation and still exists with version 3.5.8 posted yesterday. It seems that when someone is online and has a region_name with an apostrophe (or maybe some other special characters like a dash as shown below) in it, the below error is issued. Any help would be appreciated to get the query to allow some of these special characters. Thanks in advance! We are running PHP 5.2.8 and MySQL of 5.0.81 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Azur', `city` = 'Mougins', `latitude` = '43.6', `longitude` = '7' WHERE `ip_add' at line 1 UPDATE `whos_online` SET `country_code` = 'FR',`country_name` = 'France', `region_name` = 'Provence-Alpes-Cote d'Azur', `city` = 'Mougins', `latitude` = '43.6', `longitude` = '7' WHERE `ip_address` = '193.252.149.13' Quote Link to comment Share on other sites More sharing options...
Guest Posted August 15, 2009 Share Posted August 15, 2009 Hi Michael, I have my domain inserted into the line you pointed me towards in "admin/whos_online.php", but I am still seeing no markers on the map; I have also checked to ensure that my domain is entered correctly in the two defines at the top of "visitors_georss.php". Do you have any other ideas as to what might be preventing this from working correctly? Cheers, Paul Hi Paul I have just had the same problem as you - after much messing around I ended up with the following settings which seemed to work: the file visitors_georss.php is in the catalog root not the admin folder - in that file I now have define('FLAGSDIR', 'images/flags/'); define('HTTPSERVER', 'http://domain.co.uk/'); define('WEBSITE', 'http://domain.co.uk/'); My Google API key is for the domain root - http://domain.co.uk in the file admin/whos_online.php the head looks like: <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script type="text/javascript" language="javascript" src="includes/general.js"></script> <?php if ($_GET['map'] != 'show'){ ?> </head> <body> <?php } else { ?> <!-- Mimic Internet Explorer 7 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" > <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAGAk9wthOHAg5utZzp7SMLhTVdhbrmG7g7qE2XB2I-_2d7qrPUxQqBFxKcLKl0HTEBigDqMdXsU5QJg" type="text/javascript"></script> <script type="text/javascript"> var map; var geoXml; var toggleState = 1; function initialize() { if (GBrowserIsCompatible()) { geoXml = new GGeoXml("<?php echo "http://domain.co.uk/visitors_georss.php";?>"); map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(36,2), 1); map.addControl(new GLargeMapControl()); map.addControl(new GLargeMapControl()); map.addOverlay(geoXml); } } </script> </head> <body onLoad="initialize()" onUnload="GUnload()"> Quote Link to comment Share on other sites More sharing options...
Guest Posted August 15, 2009 Share Posted August 15, 2009 (edited) Ooops - unable to edit the above.... Ok this gives me the markers on the Google Map - problem is it also shows the Google Map visiting the site with the IP 72.14.193.5 and the last page visited as /visitors_georss.php In the database the Google map is getting a session_id so is visible in the whos_online table I can exclude the Ip 72.14.193.5 with a little php if() statement. However I am also seeing a visit from Googlebot on 66.249.71.2 - Googlebot is in the includes/spiders.txt file - excluding/including bots makes no difference to this one. Obviously I have done something wrong somewhere that I cannot spot - any clues? Thanks Graeme Edited August 15, 2009 by sakwoya Quote Link to comment Share on other sites More sharing options...
Guest Posted August 16, 2009 Share Posted August 16, 2009 Hi all - solved my above problem If, like me, you have downloaded 3.5.9 you will only have the admin files - there is a missing file and some SQL statements. To fix this download 3.5.4 by SteveDallas and copy the file catalog/includes/functions/whos_online.php to your store. Then run the following in your phpMyadmin: ALTER TABLE whos_online ADD http_referer VARCHAR(255) NOT NULL; ALTER TABLE whos_online ADD user_agent VARCHAR(255) NOT NULL; ALTER TABLE `whos_online` ADD `hostname` VARCHAR( 255 ) NOT NULL AFTER `ip_address` ; This fixed it for me. Graeme (I have an updated package but the contribution page is refusing to let me upload at the present time) Follkes 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 17, 2009 Share Posted August 17, 2009 (I have an updated package but the contribution page is refusing to let me upload at the present time) I see that 3.6 has now been uploaded overnight so I am not going to upload my 3.5.9.1 as this basically means splitting the contribution and when these things fork they get all stupid. If your admin page does not show the http_refrerer or user agent then follow my suggestions above Graeme Quote Link to comment Share on other sites More sharing options...
Guest Posted August 18, 2009 Share Posted August 18, 2009 i've just upgraded to 3.6 from 3.5.4 and i no longer see when people come to visit the site. any one having this problem? Quote Link to comment Share on other sites More sharing options...
golfman2006 Posted August 20, 2009 Share Posted August 20, 2009 Seems one of the flag images is missing in the images folder for a country called "reserved". When a user comes on with the "reserved" in the country, the big red x missing image appears. Did I miss this in the upload or is this actually missing?We are on the latest version 3.6.1. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 21, 2009 Share Posted August 21, 2009 i've just upgraded to 3.6 from 3.5.4 and i no longer see when people come to visit the site. any one having this problem? I am having the same problem. The map shows up, no errors but it does not show when anyone is online. Does anyone know what the problem could be? Quote Link to comment Share on other sites More sharing options...
custompilotshirts Posted August 21, 2009 Share Posted August 21, 2009 Would there be a way to capture the information of who's online and create a listing of everyone who has visited the site for the past 30 days or a user selectable time frame? Maybe also to have it so the map gets cluttered with dots of where people have visited from the past (user selectable days). Thanks, Rob Quote Link to comment Share on other sites More sharing options...
Irin Posted August 25, 2009 Share Posted August 25, 2009 I'm getting a fatal error: Fatal error: Cannot instantiate non-existent class: simplexmlelement in /var/www/shop/admin/whos_online.php and Fatal error: Call to undefined function: stripos() in /var/www/shop/admin/includes/functions/whos_online.php on line 153 I'm upgrading from v3.5.4 to v3.6.3, using PHP Version 4.4.6. 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.