Jump to content

Peter M

  • Content count

  • Joined

  • Last visited

1 Follower

Profile Information

  1. Peter M


    I would just like to say at this point that my host is also on 4.4.9 and I am able to run SiteMonitor without any problems. I did have an error 500 internal server error to start with, but I later discovered this was because the script was timing out, as once I had added the admin folder to the excludes list, the error stopped.
  2. Peter M

    Contribution: Auto Backup Database

    I would just like to say here that I have implimented this contribution with great success (once I got my head round how it works)so very well done to the author of this great contribution! One thing I did notice was that as auto_backup_db.php doesn't include the applicaiton_top.php. I found that the date and time being used to generate the file name wasnt the same as when the database manager was saying the back up was made. Having made a small modification to auto_backup_db.php solved that problem. The way I use it is as follows; I have a windows sbs 2003 server which has all the day to day office functions on it including exhcange, general file sharing and accounting systems data etc. On this server I am making use of the job scheduler, so I wanted to keep all my backups and other processes in one place (mostly for ease of admin) so I found a way of being able to call and run a remote php from the server, after much research I found the best way was to use a little command line ftp utility called Wget. What I then did was to set the 2 parameters in the auto backup admin to time interval of 30 minutes and archive interval of 1 1/2 hours. I then scheduled a job in the sheduler on the local server to run auto_backup_db.php every 2 hours, this process starts at 02:00 every morning and does the last one at 22:00. This generates 11 backups at 2 hour intervals over a 22 hour period. My main backup batch script runs at 23:45 every night, (only to keep the dates correct for the day) this calls auto_backup_db.php agian to make the 12th backup .sql file, then it generates new folders by date in the external data backups folder on the raid 5 array and using Wget again downloads the .sql files for the day to a database backup folder and then the entire content of the site to a system folder (excluding the .sql files). This process also backs up 2 other static websites in the same way, then providing the .sql files were downloaded successfully, deletes them from the remote server. Unfortunately Wget doesn't support delete remote files, so I had to resort to building a conventional command line ftp script from within the main backup batch script that does an mdelete of the .sql files by date for that days files only. Once this process is complete, it then does a backup to tape of all data on the raid array using good old NTBackup. The good thing is this is a totally automomous process, the only user intervention requird is to remember to put a tape in the drive! I think this is about as complete a backup process as one could hope for, it certainly gives me confidence in knowing I could if necessary recover from just about any situation including a full rebuild with a copy of the database which is no more than 2 hours old at most. Of course these timings could be changed to suit any purpose, but 2 hours is fine for my needs.
  3. Peter M


    Jack, One more question if I may, how do the run site monitor and delete reference file and run site monitor keeping the existing reference file differ from running it manually or checking for hacked files? Those are the only 2 processes on my shop that give an error 500 problem, I havent found anything else that causes the error. Thanks.
  4. Peter M


    Thanks for that Jack, I have spoken to the host (1 and 1) who say they couldnt see any reason in particular for it, I am well within my resource usage and there are no other apparent problems. They did do a webspace refresh to make sure there were no processes stuck running or anything like that. I have tried it since and still get the same issue. One thing I did notice that having done a phpinfo() I found that this server has php 4.4.9, I also found numerous things on the web that suggest the fix for 1 and 1 in particular is to add the following to the .htaccess file AddType x-mapp-php5 .php But this also made no difference, having said that, I have numerous versions of .htaccess and the only one I changed was in the route of the admin folder, should I change any of the others with the same thing? Thanks:)
  5. Peter M


    I have a problem where if I run sitemonitor.php through a browser it gives me a report on the screen, but even though I have set it to always email me, which it used to do up until yesterday. Now it doesnt send any email and if I run it through the admin it comes up with an error 500 - Internal Server Error. If I run it manually from the Site Monitor Admin, it works. I have got auto_backup on this shop too and have already checked the clash in the microtime_float, but I must have a later version of the site monitor code as mine says SiteMonitor_microtime_float, even so I have commented it out but that makes no difference. Any help greatly appreciated.
  6. Thanks for that, much appeciated. I'll find and download Great Categories now and then see about the login box.
  7. Hi All, I am still developing my site, so am still on the lookout for layout features etc. The other day I happened to come across this site www.demonpowerproducts.co.uk and was wondering if anyone recognises the categories box and the extended sign in box contributions? Many thanks, Peter.
  8. Peter M

    [Contrib] Make An Offer

    Hi, I am in the middle of installing this contribution, which was going fine until I got to application_top.php I have Option Types V2 loaded also and have found that merging the two contributions awkward to say the least, in the following section of code where the instructions call for the following to be replaced; The instructions say find; // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; This code is replaced with; // customer adds a product from the products page case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { // No offer is made or direct offers are disabled // so the default price is accepted $offeracceptable = true; // Addition for Make An Offer if (MAO_ACCEPT_OFFER_DIRECTLY == 'true') { if (!$HTTP_POST_VARS['newpriceoffer'] == '') { $offeracceptable = mao_check_offer($HTTP_POST_VARS['newpriceoffer'], $HTTP_POST_VARS['products_id']); if ($offeracceptable == true) { if (!tep_session_is_registered('mao_accepted_offer')) { $mao_accepted_offer = array(); $mao_accepted = array('productid' => $HTTP_POST_VARS['products_id'],'newprice' => $HTTP_POST_VARS['newpriceoffer'],'initialvaluta' => $currency); array_push($mao_accepted_offer, $mao_accepted); tep_session_register('mao_accepted_offer'); } else { $mao_accepted = array('productid' => $HTTP_POST_VARS['products_id'],'newprice' => $HTTP_POST_VARS['newpriceoffer'],'initialvaluta' => $currency); array_push($mao_accepted_offer, $mao_accepted); } } } } if ($offeracceptable == true) { tep_session_unregister('mao_low_offer'); $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); } else { tep_session_register('mao_low_offer'); } } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; My problem is having Option Types V2 installed, by case=add product looks quite different, as follows; // customer adds a product from the products page case 'add_product' : //BOF - Zappo - Option Types v2 - File uploading: Purge the Temporary Upload Dir $purgeDir = opendir(TMP_DIR) or die ('Could not open '.TMP_DIR); while ($file = readdir($purgeDir)) { if ($file != ('.htaccess') && $file != ('.') && $file != ('..') && filemtime(TMP_DIR . $file) < strtotime(OPTIONS_TYPE_PURGETIME)) { unlink(TMP_DIR . $file); // Delete file from server... tep_db_query("delete from " . TABLE_FILES_UPLOADED . " where files_uploaded_name = '" . $file . "'"); // Remove File's database entry.... } } closedir($purgeDir); //EOF - Zappo - Option Types v2 - File uploading: Purge the Temporary Upload Dir //BOF - Zappo - Option Types v2 - ONE LINE - Set real_ids for processing $real_ids = $HTTP_POST_VARS['id']; //BOF - Zappo - Option Types v2 - File uploading: save uploaded files with unique file names, in the proper folder if ($HTTP_POST_VARS['number_of_uploads'] > 0) { require(DIR_WS_CLASSES . 'upload.php'); for ($i = 1; $i <= $HTTP_POST_VARS['number_of_uploads']; $i++) { $TEMP_FILE = $_FILES['id']['tmp_name'][TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i]]; if (tep_not_null($TEMP_FILE) && $TEMP_FILE != 'none') { $products_options_file = new upload('id'); //BOF - Zappo - Option Types v2 - Set Upload directory (Registered customers in Uploads, other in Temporary folder) if (tep_session_is_registered('customer_id')) { // IF the customer is registered, use Upload Dir $products_options_file->set_destination(UPL_DIR); } else { // If the customer is not registered, use Temporary Dir $products_options_file->set_destination(TMP_DIR); } //EOF - Zappo - Option Types v2 - Set Upload directory (Registered customers in Uploads, other in Temporary folder) if ($products_options_file->parse(TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i])) { if (tep_session_is_registered('customer_id')) { tep_db_query("insert into " . TABLE_FILES_UPLOADED . " (sesskey, customers_id, files_uploaded_name, date) values('" . tep_session_id() . "', '" . $customer_id . "', '" . tep_db_input($products_options_file->filename) . "', '" . date("d-m-y") . "')"); } else { tep_db_query("insert into " . TABLE_FILES_UPLOADED . " (sesskey, files_uploaded_name, date) values('" . tep_session_id() . "', '" . tep_db_input($products_options_file->filename) . "', '" . date("d-m-y") . "')"); } //BOF - Zappo - Option Types v2 - Set File Prefix if (OPTIONS_TYPE_FILEPREFIX == 'Database') { // Database ID as File prefix $insert_id = tep_db_insert_id() . '_'; } else { // Date, time or both as File prefix (Change date formatting here) if (OPTIONS_TYPE_FILEPREFIX == 'Date' || OPTIONS_TYPE_FILEPREFIX == 'DateTime') { $insert_id = 'D'.date("d-m-y_"); } $insert_id .= (OPTIONS_TYPE_FILEPREFIX == 'DateTime' || OPTIONS_TYPE_FILEPREFIX == 'Time') ? 'T'.date("H-i_") : ''; } //EOF - Zappo - Option Types v2 - Set File Prefix // Update filename in Database with correct prefix (For comparing database names with real files) tep_db_query("update " . TABLE_FILES_UPLOADED . " set files_uploaded_name = '" . tep_db_input($insert_id . $products_options_file->filename) . "' where sesskey = '" . tep_session_id() . "' and files_uploaded_name = '" . tep_db_input($products_options_file->filename) . "' and date = '" . date("d-m-y") . "'"); $real_ids[TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i]] = $insert_id . $products_options_file->filename; $products_options_file->set_filename($insert_id . $products_options_file->filename); if (!($products_options_file->save())) { break 2; } } else { break 2; } } else { // No file uploaded -- use previously uploaded file (From Dropdown) $real_ids[TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i]] = $HTTP_POST_VARS[TEXT_PREFIX . UPLOAD_PREFIX . $i]; } } } //EOF - Zappo - Option Types v2 - File uploading: save uploaded files with unique file names, in the proper folder //BOF - Zappo - Option Types v2 - ONE LINE - Replace the posted array with the processed one. $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $real_ids))+1, $real_ids); // Peter Milner } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; My question is, can anyone advise me on how best to merge these two contributions? Thanks! Peter.
  9. Peter M

    Any contribution for discontinued products?

    Hi, Has anyone got any further with this? as I too need something like this, so I am very interested in any progress. Thanks!
  10. Peter M

    [Contribution] Option Types v2

    Hi Fyod, I suspect you might find that you are missing your case statement, which is why you had one to many curly brackets; In the chunk of code that begins with; //BOF - Zappo - Option Types v2 - File uploading: Purge the Temporary Upload Dir $purgeDir = opendir(TMP_DIR) or die ('Could not open '.TMP_DIR); while ($file = readdir($purgeDir)) { if ($file != ('.htaccess') && $file != ('.') && $file != ('..') && filemtime(TMP_DIR . $file) < strtotime(OPTIONS_TYPE_PURGETIME)) { If the begining of that chunk looks like the above and not like this; case 'add_product' : //BOF - Zappo - Option Types v2 - File uploading: Purge the Temporary Upload Dir $purgeDir = opendir(TMP_DIR) or die ('Could not open '.TMP_DIR); while ($file = readdir($purgeDir)) { if ($file != ('.htaccess') && $file != ('.') && $file != ('..') && filemtime(TMP_DIR . $file) < strtotime(OPTIONS_TYPE_PURGETIME)) { Then you are definitely missing the case 'add_product' : beginning to the code. Once you put this back in, you will need to put that curly bracket back in at the bottom of that section of code too.
  11. Peter M

    [Contribution] Product Units

    Hi, I have just installed this great contribution and it works fine. One thing I have spotted though, is the unit is displayed everywhere apart from in product_info.php, is there any particular reason for this?
  12. Hi Chris, I assume this sql is from catalog/admin/categories.php, in which case this is my sql statement from the copy as == duplicate section of the code; tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_image_array, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_availability_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_array']) . "', '" . tep_db_input($product['products_price']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); Aside from an extra field in the shape of products_availability_id, there doesn't seem to be that much difference in the two. I wonder therefore, if it might be something to do with the database update sql code that came with either this contribution or the Extra Product Fields one? Pete.
  13. Hi Chris, I am running this contribution quite happliy with several others, one of which is Extra Product Fields v1.2. A full list of the other contributions I have is as follows; Add Button Back v1.3 Bundled Products v1.6 Category and Products in Title Bar Customer Extra Fields Extended v1.3 - Currently has a Clash in Extra Fields Manager with Extra Product Fields, needs sorting! Extra Product Fields v1.2 Get 1 Free v1.4.1 OSCThumb Option Types v2.1.3 Phone Payment Module Product Availability v1.03 Simple Multiple Images Unlimited (With fancy Popups) - This contribution Simply Hide Products v1.1 Store Pickup v1.4 As you can see, the list of contributions I have is fairly substantial, I have found some contributions a little difficult to merge simply by following the instructions in each one. The main issue seems to be the various SQL statements which have had fields added and changed in the various contributions. If you would like a copy of any of my .php files to compare to your own, please do pm me an email address an I'll email them over to you. Best of luck! Pete.
  14. Hi AugustinParis, It looks to me like your error is not actually in the function reported, but in another php file that called the function, most likely with incorrect parameters. In order to fix the problem, we first need to know exactly what it was you were doing when you got the error. For example if you were selecting a category and expecting to see a list of products in that category, then the problem is in the products listing php which is called products_listing.php in the catalog/includes folder. Or perhaps in this case you were clicking on a product from a category, in which case the problem is in the product_info.php file in the catalog/ folder. As spooks said, it is well worthwhile taking the orignial files you saved just before installing this contribution and comparing them with some sort of compare tool to the ones that came in th folder with the downloaded contribution folder. I personally use WinMerge which is a free tool that can be downloaded from the interweb. A great place to start would be to make sure you ran the sql file that was included in the contribution download folder, the sql you should have run is as follows; ALTER TABLE `products` ADD `products_image_array` blob; INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Tiny Image Width', 'TINY_IMAGE_WIDTH', '30', 'Image width for additional image thumbnail', 4, 20, NULL, now(), '', ''); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Tiny Image Height', 'TINY_IMAGE_HEIGHT', '30', 'Image height for additional image thumbnail', 4, 21, NULL, now(), '', ''); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Additional images per row/column', 'TINY_IMAGE_GROUP_SIZE', '3', 'Number of additional images to show per row/column in the product display', 4, 22, NULL, now(), '', ''); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Additional Image Format', 'ADDITIONAL_IMAGE_FORMAT', 'horizontal', 'Show additional image in a vertical or horizontal format', 4, 23, NULL, now(), '', 'tep_cfg_select_option(array(\'horizontal\', \'vertical\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Dim background on popup', 'DIM_BACKGROUND', 'false', 'Dim the background when popup images are shown. (enabled, this option can make the zoom action less smooth).', 4, 24, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Background luminosity', 'BKG_LUMA', '2', 'How much to dim background, if enabled. 1 = min, 9 = max.', 4, 25, NULL, now(), '', 'tep_cfg_select_option(array(\'1\', \'2\',\'3\',\'4\',\'5\',\'6\',\'7\',\'8\',\'9\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Popup images dragable', 'DRAG_POPUP', 'false', 'Enable dragging of popup images.', 4, 26, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Popup \'swing\' effect', 'SWING_POPUP', 'true', 'Add a \'swing\' effect to the opening popup zoom.', 4, 27, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Show popup navigation', 'SHOW_NAV', 'false', 'Always show popup navigation icons, or hide till mouse over.', 4, 28, NULL, now(), '', 'tep_cfg_select_option(array(\'true\', \'false\'),'); INSERT INTO `configuration` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Popup navigation position', 'POS_NAV', 'middle', 'Position the popup navigation icons at the top, middle or bottom of images.', 4, 29, NULL, now(), '', 'tep_cfg_select_option(array(\'top\', \'middle\',\'bottom\'),'); Let us know how you get on.
  15. Peter M

    CCGV - PHP5.3 - mySQL 5

    I am also very interested in a decent Gift Voucher system! Any news on how it is progressing? Also, do I go ahead and install version 5.21 that I have just downloaded, or would it be better to wait for the new GV functionality and load the new version?