[ZendTo] Error after upgrade

Jules Jules at Zend.To
Wed Feb 1 09:16:55 GMT 2017


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 GOLD in 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
> 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
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/7c5bc89b/attachment-0001.html 


More information about the ZendTo mailing list