julianpuje Posted August 24, 2005 Share Posted August 24, 2005 Looks like this is going to do exactly what i need. I'm getting the following error though:- Fatal error: error traversing database - perhaps it is corrupt? in /home/julianp/public_html/includes/geoip.inc on line 416 I had all sorts of errors at first and then put the GeoIP.dat file in my catalog/includes folder instead of Admin/includes? Any ideas on what could be wrong. Cheers Julian Quote A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends???? Link to comment Share on other sites More sharing options...
dantotec Posted August 24, 2005 Share Posted August 24, 2005 @equilla Sorry for my late answer. Hi, the problem seems to be that at step 3 in the instructions you have made the changes that were meant for /catalog/includes/application_top.php to /catalog/admin/includes/application_top.php. Take that code out of /catalog/admin/includes/application_top.php and put it in /catalog/includes/application_top.php and hopefully all will be well. Regards Your suggestion was right! Works well now Alex Dantotec Quote Link to comment Share on other sites More sharing options...
equilla Posted August 24, 2005 Author Share Posted August 24, 2005 Looks like this is going to do exactly what i need. I'm getting the following error though:- Fatal error: error traversing database - perhaps it is corrupt? in /home/julianp/public_html/includes/geoip.inc on line 416 I had all sorts of errors at first and then put the GeoIP.dat file in my catalog/includes folder instead of Admin/includes? Any ideas on what could be wrong. Cheers Julian <{POST_SNAPBACK}> Julian, That's right - in the newest version of Supertracker the IP to Country translation files have moved from the catalog side to the admin side, as explained in the readme. The error you are seeing happened to me the first time I tried to use the geoip functions during development. I suspect that you have downloaded the wrong type of GeoIP.dat file from Maxmind's site (there is more than one). Make sure that it is the binary file that you have got there - it should be around 800kb, ish, the other versions are, I think, larger than this. Regards, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
julianpuje Posted August 24, 2005 Share Posted August 24, 2005 Julian, That's right - in the newest version of Supertracker the IP to Country translation files have moved from the catalog side to the admin side, as explained in the readme. The error you are seeing happened to me the first time I tried to use the geoip functions during development. I suspect that you have downloaded the wrong type of GeoIP.dat file from Maxmind's site (there is more than one). Make sure that it is the binary file that you have got there - it should be around 800kb, ish, the other versions are, I think, larger than this. Regards, <{POST_SNAPBACK}> Thanks for the quick reply Mark I think i have the right GeoIP.dat file. It is the binary version and about 800k? So not sure what to do next, any more advice? I'll take another look through the install and try a few different GeoIP.dat files if i can find another binary one. Thanks Julian Quote A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends???? Link to comment Share on other sites More sharing options...
equilla Posted August 24, 2005 Author Share Posted August 24, 2005 Thanks for the quick reply MarkI think i have the right GeoIP.dat file. It is the binary version and about 800k? So not sure what to do next, any more advice? I'll take another look through the install and try a few different GeoIP.dat files if i can find another binary one. Thanks Julian <{POST_SNAPBACK}> Julian, this is a strange one then - I need to think some more about that one.... Actually, just a thought - if it's a binary file guess it should be uploaded in BINARY mode in your ftp client, and not ASCII mode. Might be worth checking your ftp client settings to see what mode it is using. Regards, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
equilla Posted August 24, 2005 Author Share Posted August 24, 2005 Quick one - I have justed posted an update to one of the files on the contribution page. This fixes something which I knew would be a problem, but only remembered to do it when Googlebot and MSNbot walked into a couple my sites this morning! The update is a new version of the /catalog/includes/classes/supertracker.php file and introduces a more intelligent way of working out whether a visitor is a new one, or an existing one continuing their browsing session. So, you should find that spiders now only register as one session and also you don't get repeats of the same visitor registered as separate sessions within seconds/minutes of each other (timeout on this logic is currently set to 30 minutes). Equally, it will stop people coming in on a link with the session ID attached picking up on a session from days/weeks/months ago. This will improve the "average time on site" stats, which can be corrupted with sessions that seemingly last for thousands of minutes. That should be it for the updates for a while now whilst we let things bed in. In the meantime I'll be awaiting any further suggestions in the Development forum whilst I work on more detail for the PPC campaign reporting (geo targetting reports and Sales conversion rate reports, etc). Cheers, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
elv1s Posted August 25, 2005 Share Posted August 25, 2005 Hi there, super contrib. the only thing... The flags don?t load anymore with the latest version. With the older version ("the white / old design") it worked.. What is wrong? thanks gr. kasper Quote My Contribs: - ORDERS AT-A-GLANCE -CUSTOMERS AT-A-GLANCE Link to comment Share on other sites More sharing options...
equilla Posted August 25, 2005 Author Share Posted August 25, 2005 Hi there, super contrib. the only thing... The flags don?t load anymore with the latest version. With the older version ("the white / old design") it worked.. What is wrong? thanks gr. kasper <{POST_SNAPBACK}> Have a look at the url for the images by right-clicking on one and selecting "properties". My guess is that the filename is missing and you just have ".....amin/images/geo_flags/" for each of them. With the new version the update_supertracker.php script should have put a country code in your database for each of the IP addresses already stored - this was necessary because of a way in which the IP address to country resolution is now done. However, I think I may have just found a problem in the install instructions, with the order in which upgrade instructions are followed - did you get an error when you ran the update_supertracker.php script? I would expect this because I have said that you should run update_supertracker.php before moving the geoip files - therefore there would have been a file inclusion error generated... Doh! Anyway, if this is the case, here is the workaround until I get to changing the install instructions: Upload update_supertracker.php again and remove the following lines from the file: //Add the new columns to the database $update_query = "ALTER TABLE `supertracker` ADD `country_code` VARCHAR( 2 ) NOT NULL AFTER `ip_address`"; $update_result = tep_db_query($update_query); $update_query = "ALTER TABLE `supertracker` ADD `country_name` VARCHAR( 100 ) NOT NULL AFTER `country_code`"; $update_result = tep_db_query($update_query); $update_query = "ALTER TABLE `supertracker` ADD `categories_viewed` VARCHAR( 255 ) NOT NULL AFTER `completed_purchase`"; $update_result = tep_db_query($update_query); $update_query = "ALTER TABLE `supertracker` ADD `cart_contents` VARCHAR( 255 ) NOT NULL AFTER `products_viewed`"; $update_result = tep_db_query($update_query); This will stop if trying to add columns which were already added. Now access it again through http://www.youdomain.com/catalog/update_supertracker.php and you should find your flags return once more. Let me know how it goes :-" Regards, Mark Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
elv1s Posted August 25, 2005 Share Posted August 25, 2005 Hi there, thanks a lot! it worked.. just one more question for the moment. i had the "geo" files in my admin folder the first time i installed your contrib. then it worked. now i have to put them in the catalog/includes .... is that correct? gr. kasper Quote My Contribs: - ORDERS AT-A-GLANCE -CUSTOMERS AT-A-GLANCE Link to comment Share on other sites More sharing options...
equilla Posted August 25, 2005 Author Share Posted August 25, 2005 Hi there, thanks a lot! it worked.. just one more question for the moment. i had the "geo" files in my admin folder the first time i installed your contrib. then it worked. now i have to put them in the catalog/includes .... is that correct? gr. kasper <{POST_SNAPBACK}> Yes, that's correct. The reason is one of efficiency in running the reports. Before, the ip addresses were converted to country codes/name every time a report was run in admin. This becomes very intensive when you run the visitor countries report, especially when there are thousands of rows to get through - I was getting php timeouts when processing tens of thousands of rows. I realised that this was completely unecessary as the ip to country resolution could simply be done once when the new visitor is first recorded by the catalog side code. That is why the files had to be moved over. Regards, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
julianpuje Posted August 25, 2005 Share Posted August 25, 2005 (edited) Julian, this is a strange one then - I need to think some more about that one.... Actually, just a thought - if it's a binary file guess it should be uploaded in BINARY mode in your ftp client, and not ASCII mode. Might be worth checking your ftp client settings to see what mode it is using. Regards, <{POST_SNAPBACK}> Hi I've done the complete upload again and got a fresh binary GeoIP.dat file from the site. I ftp'd this folder in binary mode and still no luck. Exactly the same error. Any ideas, thanks. Julian Fatal error: error traversing database - perhaps it is corrupt? in /home/julianp/public_html/includes/geoip.inc on line 416 Edited August 25, 2005 by julianpuje Quote A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends???? Link to comment Share on other sites More sharing options...
tuppergirl Posted August 25, 2005 Share Posted August 25, 2005 (edited) Hi Equillia, I think I'm having the same problem too. Warning: fopen(includes/GeoIP.dat): failed to open stream: No such file or directory in /home/****/public_html/store/includes/geoip.inc on line 322 Another question is.. in /catalog/admin/includes/boxes/reports.php where we have to add '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>'); , can I replaced by tep_admin_files_boxes('supertracker.php', 'Supertracker') or [tep_admin_files_boxes(FILENAME_SUPERTRACKER, BOX_REPORTS_SUPERTRACKER) [/code] because I've admin access control contribution installed. I can't test out if either works because of the above error I had. Another question which is irrelevant to this contribution is.. I'm rather new to PHP and wonder if omiting the 'NONSSL'. does it pose any conflicts or problems in handling payment or sessions? Thanks for any input in advance. Edited August 25, 2005 by tuppergirl Quote Link to comment Share on other sites More sharing options...
tuppergirl Posted August 25, 2005 Share Posted August 25, 2005 Apologies.. my mistake, I got it solved and it works fine! However, I'm curious about omiting the "NONSSL".. does it pose any problems? I'm not running a store but using OsC as a learning platform for PHP and MySql, so I have no idea how it will affect a live store if "NONSSL" is omited.. anyone can kindly let me know? Thanks Quote Link to comment Share on other sites More sharing options...
elv1s Posted August 25, 2005 Share Posted August 25, 2005 Hi Equillia, Well, i just got online again and i saw that the flags for the new visits were not there. The old visits - from yesterday - were there. Than when i ran the update_supertracker.php they are there again. There is something wrong with that, isn?t it? What can i do to show the flags right away and not having to run the update_supertracker.php first.? thanks gr. kasper Quote My Contribs: - ORDERS AT-A-GLANCE -CUSTOMERS AT-A-GLANCE Link to comment Share on other sites More sharing options...
equilla Posted August 25, 2005 Author Share Posted August 25, 2005 (edited) Hi again, I suspect that you haven?t uploaded the new /catalog/includes/classes/supertracker.php file as this is what does the job of inserting country codes/names for each new hit. Uploading this and overwriting the old one should fix the problem ? note, I posted a new version of this file yesterday to improve the session tracking. You should have no further need of update_supertracker.php once this is done. Regards, Edited August 25, 2005 by equilla Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
equilla Posted August 25, 2005 Author Share Posted August 25, 2005 Hi, the NONSSL bit is peculiar to the tep_href_link function of osCommerce. To understand how it works you would have to examine the code for that function (its in /catalog/includes/functions/html_output.php if I recall correctly). This parameter controls whether the output URL uses the secure, or non-secure form of URL for the link (i.e http://blahblah or https://blahblah). I seem to remember that if you omit the parameter the output defaults to non-secure anyway, so it doesn't matter if you miss it out. Regards, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
elv1s Posted August 25, 2005 Share Posted August 25, 2005 Hi Equilla, ok it worked..! nex problem! :blush: When i want to delete the oldest data and enter the nr. of rows i want to delete i get this error... 1064 - You have an error in your SQL syntax near 'ORDER by tracking_id ASC LIMIT 1' at line 1 DELETE from supertracker ORDER by tracking_id ASC LIMIT 1 [TEP STOP] any ideas? thanks gr. kasper Quote My Contribs: - ORDERS AT-A-GLANCE -CUSTOMERS AT-A-GLANCE Link to comment Share on other sites More sharing options...
busonero Posted August 26, 2005 Share Posted August 26, 2005 Hi Equilla, it works. thank you for this contribution. it helps me a lot keeping track of visitors sincerely Roberto Quote Link to comment Share on other sites More sharing options...
julianpuje Posted August 26, 2005 Share Posted August 26, 2005 Hi I've done the complete upload again and got a fresh binary GeoIP.dat file from the site. I ftp'd this folder in binary mode and still no luck. Exactly the same error. Any ideas, thanks. Julian Fatal error: error traversing database - perhaps it is corrupt? in /home/julianp/public_html/includes/geoip.inc on line 416 <{POST_SNAPBACK}> Hi again Been through the install many times now with the same error. No idea why it isn't working, has anyone else? Cheers Julian Quote A little knowledge is dangerous, I SHOULD KNOW. If Life Begins At 40, What ends???? Link to comment Share on other sites More sharing options...
equilla Posted August 26, 2005 Author Share Posted August 26, 2005 Hi Equilla, ok it worked..! nex problem! :blush: When i want to delete the oldest data and enter the nr. of rows i want to delete i get this error... 1064 - You have an error in your SQL syntax near 'ORDER by tracking_id ASC LIMIT 1' at line 1 DELETE from supertracker ORDER by tracking_id ASC LIMIT 1 [TEP STOP] any ideas? thanks gr. kasper <{POST_SNAPBACK}> Hmm, this is an interesting one - I may have a clue on this, but can I just check how many rows were in the table when you did this and what number you entered (I'm guessing 1, but I want to be sure). BTW - further posts will only be made in a couple of days as I will be away this weekend. Regards, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
jugarte Posted August 29, 2005 Share Posted August 29, 2005 Great contrib Mark... congrats!! First, sorry for my bad english... Im having a little problem, but I know that this problem is becouse I have a different file stucture, I mean, my url is www.huntingadultflix.com, but I pointed this url to a html page with a warning message becouse I sell adult videos, so www.huintingadultflix.com is ranked #1 referring page becouse most of the customers are landing at my catalog/index.php through that html page. The thing is that I want to know if its possible to make a modification to the supertracker contrib or to my html file in order to see the referring pages that customers are using to land at www.huntingadultflix.com. Thank You! Juan Ugarte Quote Truth? You can?t handle the truth!! Link to comment Share on other sites More sharing options...
equilla Posted August 29, 2005 Author Share Posted August 29, 2005 The thing is that I want to know if its possible to make a modification to the supertracker contrib or to my html file in order to see the referring pages that customers are using to land at www.huntingadultflix.com. Thank You! Juan Ugarte <{POST_SNAPBACK}> Hi Juan, yes, I get the opposite problem - hits on custom pages I use just for myself that I don't want recorded - because I do what I'm about to suggest to you. Unfortunately, you are using a html file, but if you could change that to a php file (still mostly just plain html in it though), so that you can include a single line of php to include application_top.php, then you should find that the session starts at your doorway page and all the data is then recorded correctly: include (DIR_WS_INCLUDES . 'application_top.php'); The only other way I can think of doing it is more complicated and involves capturing all the details on the front page and then POSTing them into the subsequent page (index.php), but this involves using php on the front page too, so I guess the first solution would still be the best one. Regards, Mark Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
equilla Posted August 29, 2005 Author Share Posted August 29, 2005 Quick add-on to the above. If you can't change your front page name (e.g. index.html), why not change it to include an IFRAME which shows a new page called blank.php (for example)? This blank.php could then simply include application_top.php. Not sure if this won't generate error messages for one reason or another as I haven't tried it, and also I don't know if the referrer details, etc, would still be recorded properly, but there must be a solution similar to this that would work. Regards, Quote Mark Stephens Contribs: http://www.oscommerce.com/community/contributions,1680 http://www.oscommerce.com/community/contributions,1467 http://www.oscommerce.com/community/contributions,1422 Link to comment Share on other sites More sharing options...
♥radders Posted August 29, 2005 Share Posted August 29, 2005 I think you could set up your htaccess to interpret an html page as being a php page so you don't have to change the name of it. Quote Link to comment Share on other sites More sharing options...
elv1s Posted August 30, 2005 Share Posted August 30, 2005 Hmm, this is an interesting one - I may have a clue on this, but can I just check how many rows were in the table when you did this and what number you entered (I'm guessing 1, but I want to be sure). BTW - further posts will only be made in a couple of days as I will be away this weekend. Regards, <{POST_SNAPBACK}> Hi there, well there were about 380 rows in the table and i tried it with 200, 100 and 1. None of them worked.. Thanks again! gr. kasper Quote My Contribs: - ORDERS AT-A-GLANCE -CUSTOMERS AT-A-GLANCE 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.