ircf / sendy_smtp_bounce

Bounce program for Sendy SMTP method
15 stars 6 forks source link

Getting error when patching #1

Closed inzel closed 5 years ago

inzel commented 5 years ago

root@sendy:/var/www/html# patch -p0 < sendy_4_0.patch patching file autoresponders.php patching file includes/config.php

patch: **** malformed patch at line 43: diff --git includes/create/send-now.php includes/create/send-now.php

I am running Sendy 4.0.3.1

Any thoughts on this?

mbautista commented 5 years ago

Hello, Do you have the includes/create/send-now.php file in your install ? I suggest to compare the patch file and the code in this file. I will download Sendy last version and fix the patch when I can.

inzel commented 5 years ago

I sure do:

root@sendy:/var/www/html# ls includes/create/ calculate-totals.php main.php send-later.php test-send.php toggle-wysiwyg.php delete-attachment.php save-campaign.php send-now.php timezone.php upload.php

inzel commented 5 years ago

Looks like there are other people experiencing this same issue over at Sendy.

mbautista commented 5 years ago

Hello, Sorry for this, I've just fixed the patch.

Please download the last version here : https://github.com/ircf/sendy_smtp_bounce/blob/master/sendy_4_0.patch

And then apply the patch with cd /path/to/sendy/ && patch -p1 < sendy_4_0.patch

Note : Iv'e replaced -p0 by -p1 in the apply patch command line because it's a git patch.

Let me know if it works for you.

inzel commented 5 years ago

Thank you for the help. Unfortunately it does not work as expected:

root@sendy:/var/www/html# patch -p1 < sendy_4_0.patch patch: **** Only garbage was found in the patch input.

inzel commented 5 years ago

Please disregard my last note. That error occurred because of my mistake. This looks like it works but I get a failure for config.php:

root@sendy:/var/www/html# patch -p1 < sendy_4_0.patch patching file autoresponders.php patching file includes/config.php Hunk #1 FAILED at 29.

inzel commented 5 years ago

I think I got it this time. I used --ignore-whitespace and I now see the data added to includes/config.php:

patch -Np1 --ignore-whitespace < sendy_4_0.patch

inzel commented 5 years ago

I am getting these warning messages:

PHP Warning: Illegal string offset 'type' in /var/www/html/includes/helpers/bounce_driver.class.php on line 431 PHP Warning: Illegal string offset 'boundary' in /var/www/html/includes/helpers/bounce_driver.class.php on line 437

mbautista commented 5 years ago

Hello, The bounce driver is taken from another (unmaintained) repository : https://github.com/cfortune/PHP-Bounce-Handler

It works for me but I haven't tested it in depth...

Could you try replacing in includes/helpers/bounce_driver.class.php line 430 :

$hash['Content-type']='';

by

$hash['Content-type']=array();

And tell me if it works or if you have other issues ?

Thank you.

inzel commented 5 years ago

It appears to be working. No more warnings so far. Ill post again in a few hours if all is still well