valley Posted May 3, 2003 Share Posted May 3, 2003 Hello I have version 1.34 installed and working since several days This is what I enjoy in ocCommerce most. However I notice a couple of problems. Though my server is in the US I live in the UK and my time is GMT . The time shown in the tracker is the server time (GMT-5) I presume I need to insert the deffenitions as I have seen in the earlier postings by Robert - ready for those who have set define ('TIME', strtotime(gmstrftime("%Y-%m-%d %H:%M:%S", strtotime ("- 5 hour")))); define ('NOW', gmdate ('Y-m-d H:i:s', time() - 5 *3600)); in their application_top.php (admin & catalog) the '- 5' in both lines is the timezone difference on my server and my timezone - and more changes I suppose I need to set to -0 instead of -5 hour I have also changed the usertracking.php code to as suggestedby Robert in another posting for those who made the above setting <!-- $current_time = time(); if ($skip_tracking[$wo_ip_address] != 1) $corrected_page_desc = ereg_replace("[']", "'", $page_desc); tep_db_query("insert into " . TABLE_USER_TRACKING . " (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, page_desc) values ('" . $wo_customer_id . "', '" . $wo_full_name . "', '" . $wo_session_id . "', '" . $wo_ip_address . "', '" . $current_time . "', '" . $current_time . "', '" . $wo_last_page_url . "', '" . $corrected_page_desc . "')"); } ?> --> Now I get the following error messgae in the footer of the page 1064 - You have an error in your SQL syntax near 's New Here?')' at line 1 insert into user_tracking (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url, page_desc) values ('', 'Guest', 'cc970fd267f45132e03d32239efc2007', '213.78.114.13', '1051965248', '1051965248', '/', 'What's New Here?') [TEP STOP] I suppose it is a syntax error in $corrected_page_desc = ereg_replace("[']", "'", $page_desc); Am I doing the right thing ? I am now going to change to GMT -0 and will report Quote Link to comment Share on other sites More sharing options...
mugitty Posted May 3, 2003 Share Posted May 3, 2003 I am getting erroneous returns, such as my session showing me from Italy, when I am in Washington state and my current DSL IP is a GTE connection in Texas. Also getting still a lot of entries that don't show the flag and some that are calling for a "Europe" flag (eu.gif) I also have frequent Fatal error: error traversing database - perhaps it is corrupt? in /home/farmex/public_html/osc/includes/geoip.inc on line 220 appearing immediately after the "Country" entry on a listing, for which I cannot find a reason. Is anyone else experiencing these anomolies, or do you think I ought to try to re-install the database tables associated with this mod? Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
networkdad Posted May 3, 2003 Share Posted May 3, 2003 I'm just now installing this on a snapshot from 03-31-2003, and in the instructions in /catalog/includes/application_top.php it says to: find in same file: tep_session_start(); add after: // user_tracking modifications if (!$referer_url) { $referer_url = $HTTP_SERVER_VARS['HTTP_REFERER']; if ($referer_url) { tep_session_register('referer_url'); } } In my application_top.php, i've got 4 instances of tep_session_start();, as seen here: if (isset($HTTP_COOKIE_VARS['cookie_test'])) { tep_session_start(); $session_started = true; if ($spider_flag == false) { tep_session_start(); $session_started = true; if ($spider_flag == false) { tep_session_start(); $session_started = true; } } else { tep_session_start(); $session_started = true; Do i need to add the new piece of code after every single instance, or just the first one? Thanks for any insight.. Quote Link to comment Share on other sites More sharing options...
mugitty Posted May 4, 2003 Share Posted May 4, 2003 Jason; I was going to jump right in here and answer your question for you, because I didn't recall having any hesitation about where to put that code snippet BUT my catalog/includes/application_top.php only has 1 instance of tep_session_start(); in it :( Do you by chance have an add-on that deals with controlling sessions re:spiders, as that might be where the additional instances are coming from (or the recent releases might already have that built in - mine is from 12/17/02) if it's any help, the code surrunding the area where I made my insertion is: // lets start our session if ($HTTP_POST_VARS[tep_session_name()]) { tep_session_id($HTTP_POST_VARS[tep_session_name()]); } if ( (getenv('HTTPS') == 'on') && ($HTTP_GET_VARS[tep_session_name()]) ) { tep_session_id($HTTP_GET_VARS[tep_session_name()]); } if (function_exists('session_set_cookie_params')) { session_set_cookie_params(0, substr(DIR_WS_CATALOG, 0, -1)); } tep_session_start(); // user_tracking modifications if (!$referer_url) { $referer_url = $HTTP_SERVER_VARS['HTTP_REFERER']; if ($referer_url) { tep_session_register('referer_url'); } } // Create the cart & Fix the cart if necesary if (is_object($cart)) { if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new shoppingCart; $cart->unserialize($broken_cart); } } else { tep_session_register('cart'); $cart = new shoppingCart; } Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
networkdad Posted May 4, 2003 Share Posted May 4, 2003 Jason; I was going to jump right in here and answer your question for you, because I didn't recall having any hesitation about where to put that code snippet BUT my catalog/includes/application_top.php only has 1 instance of tep_session_start(); in it :( Do you by chance have an add-on that deals with controlling sessions re:spiders, as that might be where the additional instances are coming from (or the recent releases might already have that built in - mine is from 12/17/02) if it's any help, the code surrunding the area where I made my insertion is: Thanks for the info on your code - i took a look at the original application_top.php from the 3/31/03 snap, and it has the 3 tep_session_start() in it, as i still do. This snapshot has spider control built into it, and it works quite well, controlling the sessions. I guess there's nothing to do but try and insert the code where it belongs best, and test it. :wink: Quote Link to comment Share on other sites More sharing options...
networkdad Posted May 4, 2003 Share Posted May 4, 2003 Stuart, thanks again for the code. That really helped out, as it appears to be working properly. I stuck it right before: // Create the cart & Fix the cart if necesary if (is_object($cart)) { if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new shoppingCart; $cart->unserialize($broken_cart); Quote Link to comment Share on other sites More sharing options...
mugitty Posted May 4, 2003 Share Posted May 4, 2003 I've noticed that when I have the track Admin function disabled, I still get an entry showing myself when I delete a session from the session listing. Is this normal behaviour? It would also be nice to hear from anyone as to whether they are having the error mentioned earlier that stops the output right after "Country" on some entries and if anyone else is having flags show up for countries that all of the information indicates are in a different country. A couple of the current ones: :? These folks are supposedly from the Ukraine TARGET: 206.104.227.165 NAME: NETBLK-SPRINT-BLKG NUMBER: 206.104.0.0 - 206.107.255.255 CITY: RESTON STATE: VIRGINIA COUNTRY: US LAT: 38.94 LONG: -77.35 and these folks are in Finland TARGET: 66.242.195.60 NAME: MADT-NET-1 NUMBER: 66.242.192.0 - 66.242.207.255 CITY: HAMEL STATE: ILLINOIS COUNTRY: US LAT: 38.88 LONG: -89.87 Also... is there an EU flag? I guess I need to find one since some of the listings are showing up as being from "Europe" Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
Guest Posted May 7, 2003 Share Posted May 7, 2003 Thanks for this :D Although I have to admit that I almost didn't go through all the pages about this thread to try and get my problem solved. Good thing I *did* exhibit patience, since my question was answered on the very last page (21)! Thanks again! I'm looking forward to using this contribution a lot! Laura Quote Link to comment Share on other sites More sharing options...
jinlu Posted May 12, 2003 Share Posted May 12, 2003 I installed the User Tracking with Admin 1.34. I love it. It works great! However, the "Originating URL" field always be empty. It is very important to find out which web site refer customer to my web site. Can anyone tell me what's the problem? Thanks a lot. Jin Lu Quote Link to comment Share on other sites More sharing options...
JenRed Posted May 16, 2003 Share Posted May 16, 2003 I have just upgraded from 1.33 to 1.34 because I thought it would get it to show the referring URLs and a few extra bits, but now it is much worse! I don't have flags, I only have one session displaying (ie. if another person comes along it just makes that the one session), nothing at all happens when I click on "veiw session", and I am missing lots of other bits. Here is a screenshot: and here is Greg's screenshot of what it should look like from a few pages back on this thread: Does anyone here know what is happening? Not sure what other info you need, so please ask. thanks Jen Quote I haven't lost my mind - I have it backed up on disk somewhere. Link to comment Share on other sites More sharing options...
valley Posted May 16, 2003 Share Posted May 16, 2003 Hi Jen I am not at all an expert, so don't count on what I say too much I am enjoying Version 1.34 several weeks now I got dislocatedscreens like yours when I changed other pages (product info etc) to a different language like german or spanish So please check all your language related file settings in the Install text. Set up for all languages. Make sure you have laded the images of flags to the correct directory and have set the permissions correctly I still don't get the reffering URL for all , I am investigating It looks like if the page is loaded through a script from the reffering URL it doesn't show up. Quote Link to comment Share on other sites More sharing options...
ardit Posted May 20, 2003 Share Posted May 20, 2003 Hi, I have to questions. 1) The script runs really slowww. It takes 2 min to desplay the page. Anything I can do to speed it up? 2) And for all of the session I get "session expired" in minutes after the user has left the site so I cannot see the User Shopping Cart Content. Quote Link to comment Share on other sites More sharing options...
Mark Russell Posted May 28, 2003 Share Posted May 28, 2003 I also have frequent Quote: Fatal error: error traversing database - perhaps it is corrupt? in /home/farmex/public_html/osc/includes/geoip.inc on line 220 appearing immediately after the "Country" entry on a listing, for which I cannot find a reason. Is anyone else experiencing these anomolies, or do you think I ought to try to re-install the database tables associated with this mod? I got sick of seeing this error come up so I just commented out line 220 in geoip.inc. /* trigger_error("error traversing database - perhaps it is corrupt?", E_USER_ERROR); */ This appears to have worked! No more errors... Too easy? :D M Quote Link to comment Share on other sites More sharing options...
mugitty Posted May 28, 2003 Share Posted May 28, 2003 Quote: I also have frequent Quote: Fatal error: error traversing database - perhaps it is corrupt? in /home/farmex/public_html/osc/includes/geoip.inc on line 220 appearing immediately after the "Country" entry on a listing, for which I cannot find a reason. Is anyone else experiencing these anomolies, or do you think I ought to try to re-install the database tables associated with this mod? I got sick of seeing this error come up so I just commented out line 220 in geoip.inc. /* trigger_error("error traversing database - perhaps it is corrupt?", E_USER_ERROR); */ This appears to have worked! No more errors... Too easy? I ended up grabbing a new copy of the .dat file a week or so ago and it seemed to clear up not only the above error, but also the incorrect countries being assigned to sessions. Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
Mark Russell Posted May 29, 2003 Share Posted May 29, 2003 where did you get the .dat file? M Quote Link to comment Share on other sites More sharing options...
mugitty Posted May 29, 2003 Share Posted May 29, 2003 The same address that's in the contribution instructions: http://www.maxmind.com/download/geoip/data...se/GeoIP.dat.gz Quote ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
Mark Russell Posted May 29, 2003 Share Posted May 29, 2003 Thanks for the pointer to that file. I restored line 220 back to original state and uploaded the new .dat file. Flags work and no 'traverse errors'. Muggity, you did it! This thread can now be closed. :wink: Mark Quote Link to comment Share on other sites More sharing options...
j007w Posted June 9, 2003 Share Posted June 9, 2003 CorshasScott Coggins Joined: 17 Apr 2003 Posts: 10 Posted: Tue Apr 29, 2003 12:07 pm Post subject: -------------------------------------------------------------------------------- These are the errors that I am getting. What file or direcory should I make Warning: main(../../catalog/includes/functions/user_tracking.php) [function.main]: failed to create stream: No such file or directory in /hsphere/local/home/scot0/corshas.com/admin/includes/footer.php on line 48 Fatal error: main() [function.main]: Failed opening required '../../catalog/includes/functions/user_tracking.php' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/scot0/corshas.com/admin/includes/footer.php on line 48 I have the exact problem but couldn't find an answer. I have the admin folder on the same level as the catalog folder instead of inside it. Can someone please help? Thanks, Joseph Quote Link to comment Share on other sites More sharing options...
j007w Posted June 9, 2003 Share Posted June 9, 2003 Not sure if this would cost any harm or enaccuracies, but I moved the catalog/includes/functions/user_tracking.php to admin/includes/functions/user_tracking.php. Then changed admin/includes/footer.php to the following: <?php /*user tracking admin contribution*/ require(DIR_WS_FUNCTIONS . 'user_tracking.php'); if ( ADMIN_CONFIG_USER_TRACKING == 'true') { tep_update_user_tracking(); } ?> Everything seems fine so far. Did I mess up the code in any way? Thanks, Joseph http://www.intelligencegroup.net Quote Link to comment Share on other sites More sharing options...
j007w Posted June 9, 2003 Share Posted June 9, 2003 Ok, now I'm getting fatal errors not finding the user_tracking.php file in the catalog. I copied the file back in catalog/includes/functions/user_tracking.php so that both catalog and admin folders have the same file. No error messages yet. Is it ok to do this? Please help. Thanks, Joseph Quote Link to comment Share on other sites More sharing options...
lucilue2003 Posted June 9, 2003 Share Posted June 9, 2003 can someone please send me a link to the live contribution. I would love to see it before trying to install it. Thanks. Quote Link to comment Share on other sites More sharing options...
davidturetsky Posted June 9, 2003 Share Posted June 9, 2003 This is an admin contribution. Not many people would be willing to share their admin section for your viewing pleasure. I have used this script for months and it is an invaluable tool for understanding who uses my site and what products they are looking for. Quote Link to comment Share on other sites More sharing options...
bdaug001 Posted June 14, 2003 Share Posted June 14, 2003 I recently had a problem with the user tracking admin display loading very slowly (in excess of 60secs) and saw from browsing the forum that a couple other people had the same problem. Forgive me for reposting if a solution to this has already been found. Basically, the bottleneck in the script is the line in the admin/user_tracking.php file that contains 'gethostbyaddr'. Basically what this is doing is calling the system to do a hostname lookup on every single ip address on the page, and it does this for every page hit (for example, if you click view session, it again tries a reverse lookup on every ip addr on the page). If any of these lookups fails, the script will hang there for a few secs before moving on. The quick solution to this is to comment out that line (change 'echo gethostbyaddr' to '//echo gethostbyaddr'). I have modified my install so that the store does a reverse dns the first time the user visits the store, stores this info in the database, and then sets a session variable so that this lookup doesnt occur again. This has speeded up the script operation for me tremendously, and the page loads in about 3 secs with 700-1000 users' information. Hopefully other will find this information useful, and again good job to the author of User Tracking for an awesome contribution. I think it is probably the coolest contribution I have seen, and is always my first stop when i log into my admin :) :) Quote --B Link to comment Share on other sites More sharing options...
aceadoni Posted June 26, 2003 Share Posted June 26, 2003 In admin I get this error. I have not been able to fix it using notes from this thread. Fatal error: Call to undefined function: tep_parse_category_path() in /includes/functions/user_tracking.php on line 47 Any help PM me or email [email protected] Quote Link to comment Share on other sites More sharing options...
Guest Posted June 28, 2003 Share Posted June 28, 2003 Hello, I just installed this contribution and its great! Installation was quick and easily explained which was very nice. I have a few question and suggestions however since I see its still being worked on. 1. First thing would be to know if and how you can add multiple IPs in the "exclude this IP-Address" section in the Admin Config? I've attempted to list a number of IPs using comma, space and slash delimited entries. None of which work and always block only the last IP. 2. At the end of the page there is a line stating the number of Page Views and Customers over the past 24 hours. This should be moved to the top. Perhaps above the first session record. This is something I'd like to be able to view before going down through the sessions. This is so you can take a quick look and see if there are any odd numbers. If your site typically gets 1000 page views and 100 customers each day but suddenly today you see that you've had 2500 page views and 20 customers at 8:00am you really have something to look for. 3. Regarding the same "page views in this 24 hour period" entry. Is this really for the past 24 hours or from the start of the current day? 4. The "SELECT VIEW" line allowing you to view sessions from the past. I found it odd that when you looked at any of the prior days but wanted to go forward the "| Forward to Jun 28, 2003" (next day) link was 3 lines down. I thought the layout should be something like the following along with a "Current Day" link also: SELECT VIEW: Back to Jun 26, 2003 | Forward to Jun 28, 2003 | Current Day 5. The "View Session" link should also include either a "Close Session" link or instead of re-displaying the complete page simply have the session data viewed in a new window/popup box. 6. I noticed there was no way of setting a max number of sessions per page. If someone wanted to set the "Session Limit" in the config really high it would be nice to be able to view 25, 50 or 100 sessions only per page with a "Next Page" link below. 7. I've just found that while clicking on any of the Categories/Products in the Admin panel I get the following error although I'm NOT getting the error anywhere else: Fatal error: Call to undefined function: tep_parse_category_path() in /path/to/admin/includes/functions/user_tracking.php on line 47 Any page under Categories/Products, including viewing the listings, editing or adding new products or categories I get this error but no other page either in the admin or catalog sections. The only modifications I've made to to original admin/categories.php file was to add the "Enable Disable Categories 1.3.1" contribution (also another great addition!). Any suggestions on why this error is only happening when the categories.php file is being called would be greatly appreciated! Please note that the suggestions are simply that... suggestions that I thought the contributions could use and figured I'd pass them along to the developer/s here. Hope my suggestions are useful. This contribution even as it currently sets up is great! Many Thanks to Robert Hellemans and also Greg Williams. 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.