Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

spooks

Pioneers
  • Posts

    6,946
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by spooks

  1. ALTER TABLE products DROP products_sort_order; DELETE FROM configuration where configuration_key = `PRODUCT_LIST_SORT_ORDER`; If you added Auto Backup (see signature) you would have incremental backups to choose from, and if you added Database Backup Manager too you could even restore individual tables
  2. @mr_absinthe Its probably something in the headers your server don't like (could you say if windows or Linux) could you check the file creation is good, comment out line 169 @unlink(DIR_FS_BACKUP . $filename . $filedate); then run file mode, then take a look in your backup folder, you will find the zipped file still there, if that's OK then its something in the download process thats causing it. You can't test in memory mode, as no file is stored.
  3. @mr_absinthe Is your backup folder empty by any chance? Sorry, not something I thought of :blush: change the line to @array_map( "unlink", glob( DIR_FS_BACKUP . $filename."*" ) ); i.e. just add the @ in front. Your issue isn't the size, its content sent before the header, any warnings/notices etc will cause that, ensure you have the code I posted before to stop the notices
  4. @mr_absinthe Was that with the memory (streaming) method, it states in the doc that can happen if there size estimate is too low, try increasing the guess value. For the file method it uses 2% over final file size but I believe in rare cases that may be insufficient, the problem is with zipped content the download stops the moment content_length is reached, if thats a single byte short of the full file it will be seen as corrupt. Alternatively you can take size out of the equation by removing from ZipStream.php the line (521): 'Content-Length' => $this->size for streaming & for file mode from backup_website.php the line(161) header("Content-Length: ".floor(filesize(DIR_FS_BACKUP . $filename . $filedate)*1.02)); Though that will make the download less friendly. @@mattjt83 Could you say what platform your using (windows/linux) and if you could take a look in your apache error log to see if it sheds any light on what went wrong. I must admit I haven't tested on a windows server but I thought I had caught all the bugs in ZipStream.php
  5. Well clearly there is something odd that language pack, you wouldn't see the error generally as most add-ons will call application-top always, so instantiate DIR_WS_FUNCTIONS . 'html_output.php'); You could modify this to allow the vagaries of your files, I see no point in modifying the contribution itself. To stop the error, in backup_website.php: after(90): require(DIR_WS_FUNCTIONS . 'general.php'); add: require(DIR_WS_FUNCTIONS . 'html_output.php'); and remove that same line from line 170 (appears there purely of error display) To stop the Notice Display caused by conflicts within your language files after(10): $guess = 0; // ... add: error_reporting(E_ALL & ~E_NOTICE);
  6. @@ianric It would appear you have a non-standard database structure! 'set_function' is often null This is the standard with osC2.3 CREATE TABLE IF NOT EXISTS `configuration` ( `configuration_id` int(11) NOT NULL AUTO_INCREMENT, `configuration_title` varchar(255) NOT NULL, `configuration_key` varchar(255) NOT NULL, `configuration_value` text NOT NULL, `configuration_description` varchar(255) NOT NULL, `configuration_group_id` int(11) NOT NULL, `sort_order` int(5) DEFAULT NULL, `last_modified` datetime DEFAULT NULL, `date_added` datetime NOT NULL, `use_function` varchar(255) DEFAULT NULL, `set_function` varchar(255) DEFAULT NULL, PRIMARY KEY (`configuration_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; It would seem in you database you have 'set_function' with a NOT NULL alter that with phpMyAdmin, most addons using SQL changes will fail otherwise.
  7. Hi, When you click either button the code performs a limited startup routine which does not call application _top.php thats as the output is not to be a page but just the download The code does have to call some standard osC routines as the users status must be checked and some variable settings are needed. The code calls languages/$language.php to get date formatting, it would appear your site or your browser is set to czech and that in turn is calling add_ccgvdc_english.php which seems to be doing some very non-standard stuff including adding links with tep_href_link I would suspect you always get the notices, you just see them here as there is no page display. The call to tep_href_link fails as my code doesn't call DIR_WS_FUNCTIONS . 'html_output.php' as nothing in that is needed what is happening with your language files and what made them that way?
  8. @@mattjt83 So the memory (streaming) option should work fine for you, does it not? or is there a reason you only want the file mode?
  9. @@Ken44 I`ll check that out, I`ve not reviewed this code for a long time, perhaps that's overdue. :unsure:
  10. @@mattjt83 What version of PHP are you using then? Is it too early for the streaming option? I have been considering adding a gzip option which would be much less restrictive, though I was thinking people would be using upto date servers generally. This works on all the servers my clients use but perhaps some hosts don't take that much trouble.
  11. Hi, You didn't do anything wrong and you don't necessarily need to change anything! :o ZipArchive is a standard php class, I assumed it would be included as standard, obviously I was wrong in that :blush: Ask your hosts to add the ZipArchive class to your php ZipArchive is only used for file mode zipping, the ZipStream class being used for memory mode (streaming) To prevent the error message, change line 83 of backup_website.php from $mode = isset($_POST['mode']) ? $_POST['mode'] : ''; to $mode = isset($_POST['mode']) ? $_POST['mode'] : ''; if ($mode == 'file' && !class_exists('ZipArchive')) $mode = '';
  12. How many times have you modified your site but the mod went wrong and you wish you had backed up first, this makes creating that backup very easy with just a single click. This contribution creates a zip file of your entire site (excluding the database) for immediate download to your computer so making creation of a site backup quick and easy with just a single click. Your backup, cached and sessions folders will be excluded, others can be easily added. Security: The code will check the user is logged into admin at all stages, so only administrators are able to obtain and download the compressed site copy. Two zipping methods are provided, File and Memory (streaming). File Mode Zipping. The file method first creates a temporary zipped copy of the website within your backup folder then immediately provides the download of that, the temporary zipped copy is then immediately deleted. This process uses very little memory so will always work as long as there is sufficient disk space to store the temporary file. Memory Mode Zipping. With this method the zipping all occurs within memory and at the same time the download is provided (streaming). Memory usage is still relatively low so should not prove an issue, however this requires at least PHP Version 5.1.2, if your server has less than that the memory mode zipping option will not appear. Compatibility: For osC 2.3.x and below Contribution Download Available at http://addons.oscommerce.com/info/8387
  13. Auto Backup Database (Updated) V4.1 released :) http://addons.oscommerce.com/info/8374 Code re-written, now faster & more efficient (un-compressed backups are upto 50% smaller) backups take approx 1.5 secs per Mb (un-compressed). Automatically backs up your database at regular intervals whilst you are logged into admin and create archive backups at a longer intervals. Backups can be GZipped to conserve server space. Backups can now be split or extended past max execution time if you have a very large dBase. Backups are compatible with Database Backup Manager so selective restores can be made. A cron job can also be set up to create timed daily backups, regardless of whether anyone logs in or not. Cron job backups can be automatically emailed on completion Archived backups can now also be auto deleted after a set period, so server won't fill up. The 'sessions' and 'whos_online' tables are now automatically excluded from auto-backups, other exclusions can easily be added if needed. The backup status is now only checked once every 5 minutes instead of on every page load. As logfiles are created in the backup folder, modifications to Database Backup Manager are included to enable display/deletion of same. Added email backup feature to Database Backup Manager Now includes separate language file to ease alterations for non English speakers. Basic install is just 7 easy steps. Compatible with all osC versions 2.3.1 and below. Changes in Version 4.1 Made database read more robust against malformed database entries. Added 'Test Run' button to Auto Backup Setup which makes a forced run so users can easily confirm operation. Added email backup feature to Database Backup Manager. Added option to email backup on completion of cron job. Fixed minor bug in cron job, erroneous function call made when creating backup complete message. Contribution found at http://addons.oscommerce.com/info/8374
  14. @@al3ks That's a standard osC var and it does say in the doc, look for 'search results' If your needing a set listing box size you may have issues as the content of each product box will vary by content for that. You could set product box sizes to suite your final size and use css to prevent overflow so long as you don't care about cut offs.
  15. Within the package there is a file called Product Listing Enhancements, Thumbnails & Manufacturer Headings.html its in the same place you found Installation.html (which also links to the first) I can't see how you missed it! open that, it has all the info you should need. PS Admin settings appear under 'Product Listing' did you look there? Looking at your image you have line feed chars within the product descriptions, thats not normal, you will need to apply the nl2br function on them.
  16. Its hard to tell what your not doing, please say what display mode you have selected. Have you read the section on usage in the docs, things like 'Product Listing Per Row'
  17. @mr_absinthe Possible on next update of auto-backup Have you tried the latest with this, if so did you use there pear option?
  18. @@longhorn1999 This is not something that's specific to this contribution & the code involved does not appear in it, its the split_page_results.php class (in includes/classes) and looking at the version from 2.3.1 the changes are easy: Line 82.83: // previous button - not displayed on first page if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a> '; becomes // previous button - not displayed on first page if ($this->current_page_number > 1) $display_links_string .= '<a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="pageResults" rel="prev" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' "><u>' . PREVNEXT_BUTTON_PREV . '</u></a> '; line 100: $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> '; becomes: $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="pageResults" ' . ($jump_to_page == $this->current_page_number-1 ? ' rel="prev"' : ($jump_to_page == $this->current_page_number+1 ? ' rel="next"' : '')) . ' title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' "><u>' . $jump_to_page . '</u></a> '; line 107,108: // next button if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> '; becomes: // next button if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="pageResults" rel="next" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' "><u>' . PREVNEXT_BUTTON_NEXT . '</u></a> '; Hopefully I didn't miss anything ;)
  19. Uploaded new version 1.5.1 :D Removed phpMailer class due to excessive memory usage when emailing backups, email function now uses pear class or if that's un-available the standard php mail function. This version is compatible with osC 2.3.x and below If pear fails & you wish to use, ask your host to add pear mail with smtp & mime classes.
  20. As product listing is done with the module product_listing.php and most contributions that change the listing layout just alter that for the most part, most product listing contributions for earlier versions will still work with 2.3.1
  21. @mr_absinthe Solution to that is to rename class.smtp.php to mailclass.smtp.php then change line 702 of class.phpmailer.php to require_once $this->PluginDir . 'mailclass.smtp.php';
  22. @mr_absinthe post_max_size and upload_max_filesize limits do not actually apply, they were causing problems for me under LAMP, but on a true server they don't, their defaults are 2M & 8M, I doubt your host defaults to much higher. message_size_limit will apply, but its normally defaulted at 50M. 64M is very low for a max limit on memory, its OK for master value but you should be able to increase through ini_set If that is the absolute max does your host have too many domains on the server? any more than a few hundred, find a better host. The hosts I usually use have a default of 48M, but I can increase that to at least 512M (I think the max is 1GB, but I`ve not tested that far or needed to). Note: You can increase with ini_set('memory_limit','256M'); and ini_get('memory_limit'); will return the same, but that does not mean you actually have that available, you must do usage tests to find that. Re class.smtp.php, that's not a 1.3.1 file, do you know what contribution added it? My plan is to use the pear class for smtp and revert to mail if that's not available, though mail has security issues which is why I used phpMailer
  23. @mr_absinthe Further checks reveal the issue to be related to file encoding and phpMailer is requiring approx 10 x file-size of attachments (memory). I don't have time to debug phpMailer & will release a modified version simply using the mail function, however there will still be a memory cost, as even then the encoding will require approx 5 x file-size. With mail you may have issues with php.ini settings post_max_size and upload_max_filesize if your files are larger plus your mail server may have a set limit on message_size_limit
×
×
  • Create New...