phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0018517phplist applicationMessage Send Processpublic05-02-17 19:5912-02-17 12:35
Reporterdanwaterloo 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.3.0 
Target VersionFixed in Version3.3.1 
Summary0018517: in 3.3.0 when sending get software error
Descriptionsend a campaign

Sorry a software error occurred:
Please report a bug when reporting the bug, please include URL and the entire content of this page.

Warning: hex2bin(): Hexadecimal input string must have an even length in /home/mail1010/public_html/lists/admin/sendemaillib.php on line 640
phpList version 3.3.0
Steps To Reproducesent a test message to myself from a customers installation.
the message went through, but got the error above.
Additional Informationlet me know if you more data.
rolled the installation back to previous version...
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0058723)
michiel (manager)
05-02-17 20:47
edited on: 05-02-17 22:24

Reminder sent to: duncanc, samtuke

Strange, this indicates that Duncan's fix was not included, but checking the code it was.

Dan, did you get empty links in the emails when you used it?

(0058724)
duncanc (developer)
05-02-17 21:07
edited on: 05-02-17 21:12

@Dan, are you sure that you are using the released version and not one from earlier last week? Line 640 in sendemaillib.php is actually a blank line.

Even taking account of the changes to code in that area, I can't see how hex2bin() can be on line 640.

(0058725)
michiel (manager)
05-02-17 21:11

@Dan, what version of PHP do you have?

Also, as Duncan writes, make sure to download the official one from Sourceforge.
(0058726)
webpotato (reporter)
05-02-17 22:15

I installed 3.3.0 today (upgraded from 3.2.7) after receiving the announcement. Same error. In my case line 635

"Warning: hex2bin(): Hexadecimal input string must have an even length in /home/newsletter/public_html/lists/admin/sendemaillib.php on line 635
phpList version 3.3.0"
(0058727)
webpotato (reporter)
05-02-17 22:17

Also, (sorry) for me "send test" failed as did sending for real.
(0058729)
duncanc (developer)
05-02-17 22:32
edited on: 05-02-17 22:45

@webpotato are you able to try to debug what is failing? Line 635 is the "right" line but "it works for me". Sending a test message is successful.

Can you add this immediately before line 635, then send a test message.

    var_dump($masked);

Then there should be some output at the top of the page. If you then "view source" it is easier to copy/paste that output.

Also, which version of php are you running?

(0058730)
webpotato (reporter)
05-02-17 23:00

PHP is 5.4.45

Is this what you are looking for?

Sorry a software error occurred:
    Please report a bug when reporting the bug, please include URL and the entire content of this page.
Warning: hex2bin(): Hexadecimal input string must have an even length in /home/newsletter/public_html/lists/admin/sendemaillib.php on line 636
phpList version 3.3.0string(87) "7d0781f4-10e5-a2d5-a8f3-a56bcdcbe87c173f0408-5035-ec5d-8a04-18c7c505614a 9"
(0058731)
webpotato (reporter)
05-02-17 23:06

Oh! And there was this one too. These two error msgs had these numbers included, different from the "normal" error msgs that had no numbers.

phpList version 3.3.0string(87) "b3b9a5db-eded-c78d-b695-efb0677fd22d173f0408-5035-5c5d-8a04-18c7c505614a 3"
(0058732)
duncanc (developer)
05-02-17 23:07

@webpotato Yes, that right. Can you check the details of the subscriber who you are sending to? Go to his subscriber profile page, then on the Details tab is a field UUID. What is the value for this particular subscriber?
(0058733)
duncanc (developer)
05-02-17 23:14

@webpotato How many subscribers do you have?
(0058734)
duncanc (developer)
05-02-17 23:20

@michiel I have just found that if there are more than 500 subscribers then the upgrade process doesn't generate the UUIDs. So sending a test message is going to fail as the subscriber doesn't have a UUID.
(0058735)
webpotato (reporter)
05-02-17 23:23

The UUID is
99c5380c-130d-4cbf-8f18-1cf22cf9dadf

Oh, this is kind of funny. So, I had done a clean install of 3.2.7 a week ago. Then I was on a forum because when I tested the preferences page it changed my format preference from HTML to text when all I did was unsubscribe from one of my three public newsletters. Then trying to use the preferences page to reset it, the change was not made (I changed it manually in admin). Someone else reported they were able to replicate that. So, I did a bit more testing and eventually I unsubscribed myself from my test newsletter and I forgot to resubscribe my self. So, I was sending today's test messages but I wasn't subscribed to the newsletter, although my address is in the database so the test message should send anyway, I guess. This just FYI. I Resubscribed and sent another test but it also failed and I got a bunch more numbers if you want them.
(0058736)
webpotato (reporter)
05-02-17 23:24

Over 6000 subscribers.
(0058737)
duncanc (developer)
05-02-17 23:39

The results you showed for the var_dump seem to indicate that the subscriber to which you were sending did not have a value for his UUID (would be empty on the subscriber profile page).

Are you sure that the one with a UUID is failing for the same reason?

If I subscribe a new email address, then send a test message to that email address then I get the same error as you

Warning: hex2bin(): Hexadecimal input string must have an even length in /home/duncan/www/lists_3.3.0/admin/sendemaillib.php on line 636
phpList version 3.3.0string(87) "93b98962-f851-87e5-8729-f02a29388d563451671e-d9c0-293d-8b96-53c935039504 e"

I think that is the cause, the UUIDs have not been generated. You can try processing the queue, even though you do not have a campaign to be sent. Doing that should give each subscriber a UUID. Then sending a test message should work.
(0058738)
webpotato (reporter)
05-02-17 23:49

Okay. I'll try that. But, the user I'm sending to is me. I'm not sending test messages to the From address (the organization's email), they're being sent to my personal gmail account. It's the same address I use for the "Campaign Started/Completed" messages. All my subscribers were imported after the clean 3.2.7 install and were already in the database when I upgraded. Wouldn't these all have UUIDs from before (when at least my test msgs and test sends worked)? I have had two or three subscriptions since the initial import, however.
(0058739)
duncanc (developer)
05-02-17 23:54

The UUID is a new field in release 3.3.0, and doesn't appear to be populated by the upgrade process when there are more than 500 subscribers, which is your case. But the UUIDs are populated in process queue, which is why I suggested you run that.

Maybe there is a different cause of your problem but I can repeat it when the subscriber doesn't have a UUID (which also happens when a new email is subscribed).
It is getting late so I won't respond again today.
(0058740)
webpotato (reporter)
06-02-17 00:04

I looked at the user_user table and all my subscribers, even to most recent ones, have UUIDs. Processing the queue was actually the first test I performed after the upgrade. I sent a test newsletter (not marked "test") from the queue. So I don't know if the UUIDs failed when those folks signed up or not, if that possibly assigned them at that point. I'm going to reinstate my 3.2.7 version now so I will need to bow out of testing for now. I hope you find a solution. Thanks!!
(0058741)
danwaterloo (reporter)
06-02-17 01:45

ok... the urls in the email are good, (there was only the 'preferencss' link, which lead here:

http://mail-it-to-me.punchtv.net/lists/?p=unsubscribe [^]

i added a couple of lines, so that explains the offset... to line 640.

640 is the end line of the 'else' clause:
 } else {
                    $masked = $linkUUID . $cached[$messageid]['uuid'] . $userdata['uuid'];
                    $uuidLength = strlen($linkUUID);
                    $masked[14] = substr(bin2hex(random_bytes(1)), 0, 1);
                    $masked[$uuidLength + 14] = substr(bin2hex(random_bytes(1)), 0, 1);
                    $masked[$uuidLength * 2 + 14] = substr(bin2hex(random_bytes(1)), 0, 1);
                    $masked = str_replace('=', '', base64_encode(hex2bin(str_replace('-', '', $masked))));
                }
             

php version is 5.6.25

I had downloaded the phpList version from sourceforge... the official release version
(0058742)
danwaterloo (reporter)
06-02-17 03:44

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0004 sec)
SELECT *
FROM `phplist_user_user`
WHERE `uuid` != ''
LIMIT 0 , 30

the url in the email linked back to:
http://mail-it-to-me.punchtv.net/lists/lt.php?tid=cEQBAAAGBlcHBBgABQJTGVAFUQcfXlYDDh1XVFFXUwxeCwIKUQEfUgEHDVVSVFcZUFYHUh9SB1MPHVpVAFdMV1kMBw0MUFFQBlYNGQ [^]

I switched back to 3.2.6, so that link goes to a 404 page at the moment... it went to the generic adjust your preferences...
(0058743)
duncanc (developer)
06-02-17 07:38

@michiel the code in actions/processqueue.php to populate UUIDs is incorrect as it uses the wrong field. See line 82 onwards.


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker