[ZendTo] Error after upgrade

Dale E. Qualls deq at pattishall.com
Wed Feb 1 17:16:00 GMT 2017


Thank you!!








[http://www.pattishall.com/imgs/pattishalllogo.jpg]






Dale E. Qualls
Director of Information Technology
Pattishall, McAuliffe, Newbury, Hilliard & Geraldson LLP
200 South Wacker Drive, Suite 2900
Chicago, IL 60606-5896
Direct: (312) 554-7979 Main: (312) 554-8000 Fax: (312) 554-8015
deq at pattishall.com<mailto:deq at pattishall.com> www.pattishall.com<http://www.pattishall.com> Follow us on Twitter<http://www.twitter.com/Pattishall>



From: zendto-bounces at zend.to [mailto:zendto-bounces at zend.to] On Behalf Of Jules
Sent: Wednesday, February 01, 2017 11:08 AM
To: ZendTo Users
Subject: Re: [ZendTo] Error after upgrade

Oops!

4.01 would explain a few things, yes.

Make sure you keep a copy of your
    zendto.conf
    preferences.php
    any database files you have (if using SQLite or SQLite3 then it'll be in /var/zendto/zendto.sqlite)
    Your dropoffs under /var/zendto/dropoffs

Then you should be able to largely rip it all out and replace it with the latest release.
There is an upgrade_preferences_php tool in /opt/zendto/bin which will do 99% of the work of upgrading your preferences.php file for you.
I'm afraid you'll need to do zendto.conf yourself, but a diff between yours and the new default one should show you what you need to add to yours.

Once you've done all of that, the NSSUtils.php file I sent you should actually work. :-)

Before I release the new version with the NSSUtils.php change in it, there's one security issue I need to sort out as well, to stop the sender always being told the ClaimID and Passcode, even if they are not a member of your organisation.

I will try to get that done tomorrow, but no promises...

Cheers,
Jules.

On 01/02/2017 16:35, Dale E. Qualls wrote:
Well it's just all messed up ☺  I am on 4.01, guess that would explain it, huh?  Maybe a rip and replace might be the best way to go…

rpm --verify zendto
missing     /opt/zendto/cache/This.Dir.Must.Be.Writeable.By.Apache
S.5....T  c /opt/zendto/config/preferences.php
S.5....T  c /opt/zendto/config/zendto.conf
S.5....T    /opt/zendto/lib/NSSDropbox.php
missing     /opt/zendto/myzendto.templates_c/This.Dir.Must.Be.Writeable.By.Apache
S.5....T  c /opt/zendto/templates/about.tpl
S.5....T  c /opt/zendto/templates/dropoff_email.tpl
S.5....T  c /opt/zendto/templates/main_menu.tpl
S.5....T  c /opt/zendto/templates/new_dropoff.tpl
S.5....T  c /opt/zendto/templates/pickup_email.tpl
S.5....T  c /opt/zendto/templates/show_dropoff.tpl
S.5....T  c /opt/zendto/templates/verify.tpl
S.5....T  c /opt/zendto/templates/verify_email.tpl
missing     /opt/zendto/templates_c/This.Dir.Must.Be.Writeable.By.Apache

grep recaptchalib /opt/zendto/{lib,www}/*php
/opt/zendto/www/pickup.php:require "recaptchalib.php";
/opt/zendto/www/req.php:require "recaptchalib.php";
/opt/zendto/www/verify.php:require "recaptchalib.php";









[http://www.pattishall.com/imgs/pattishalllogo.jpg]






Dale E. Qualls
Director of Information Technology
Pattishall, McAuliffe, Newbury, Hilliard & Geraldson LLP
200 South Wacker Drive, Suite 2900
Chicago, IL 60606-5896
Direct: (312) 554-7979 Main: (312) 554-8000 Fax: (312) 554-8015
deq at pattishall.com<mailto:deq at pattishall.com> www.pattishall.com<http://www.pattishall.com> Follow us on Twitter<http://www.twitter.com/Pattishall>



From: zendto-bounces at zend.to<mailto:zendto-bounces at zend.to> [mailto:zendto-bounces at zend.to] On Behalf Of Jules
Sent: Wednesday, February 01, 2017 10:21 AM
To: ZendTo Users
Subject: Re: [ZendTo] Error after upgrade

Dale,

That would imply you've got an old PHP file in there somewhere that is including recaptchalib.php.
That file no longer exists in 4.20.

I think you have wound up with a mix of the 2 versions.
If you're on an RPM-based system, do this
    rpm --verify zendto
and see what it thinks are different. It should only mention files in /opt/zendto/config and /opt/zendto/templates. Everything else should match what it expects.

What file thinks it's including recaptchalib.php ?
Something like
    grep recaptchalib /opt/zendto/{lib,www}/*php
should show you.

Jules.
On 01/02/2017 15:58, Dale E. Qualls wrote:
So I put this into my existing, running system.  I was able to login to the site but when I clicked on "Drop-off" I received this:

Fatal error: Cannot redeclare recaptcha_get_html() (previously declared in /opt/zendto/www/recaptchalib.php:118) in /opt/zendto/lib/NSSUtils.php on line 219










[http://www.pattishall.com/imgs/pattishalllogo.jpg]






Dale E. Qualls
Director of Information Technology
Pattishall, McAuliffe, Newbury, Hilliard & Geraldson LLP
200 South Wacker Drive, Suite 2900
Chicago, IL 60606-5896
Direct: (312) 554-7979 Main: (312) 554-8000 Fax: (312) 554-8015
deq at pattishall.com<mailto:deq at pattishall.com> www.pattishall.com<http://www.pattishall.com> Follow us on Twitter<http://www.twitter.com/Pattishall>



From: zendto-bounces at zend.to<mailto:zendto-bounces at zend.to> [mailto:zendto-bounces at zend.to] On Behalf Of Jules
Sent: Wednesday, February 01, 2017 9:51 AM
To: ZendTo Users
Subject: Re: [ZendTo] Error after upgrade

Dale,

I've attached a new /opt/zendto/lib/NSSUtils.php for you (it's gzip-ed, so gunzip it first).

Save a copy of your current one, copy this new one in to the right place.
Then try it for me and let me know if it works okay on your 5.2.17 system.

If it does, I'll publish a new release of ZendTo with the new code in it. You'll then be able to just "yum upgrade zendto" to pick up the newest release.

Thanks!
Jules.



On 01/02/2017 14:35, Dale E. Qualls wrote:
I know I'm on 5.2.17, I checked that out yesterday and did some googling and it said that the ?: was fine after 5.2 but the older version is probably the issue.  Will anything break if I upgrade to 5.3?

php --version
PHP 5.2.17 (cli) (built: Jan 11 2011 11:13:37)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

md5sum /opt/zendto/lib/NSSUtils.php
e382d79b8aded31d177861a86f69738c  /opt/zendto/lib/NSSUtils.php

php -l /opt/zendto/lib/NSSUtils.php
No syntax errors detected in /opt/zendto/lib/NSSUtils.php

Thanks, Jules!!








[http://www.pattishall.com/imgs/pattishalllogo.jpg]






Dale E. Qualls
Director of Information Technology
Pattishall, McAuliffe, Newbury, Hilliard & Geraldson LLP
200 South Wacker Drive, Suite 2900
Chicago, IL 60606-5896
Direct: (312) 554-7979 Main: (312) 554-8000 Fax: (312) 554-8015
deq at pattishall.com<mailto:deq at pattishall.com> www.pattishall.com<http://www.pattishall.com> Follow us on Twitter<http://www.twitter.com/Pattishall>



From: zendto-bounces at zend.to<mailto:zendto-bounces at zend.to> [mailto:zendto-bounces at zend.to] On Behalf Of Jules
Sent: Wednesday, February 01, 2017 3:17 AM
To: ZendTo Users
Subject: Re: [ZendTo] Error after upgrade

Dale,

Please can you run 3 commands for me and send me the output of them:

php --version
md5sum /opt/zendto/lib/NSSUtils.php
php -l /opt/zendto/lib/NSSUtils.php

If you are running PHP earlier than 5.3, you will almost certainly get a syntax error of some sort on that line, as prior to 5.3 you couldn't skip the value between the "?" and the ":".

If that turns out to be the cause, replace that line with these 2:

$the_ip = filter_var($the_ip, FILTER_VALIDATE_IP);
$the_ip = $the_ip ? $the_ip : '0.0.0.0';

That should achieve the same thing, if my brain is attached correctly this morning.

Please do let me know how you get on.

Cheers,
Jules.
On 31/01/2017 16:49, Dale E. Qualls wrote:
I upgraded today (yum update zendto) and everything appeared to update normally.

Trying to open the site in the browser, I received this:

Parse error: syntax error, unexpected ';' in /opt/zendto/lib/NSSUtils.php on line 193

The only semicolon on that line is the one at the end:

/* Fetch the REMOTE_ADDR of the http connection, even through proxies */
function getClientIP()
{
  // Get the forwarded IP if it exists
  if ( isset($_SERVER['HTTP_CLIENT_IP']) && array_key_exists('HTTP_CLIENT_IP', $_SERVER) ) {
    $the_ip = $_SERVER['HTTP_CLIENT_IP'];
  } elseif ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) && array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER )) {
    $the_ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
    $the_ip = trim($the_ips[0]);
  } else {
    $the_ip = $_SERVER['REMOTE_ADDR'];
  }

  // Now validate it
  $the_ip = filter_var($the_ip, FILTER_VALIDATE_IP) ?: '0.0.0.0';    <-------------THIS IS LINE 193

  return $the_ip;
}

Any thoughts or suggestions?







[http://www.pattishall.com/imgs/pattishalllogo.jpg]






Dale E. Qualls
Director of Information Technology
Pattishall, McAuliffe, Newbury, Hilliard & Geraldson LLP
200 South Wacker Drive, Suite 2900
Chicago, IL 60606-5896
Direct: (312) 554-7979 Main: (312) 554-8000 Fax: (312) 554-8015
deq at pattishall.com<mailto:deq at pattishall.com> www.pattishall.com<http://www.pattishall.com> Follow us on Twitter<http://www.twitter.com/Pattishall>



[http://images.pattishall.com/images/25pixelimage.gif]

[http://images.pattishall.com/images/25pixelimage.gif]

[http://images.pattishall.com/images/blf-badge.jpg]

[http://images.pattishall.com/images/25pixelimage.gif]

Pattishall Ranks GOLD in the United States and in Illinois in the prestigious
WTR 1000

[http://images.pattishall.com/images/25pixelimage.gif]

[http://images.pattishall.com/images/2014chambers-65.jpg]

[http://images.pattishall.com/images/25pixelimage.gif]

[http://images.pattishall.com/images/2013gototop500.jpg]

________________________________
The preceding message and any attachments may contain confidential information protected by the attorney-client or other privilege. You may not forward this message or any attachments without the permission of the sender. If you believe that it has been sent to you in error, please reply to the sender that you received the message in error and then delete it. Nothing in this email message, including the typed name of the sender and/or this signature block, is intended to constitute an electronic signature unless a specific statement to the contrary is included in the message.
________________________________









_______________________________________________

ZendTo mailing list

ZendTo at zend.to<mailto:ZendTo at zend.to>

http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto<http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto>






Jules



--

Julian Field MEng MBCS CITP CEng



'It's very unlikely indeed he will ever recover consciousness, and

 if he does he won't be the Julian you knew.'

  - A hospital consultant I proved very wrong in 2007 :-)



www.Zend.To<http://www.Zend.To>

Twitter: @JulesFM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654






_______________________________________________

ZendTo mailing list

ZendTo at zend.to<mailto:ZendTo at zend.to>

http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto<http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto>





Jules



--

Julian Field MEng MBCS CITP CEng



'One of the deep secrets of life is that all that is really worth

 doing is what we do for others.' - Lewis Carroll



www.Zend.To<http://www.Zend.To>

Twitter: @JulesFM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654





_______________________________________________

ZendTo mailing list

ZendTo at zend.to<mailto:ZendTo at zend.to>

http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto<http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto>




Jules



--

Julian Field MEng MBCS CITP CEng





www.Zend.To<http://www.Zend.To>

Twitter: @JulesFM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654




_______________________________________________

ZendTo mailing list

ZendTo at zend.to<mailto:ZendTo at zend.to>

http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto<http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto>



Jules



--

Julian Field MEng MBCS CITP CEng



'What happened in the past that was painful, has a great deal to

 do with what we are today.' - William Glasser



www.Zend.To<http://www.Zend.To>

Twitter: @JulesFM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20170201/0721f82e/attachment-0001.html 


More information about the ZendTo mailing list