Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Database Manager


Jan Zonjee

Recommended Posts

@mr_absinthe

 

The pear issue is as detailed in the doc If pear fails & you wish to use, ask your host to add pear mail with smtp & mime classes.

 

I suggest you do get pear mail setup as you are likely to have more success with pear mail as its not as crude as php mail and is more secure

 

I`ll look at modifying the headers for wider compatibility though.

 

 

Re size issue, I don't think it is one, I note Thunderbird reports the attachment size correctly, but archive manager states larger by the same proportion you get.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

@mr_absinthe

 

I had another idea, do you have gzipping enabled generally on your server (not just through the osC setting or application_top.ph? If so that can cause issues as it will attempt to re-gzip a already compressed file causing corruption.

 

Website backup has the line

if (function_exists('apache_setenv')) apache_setenv('no-gzip', '1');

to attempt to prevent that, but that function is not always available.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

All that I can see in the server information is:

HTTP_ACCEPT_ENCODING gzip, deflate

_SERVER["HTTP_ACCEPT_ENCODING"]gzip, deflate

 

But... whether it's enabled or not, what can I do about it? Is it being gzipped again when emailed?

Edited by mr_absinthe

Absinthe Original Liquor Store

Link to comment
Share on other sites

And I was looking at another server... the server where I'm testing it atm has gzip compression enabled as well as:

_SERVER["HTTP_ACCEPT_ENCODING"]gzip, deflate

_ENV["HTTP_ACCEPT_ENCODING"]gzip, deflate

 

Is that line also in the backup manager or auto backup?

Edited by mr_absinthe

Absinthe Original Liquor Store

Link to comment
Share on other sites

@mr_absinthe

 

Its not easy to tell if its enabled thorough php You can test its working on the output, but that does'nt help

 

No the code isn't in the others as I`m still testing on how useful, as it seems more often disabled than not.

 

There is an additional header that can be added, I`ll look at a minor update.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Looking at your results with Website Backup it does look like your issue is re-gzipping, as that was the main change there

 

I`ll have the update done when there's time.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 2 weeks later...

Uploaded new version 1.5.2

 

Changes:

 

Modified email function to widen server compatibility

 

Main Features of Database Backup Manager:

 

Better support for large databases

Existing Backup files can be compressed plus improved support for compression.

Selective Backups can be created (on a per table bases)

Selective Restores can be made (on a per table bases) given a compatible backup file (from this or Auto-Backup Database)

Database Backups can be emailed

Log files within the backup folder can be viewed or deleted

Backup file list can be sorted on name, date and size (ascending or descending).

 

This version is compatible with osC 2.3.x and below

 

Full Package

 

Download from: http://addons.oscommerce.com/info/5769

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Released a pure 2.3.x version here http://addons.oscommerce.com/info/8412

 

Just the same as the last release but with 2.2 elements removed in the package

 

 

Pity you can't alter a package to indicate support for multiple osC versions! :huh:

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

OK, I've finally managed to update a test on two different servers. Here are some results:

1st PHP Version 5.3.10

after clicking "mail", the following warning was displayed Warning, PEAR Mail not found or insufficient to email backup, reverting to standard mail function. However the file was emailed fine. Unfortunately, I am unable to unpack no matter what I try (7zip, etc).

When I download the same backup file directly from download manager, it is fine, I'm able to open it in any program.

 

2nd PHP Version 5.2.9

after clicking "mail", the following warning was displayed: Warning, PEAR Mail not found or insufficient to email backup, reverting to standard mail function. I've contacted my host and they confirmed, that PEAR is installed on the server. The backup was sent by email OK. Unfortunately, I am also unable to unpack it: backu_201204160633.sql.gz: The archive is either in unknown format or damaged!

Same as on the 1st server, when I download the same backup file directly from download manager, it is fine, I'm able to open it in any program. I've noticed big difference in file size displaed:

Emailed sql.gz file size 13,146 KB

Downloaded (directly from backup manager) sql.gz file size 9,733 KB

Absinthe Original Liquor Store

Link to comment
Share on other sites

@mr_absinthe

 

As stated in the doc, you need PEAR mail with smtp & mime classes, otherwise you will see that warning message. The fact that PEAR is installed does not mean you will automatically have all. The change is easy for your host though.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

@mr_absinthe

 

Yes, the trouble is a am unable to duplicate your issue on any server and no-one else has reported the same.

 

So it would be very helpful to know if you have the same issue with PEAR, would enable me to narrow the issue down greatly.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hello - I'm a relatively new user to OS Commerce with our website and want to know what the recommended add-on to export my order data to a csv (or any excel format). Can someone point me in the direction of where to find one that is widely used? Ive been looking and seems to be all over the map on this one. THANK YOU!

Link to comment
Share on other sites

@@Brainbug125

 

I could add a comment option on mailing backups, I don't think its wise to add a comment to the backup file, I recall Jan saying he did that but it caused an issue. Though auto-backup does add a summary comment, but the backup code in that is different to this (I did a complete re-write from the original)

 

The other way would be to create additional log files.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 2 weeks later...

My host now confirmed that the PEAR mail with smtp & mime classes is installed on the server, however I'm still receiving the following warning when trying to email it:

Warning, PEAR Mail not found or insufficient to email backup, reverting to standard mail function.

 

They also sent me this link to configure th application: http://www.cyberciti.biz/tips/howto-php-send-email-via-smtp-authentication.html

Absinthe Original Liquor Store

Link to comment
Share on other sites

OK, I've managed to sent the backup file by email via PEAR finally and I can confirm that the backup file is fine and can be unpacked without any issues. However when the PEAR fails and the backup is sent via standard mail function (PEAR Mail not found or insufficient to email backup, reverting to standard mail function), the backup file seems to be corrupted - I was unable to unpack - the archive is either in unknown format or damaged!

 

It is pity because if there is no PEAR available, the email function is currently not usable, at least on couple of different servers I've tried.

Edited by mr_absinthe

Absinthe Original Liquor Store

Link to comment
Share on other sites

  • 2 weeks later...

@mr_absinthe

 

OK, glad you could finally test with PEAR and found that works, helps me to track the issue. Not sure the link you gave is of any relevence, as you found, once PEAR is properly set up ,it works.

 

Try this change in mail_backups.php

 

replace (98):

 

$data = @fread($fp,filesize(DIR_FS_BACKUP . $filename));

 

with:

 

			   $data = '';
		   while (!feof($fp)) $data .= @fread($fp, 1024);

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 3 weeks later...

Hi there,

 

I installed Database Backup Manager, which is great, but the email function doesn't seem works for me.

 

I had error message:

[sMTP: Invalid response code received from server (code: -1, response: Hello there.)]---> this is port 110 respond

POP Port is:110

[sMTP: Invalid response code received from server (code: -1, response: .)]---> this is port 225 respond

SMTP Port is: 25

 

I had IP trapped installed, at the beginning the email doesn't work but it took a while to send it to my email account.

I am not sure this will be the same as this time it said ERROR.

 

Can anyone please help?

 

Lyn

Link to comment
Share on other sites

  • 1 month later...

Hi Jan,

 

thanks for you contribution. works fine with OsC 2.3.1 and save me a lot of space. Only one problem with emailing the file:

Email send error: Failed to connect to smtp.1and1.com:587 [sMTP: Failed to connect socket: Connection refused (code: -1, response: )]

My smtp host requires authentication: "(To send e-mail using the SMTP-Server, activate SMTP Authentication. Please do not use the Secure Password Authentication (SPA) option. Optionally, port 587 can also be used in addition to the default port (25) RFC 2476.).".

How can I activate that in the script of mail_backups.php? - Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

hello

 

i've installed this great contribution and everything seems to working fine, but when i try to send the backup file via email, i'm getting this message:

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

what am i doing wrong, can you help me to get it running?

 

andrea

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...