safoo Posted July 20, 2005 Share Posted July 20, 2005 I was wondering if it is possible to modify who's online so it updates the database once every time period. For example, update every hour. The reason behind this is that then one can take more advantage of SQl query caching (since cache is flushed on every insert statement). This would still allow the store owner to get a snapshot of the traffic on the site through out the day. Any ideas on how I could one go about accomplishing this? I can easily enable or disable who's online by adding a true/false setting, but how to have osc automatically change the setting. For example, if we want to update who's online every hour, then enable who's online at X:05 time and disable every X:05+Y (allowing Y minutes to get a better sample of who's online). So at 10:05am who's online is enabled then at 10:07am it is disabled. It will take another sample at 11:05. So if the store owner checks who's online in admin at 11:30, he will have the sample from 11:05. If anyone has any ideas on how to approach this, I would love to hear them. Again, my main issue is with figuring out when to enable disable the setting. Thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2005 Share Posted July 21, 2005 Safoo, What your suggesting is a cron job. Whos online currently works by updating the database everytime a user (or Bot) clicks on a link. It also removes entries for sessions that haven't changed in 15 minutes (default). You could change that to be greater than 1 hour (look for "900" in the code. That's seconds, not minutes.) You could change the refresh time in the admin screen. Otherwise, you're talking about a cron job. ed Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2005 Share Posted July 21, 2005 Folks, I'm on vacation through the end of July. See you in 1 1/2 weeks. B) ed Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2005 Share Posted July 21, 2005 Folks, I'm on vacation through the end of July. See you in 1 1/2 weeks. B) ed <{POST_SNAPBACK}> See ya Ed :) Some people get good don't they. What I wouldn't give for a real holiday. :rolleyes: Quote Link to comment Share on other sites More sharing options...
littleneo Posted July 25, 2005 Share Posted July 25, 2005 I have a problem with Who's online contribution.... Sometimes, all is ok... But other times, all the lines aren't written, I've "<font color=" " written at the end end no more lines after that... Or an error : Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site156/fst/var/www/html/admin/includes/functions/database.php on line 45 0 - select time_entry, time_last_click from whos_online where session_id='1bfe48d22b7bb0e09c7f145ea97f6161' [TEP STOP] Worse than that... Sometimes, when I attempt to see who's online, the page don't load and create 2 differents problems : - I can't no more see my admin page, I have a database.php error... - Or, I can see my admin page but... No more orders listed on it !!! And they are on my database, but invisibles here... After a while, this 2 problems disappears... But can reappear if I choose the "who's online" page again... Have I a ghost in my machine ? ;) Plz help... Quote Link to comment Share on other sites More sharing options...
FlyingMonkey Posted July 28, 2005 Share Posted July 28, 2005 does this contribution support on the fly ip banning? i heard it was in the works, but i don't know if it was ever implemented. Quote Most likely your question has been answered, please do a search first. Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2005 Share Posted July 28, 2005 Have I a ghost in my machine ? ;) Plz help... <{POST_SNAPBACK}> I think you have a ghost in your setup. You clearly have some enormouse problems with either your settings for a number of things and or problems with your files. The only thing I can really say is, I hope you have backups. Sorry but this is to much for any real help here over this duscussion board like this. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2005 Share Posted July 28, 2005 does this contribution support on the fly ip banning? i heard it was in the works, but i don't know if it was ever implemented. <{POST_SNAPBACK}> No it does not support ip banning, never has nor ever has it ever been intended to. As far as I've ever known. Quote Link to comment Share on other sites More sharing options...
FlyingMonkey Posted July 28, 2005 Share Posted July 28, 2005 No it does not support ip banning, never has nor ever has it ever been intended to.As far as I've ever known. <{POST_SNAPBACK}> Gotcha, thanks. Quote Most likely your question has been answered, please do a search first. Link to comment Share on other sites More sharing options...
SGEGD1 Posted July 29, 2005 Share Posted July 29, 2005 Hallo, ich habe whos online 1.7.1 installiert und leider bekomme ich im admin diese Fehlermeldung: Fatal error: Call to undefined function: tep_get_ip_address() in /mnt/ja2/01/626/00000005/htdocs/os/catalog/admin/whos_online.php on line 551 kann mir jemand helfen? Sorry my englisch is very bad :( Gruss Stephan Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2005 Share Posted July 29, 2005 Hallo, ich habe whos online 1.7.1 installiert und leider bekomme ich im admin diese Fehlermeldung: Fatal error: Call to undefined function: tep_get_ip_address() in /mnt/ja2/01/626/00000005/htdocs/os/catalog/admin/whos_online.php on line 551 kann mir jemand helfen? Sorry my englisch is very bad :( Gruss Stephan <{POST_SNAPBACK}> Stephan That error looks to me like it may be a Session directory path error, or an error in your catalog/includes/config.php file or the catalog/admin/includes/config.php file. Check your URL's etc in these. This looks very wrong "/htdocs/os/catalog/". This looks wrong also "/mnt/ja2/01/626/00000005/" and I'm not sure what to make of it, surely that is not your real home path? Hope this gets you started in the right direction anyway. John Quote Link to comment Share on other sites More sharing options...
littleneo Posted July 29, 2005 Share Posted July 29, 2005 (edited) I think you have a ghost in your setup.You clearly have some enormouse problems with either your settings for a number of things and or problems with your files. The only thing I can really say is, I hope you have backups. Sorry but this is to much for any real help here over this duscussion board like this. <{POST_SNAPBACK}> Can't you guide me a little from where I've to begin to correct it ? I have no backup BEFORE the add of who's online contribution as I was thinking all was working correctly before the time I have visits and encounter this kinf of errors !! :( Please, if you can give me some advices, I will follow them to the letter ^^ Thank you very much for help Edited July 29, 2005 by littleneo Quote Link to comment Share on other sites More sharing options...
Guest Posted July 29, 2005 Share Posted July 29, 2005 Can't you guide me a little from where I've to begin to correct it ?I have no backup BEFORE the add of who's online contribution as I was thinking all was working correctly before the time I have visits and encounter this kinf of errors !! :( Please, if you can give me some advices, I will follow them to the letter ^^ Thank you very much for help <{POST_SNAPBACK}> Have checked all your setup details, most specifically as outline in the last couple of pages here? Your Sessions directory and path settings? It kind of looks like you may not have setup your session directory or not correctly. Check your Admin configuration settings. (as outlined on the previous page) If non of this helps please post what you have done so far and settings. And what you think the problem may be, you might know and not realise it. John Quote Link to comment Share on other sites More sharing options...
chique Posted July 29, 2005 Share Posted July 29, 2005 Hallo, ich habe whos online 1.7.1 installiert und leider bekomme ich im admin diese Fehlermeldung: Fatal error: Call to undefined function: tep_get_ip_address() in /mnt/ja2/01/626/00000005/htdocs/os/catalog/admin/whos_online.php on line 551 kann mir jemand helfen? Sorry my englisch is very bad :( Gruss Stephan <{POST_SNAPBACK}> I think you forgot to put the following line in your admin/includes/functions/general.php You may need to add the following code to the bottom (just before the final ?> tag) of admin\includes\functions\general.php: function tep_get_ip_address() { if (isset($_SERVER)) { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } else { $ip = $_SERVER['REMOTE_ADDR']; } } else { if (getenv('HTTP_X_FORWARDED_FOR')) { $ip = getenv('HTTP_X_FORWARDED_FOR'); } elseif (getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CLIENT_IP'); } else { $ip = getenv('REMOTE_ADDR'); } } return $ip; } Good luck Don Quote Link to comment Share on other sites More sharing options...
SGEGD1 Posted July 30, 2005 Share Posted July 30, 2005 Hello Don, yes i forgot the code, but i become now this error: Parse error: parse error, unexpected T_VARIABLE in /mnt/ja2/01/626/00000005/htdocs/os/catalog/admin/includes/functions/general.php on line 401 Thank you for help and soory for my bad englisch. Stephan Quote Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 Hello Don, yes i forgot the code, but i become now this error: Parse error: parse error, unexpected T_VARIABLE in /mnt/ja2/01/626/00000005/htdocs/os/catalog/admin/includes/functions/general.php on line 401 Thank you for help and soory for my bad englisch. Stephan <{POST_SNAPBACK}> Stephan Where did you insert that extra code general.php file? It's supposed to be at the very bottom. If added at the bottom I don't see how you could get that problem half way threw the file. Also if the above is not the problem post the lines in your general.php slightly above and below line 401 and indicat which is the 401. Quote Link to comment Share on other sites More sharing options...
SGEGD1 Posted July 30, 2005 Share Posted July 30, 2005 Hallo, Problem ist gel?st, es lag daran das ich die Dateien mit dem Dateimanager ge?ndert hatte anstatt mit Editor und FTP, das f?hrte zu den Fehlermeldungen. Danke f?r euere Hilfe. Gruss Stephan Quote Link to comment Share on other sites More sharing options...
rued Posted July 30, 2005 Share Posted July 30, 2005 Hello, sometimes I get an error where the shopping cart should be saying: Fatal error: Call to a member function on a non-object in /home/myshop/public_html/shop/admin/whos_online.php on line 639 It's seems like this is only coming on when customers are selected, not on bot's. Any idea what this is? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 Hallo, Problem ist gel?st, es lag daran das ich die Dateien mit dem Dateimanager ge?ndert hatte anstatt mit Editor und FTP, das f?hrte zu den Fehlermeldungen. Danke f?r euere Hilfe. Gruss Stephan <{POST_SNAPBACK}> Stephan you will have to translate this for me I can't understand any past "Problem". Sorry John Quote Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 Hello, sometimes I get an error where the shopping cart should be saying: Fatal error: Call to a member function on a non-object in /home/myshop/public_html/shop/admin/whos_online.php on line 639 It's seems like this is only coming on when customers are selected, not on bot's. Any idea what this is? <{POST_SNAPBACK}> What is on your line 639 of this file? Quote Link to comment Share on other sites More sharing options...
rued Posted July 31, 2005 Share Posted July 31, 2005 What is on your line 639 of this file? <{POST_SNAPBACK}> Line 635 - 641: // Show shopping cart contents for selected entry echo ' <td valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '</td>' . "\n"; Where this is line 639: echo $box->infoBox($heading, $contents); Quote Link to comment Share on other sites More sharing options...
littleneo Posted August 1, 2005 Share Posted August 1, 2005 Have checked all your setup details, most specifically as outline in the last couple of pages here? Your Sessions directory and path settings? It kind of looks like you may not have setup your session directory or not correctly. Check your Admin configuration settings. (as outlined on the previous page) If non of this helps please post what you have done so far and settings. And what you think the problem may be, you might know and not realise it. John <{POST_SNAPBACK}> Hi, I take time to answer to be sure I verify all stuffs indicated in this pages... I continue to have the problems after I've verified, it seems, all... The files in the temp directory don't seems to be deleted and my shop is no more working in this case it seems... I have this configure.php from includes and admin/includes : define('STORE_SESSIONS', 'mysql'); The fields in my who's online database are : Champ Type Interclassement Attributs Null D?faut customer_id int(11) Oui NULL full_name varchar(64) latin1_swedish_ci No session_id varchar(128) latin1_swedish_ci No ip_address varchar(15) latin1_swedish_ci No time_entry varchar(14) latin1_swedish_ci No time_last_click varchar(14) latin1_swedish_ci No last_page_url varchar(64) latin1_swedish_ci No http_referer varchar(255) latin1_swedish_ci No user_agent varchar(255) latin1_swedish_ci No The settings in my admin/sessions configuration are : Session Directory /home/virtual/onveut.com/var/www/html/tempo Force Cookie Use False Check SSL Session ID True Check User Agent False Check IP Address False Prevent Spider Sessions True Recreate Session True The session directory /home/virtual/onveut.com/var/www/html/tempo seems well configurated and is CHMOD 777 and without trailing slash at the end in sessions' configuration. Too, it's created specifically for the sessions and don't used by other programs. I can't create it before /www/, I haven't permission. I continue to have different errors like : Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site156/fst/var/www/html/admin/includes/functions/database.php on line 45 0 - select time_entry, time_last_click from whos_online where session_id='a4d1fc572173703333d63228fb4b9f7a' The line 45 of database.php is : $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); What am I doing wrong ? Thank you very much. Quote Link to comment Share on other sites More sharing options...
littleneo Posted August 1, 2005 Share Posted August 1, 2005 Again the same error : Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site156/fst/var/www/html/admin/includes/functions/database.php on line 45 0 - select time_entry, time_last_click from whos_online where session_id='a4d1fc572173703333d63228fb4b9f7a' The line 45 of database.php is : $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); Then, after that, can't go to my admin page because of error : Warning: main(includes/languages/4): failed to open stream: No such file or directory in /home/virtual/site156/fst/var/www/html/admin/includes/application_top.php on line 140 Fatal error: main(): Failed opening required 'includes/languages/4' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site156/fst/var/www/html/admin/includes/application_top.php on line 140 What's this path ? : (include_path='.:/php/includes:/usr/share/php') And I've just verified, the temp directory attributed in sessions is empty... Don't understand anything... Quote Link to comment Share on other sites More sharing options...
littleneo Posted August 1, 2005 Share Posted August 1, 2005 On bold is line 140 of application_top.php // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); $current_page = basename($PHP_SELF); if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) { include(DIR_WS_LANGUAGES . $language . '/' . $current_page); } Quote Link to comment Share on other sites More sharing options...
littleneo Posted August 1, 2005 Share Posted August 1, 2005 Different but similar error when I attempt to return to admin : Warning: main(includes/languages/4): failed to open stream: Aucun fichier ou répertoire de ce type in /home/virtual/site156/fst/var/www/html/admin/includes/application_top.php on line 140 Fatal error: main(): Failed opening required 'includes/languages/4' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site156/fst/var/www/html/admin/includes/application_top.php on line 140 The language 4 is for my language (french)... If I wait a certain time, the admin page will work again... If I go to see who's online page, can work, but after a while, if I refresh by example, hop... Bug again... 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.