Jump to content

billv686

Members
  • Content count

    8
  • Joined

  • Last visited

Everything posted by billv686

  1. billv686

    View Counter

    jack, I had the 1.0 version of View Counter and just updated to the 1.3 version and I thought I would pass along a few items that caused me problems. Per step 4 of the INSTALL.txt file I went to ip2location.com and downloaded the database as instructed, extracted and put into the admin/includes directory but when I went to use the new version, the monitor page would not display anything where previously it would display without any problems. I found the following error messages in the error log..... PHP Warning: require(includes/classes/IP2Location.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /var/www/mywebsite/catalog/admin/view_counter.php on line 20, referer: http://www.mywebsite.com/admin/ So looking in includes/classes I found the file ip2locationlite.class.php which I assumed was named incorrectly so I changed it to IP2Location.php and the program proceeded to the next error....... PHP Fatal error: Call to undefined method IP2Location: :lookup() in /var/www/mywebsite/catalog/admin/includes/functions/view_counter.php on line 529, referer: http ://www.mywebsite/admin/configuration.php?gID=7402&cID=568 So looking inside the class I found that there is no method lookup() in the class file so I realized that I had the wrong class file. I went back to www.iptolocation.com website and looked a little more and proceeded to the free open source and clicked on PHP MODULE link and found the link to the IP2Location PHP Module which I downloade and unzipped where I found the correct class file in the similar named directory. I moved that IP2Location.php file to the classes directory and finally started getting data on the Monitor page.... This might be the problem that some other people were having as noted above...... So now it works but generates a lot of WARNING Messages in the log file..... PHP Warning: fseek() expects parameter 1 to be resourc e, boolean given in /var/mywebsite/catalog/admin/includes/classes/IP2Location.php on line 196, referer: http://mywebsite/admin/view_counter.php and PHP Warning: unpack() [<a href='function.unpack'>funct ion.unpack</a>]: Type V: not enough input, need 4, have 0 in /var/www/my/catalog/admin/includes/class es/IP2Location.php on line 275, referer: http://mywebsite/admin/view_counter.php Do you have any suggestions on how to stop the log filling up with warnings every time I use it........ Thanks for a great Addon and any help would be appreciated. Bill V
  2. billv686

    Links Manager II

    Thanks Jack, that did the trick. There is one more little detail but I am not sure if its worth the time, but I thought I would let you know anyway. If you replace the link image with a new one, the original image is not deleted but left in the links_manager_uploads/ directory. thanks again Bill V
  3. billv686

    Links Manager II

    I have installed this addon and found the answers to the problems I found with the LINKS_CATEGORY but I have one more problem that I have seen mention on the previous page. If you have a link entry that has been entered and it has a link image url assigned and it is working. If you edit the entry for some reason like changing the category or description text and leave the Image URL file search box alone, and there is an image name displayed to the right of the file search box. If you make changes and save them (leaving the file brows box alone) the Image Url will be lost and and error will now be displayed in the information for that link that the Image is missing. The image is still in the Images/links_manager/uploades directory but the information has been erased from the database entry. Looking at the code, if any kind of save is done the "link_image_url" will be updated even if nothing has been uploaded. It is not a fatal problem, just kind of annoying and causes you to hunt down the image that the link sharing sponsor has provided if you make any changes to the link information. I have been trying to figure out what needed to be changed, but dont understand the code well enough. Thanks in advance for any assistance and for another great addon to OSC Bill V
  4. billv686

    View Counter

    I have installed this package and for the most part things are working, I have two issues, the first one is an error log entry that keeps occuring with a file write permission. Here is an excerp from the apache error log that occurs when I am working on another program in the admin panel links programs or just about any admin program access. It apears to be trying to open a file for append or write in the includes directory. I checked the permissions for the directory drwxr-xr-x 2 apache apache 4096 May 24 14:00 includes I have even tried to make them rw accessable to the world, but still get the same error drwxrwxrwx 8 apache apache 4096 May 24 14:17 includes [Fri May 24 14:00:51 2013] [error] [client 108.235.105.221] PHP Warning: fopen(includes/botstore_2013-05-24.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in /var/www/vintagegeekstuff/catalog/includes/modules/view_counter.php on line 388, referer: http://www.vintagegeekstuff.com/admin/links.php?page=1&lID=1 This is the code segment that is trying to open the file, I even created an include directory in the modules directory to see if that was where it was actually trying to write the file, but got the same errors. I can not find any reference to the "botstore***" file in any other module, so maybe its a piece of left over code or something???? if ($storeBot) { $file = 'includes/botstore_' . date("Y-m-d") . '.txt'; $mode = (file_exists($file) ? 'a' : 'w'); if (($fp = fopen($file , $mode))) { $fout = fwrite($fp, 'Bot Found Entry' . "\r\n"); $fout = fwrite($fp, $_SERVER['REMOTE_ADDR'] . ' at '. date('H:i:s') . "\r\n"); $fout = fwrite($fp, 'UA = ' . $_SERVER['HTTP_USER_AGENT']) . "\r\n"; $fout = fwrite($fp, $botStoreData); $fout = fwrite($fp, '' . "\r\n"); //extra line fclose($fp); } $storeBot = false; } The Second problem I managed fix, that was what I believe to be an error in the coding to call out the ip address of the online customer to send a message to in the Tools panel. view_counter_tools.php Drop list to send a message was blank, found $db[ip] was invalid field name Changed line 254 from: $activeIPArray[] = array('id' => $db['ip'], 'text' => $db['ip']); to: $activeIPArray[] = array('id' => $db['ip_number'], 'text' => $db['bot_name']); Thanks for a really nice addon Bill V
  5. billv686

    [Addon} Modular Front Page

    Thanks Jim, at least I won't be chasing my tail anymore. Bill V
  6. billv686

    [Addon} Modular Front Page

    i have been looking for anybody having this problem, but have not seen it anywhere in the thread. If you create and HTML banner, that works fine with the normal banner.php program to display on the page, when you use the same file in the banner_rotator.php program it displays the html code as plain text in the box. Anybody have and answer or edit change to make it work. Thanks, Bill V
  7. billv686

    Contribution: Auto Backup Database

    I have installed the latest version of Autobackup From the backup_db.php file: auto_backup_db.php, v 4.3 21/01/2013 When I went to restore from a backup that was made with this program it failed every time, I tried individual tables etc, but everything failed to restore. I downloaded the backup and tried to restore using phpmyadmin and found that it was failing because of an extra comma at the end of the VALUE data items. I noticed it was in every data item, so using a simple replace ",)" with ")" thruout the entire backup file allowed the data to be restored without any errors. Here is a sample of a table with the extra information. drop table if exists `categories_description`; CREATE TABLE `categories_description` ( `categories_id` int(11) NOT NULL DEFAULT '0', `language_id` int(11) NOT NULL DEFAULT '1', `categories_name` varchar(32) NOT NULL, PRIMARY KEY (`categories_id`,`language_id`), KEY `idx_categories_name` (`categories_name`)); insert into `categories_description` (`categories_id`, `language_id`, `categories_name`) values (1,1,'Hardware',), (2,1,'Software',), (3,1,'DVD Movies',), (4,1,'Graphics Cards',), (5,1,'Printers',), (6,1,'Monitors',), (7,1,'Speakers',), (8,1,'Keyboards',), (9,1,'Mice',), (10,1,'Action',), (11,1,'Science Fiction',), (12,1,'Comedy',), (13,1,'Cartoons',), (14,1,'Thriller',), (15,1,'Drama',), (16,1,'Memory',), (17,1,'CDROM Drives',), (21,1,'Gadgets',); I looked thru the php code and found where the code was supposed to remove an extra comma, but I am not sure if that is the problem. If you have a fix please let me know. Bill V
  8. billv686

    USPS Rate V4, Intl Rate V2 (official support thread)

    I am not sure if thiss issue has been resolved or addressed in this forum. If it has I apologize, in advance. I have been very frustrated by simple misunderstandings in setting up shipping with the USPS shipping module that was initially part of Oscommerce 2.3 and then again after installing the updates for the changes that USPS has made and all the confusion about Methods and the different versions. I finally settled on trying to update using this Addon and was once again confused by the simplest of issues which would have been made much simpler if there was some error messages returned by the new USPS module. I spend many hours trying to figure out why I did not get any results returned after installing the updates and registering with the new USPS registration process and trying to test some simple orders. All of my problems were fairly simple in nature, but either I was too stupid to read the directions and setup carefully or the information was not clear enough for my simple brain to understand. Even after I got the module to return shipping charges for some orders, other orders just returned a blank shipping section for USPS, while other flat rate and per item pricing worked fine. I finally found a very short line in the forum that said the "USPS errors were silent" meaning that if an error occurred you had to go into the code and enable a little known line of code that would email a confusing block of information to the store owners email. I decided that something had to be done to make it possible to have the customer understand that they might have entered their zip code incorrectly or the store owner neglected to put in their shipping zip code or some similar error. So I think I figured out a fairly simple addition to the usps.php module to return some error information when it fails to process the request correctly. Anyway, I hope that maybe this little piece of code can be added to the original / updated addon package or that other users find it useful to add to their stores usps.php module so they and their customers can see when a usps shipping request does not correctly process a pricing request. This is the change to be made to the usps.php module to add error message display for USPS Rate V4 Intl Rate V2 - v.1.7 In the program usps.php replace the following two lines between the --- lines --- $uspsQuote = $this->_getQuote(); if (isset($uspsQuote['Number'])) return false; --- It is possible that the 2nd line might not be there depending on the version of usps.php you have installed. Either way replace it with the following group of lines between the --- lines --- // billv BEGIN fix USPS error information for the checkout_shipping.php error display // if (isset($uspsQuote['Number']) || isset($uspsQuote['Package'][0]['Error']) ) { $uspsQuote['module']="United States Postal Service"; if (isset($uspsQuote['Number'])) {$usps_msg = $uspsQuote['Description']; } else {$usps_msg = $uspsQuote['Package'][0]['Error']['Description'];} $uspsQuote['error']= $usps_msg; return $uspsQuote; } // billv END Error msg changes 3/25/13 ---
×