[ZendTo] Error after upgrade

Jules Jules at Zend.To
Wed Feb 1 15:50:35 GMT 2017


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!!
>
> 	
>
> 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 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?
>
>     	
>
>     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>
>
>     	
>
>     	
>
>     	
>
>     	
>
>     Pattishall Ranks GOLDin the United States and in Illinois in the
>     prestigious
>     WTR 1000
>
>     	
>
>     	
>
>     	
>
>     	
>
>     ------------------------------------------------------------------------
>
>     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
>
>
>
> 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
> 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
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/c5d49b82/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NSSUtils.php.gz
Type: application/x-gzip
Size: 2691 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20170201/c5d49b82/attachment-0001.gz 


More information about the ZendTo mailing list