Author Topic: RSS feed parser broken after updating PHP  (Read 809 times)

0 Members and 1 Guest are viewing this topic.

Offline rwskinner

  • Member
  • *
  • Posts: 2
RSS feed parser broken after updating PHP
« on: September 03, 2018, 11:13:42 PM »
My tropics page broke after I updated my server and the PHP.  The feeds were working fine until then.
I was using the nhcfeedparse.php and the nhcfeedparse-pac.php and after the update they started giving me all kinds of errors.
I found a message where Ken was using the new scripts  wx-rss-tropical-atlantic.php and wx-rss-tropical-pacific.php
but I really have a hard time with those...

You can see at... http://www.skinnerranch.net/tropical.php

This is now showing up....
Warning: session_start(): Cannot start session when headers already sent in /opt/lampp/htdocs/Settings.php on line 334
Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/tropical.php:1) in /opt/lampp/htdocs/top.php on line 43

and for the parser scripts....

Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/lampp/htdocs/swx-rss-tropical-atlantic.php on line 245

Warning: fopen(http://www.nhc.noaa.gov/index-at.xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/lampp/htdocs/swx-rss-tropical-atlantic.php on line 245
Error reading RSS data.


Then also....

Warning: fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/swx-rss-tropical-atlantic.php on line 245

Warning: fopen(): Failed to enable crypto in /opt/lampp/htdocs/swx-rss-tropical-atlantic.php on line 245

Warning: fopen(http://www.nhc.noaa.gov/index-at.xml): failed to open stream: operation failed in /opt/lampp/htdocs/swx-rss-tropical-atlantic.php on line 245
Error reading RSS data.

This link opens fine in a browser....http://www.nhc.noaa.gov/index-at.xml

Any help would be very much appreciated.   Its one of the most popular pages on my site.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: RSS feed parser broken after updating PHP
« Reply #1 on: September 04, 2018, 03:04:41 AM »
The root cause of the issues is
Code: [Select]
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /opt/lampp/htdocs/swx-rss-tropical-atlantic.php on line 245. Your web server DNS lookup for www.nhc.noaa.gov is failing and the other messages are a result of that failure message.  Call tech support for your hoster to get the DNS issue resolved.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline rwskinner

  • Member
  • *
  • Posts: 2
Re: RSS feed parser broken after updating PHP
« Reply #2 on: September 04, 2018, 07:43:51 AM »
Moving from Ubuntu 14.04 to 18.04 broke lots of stuff and I've been slowly getting it back going.
I'm a programmer and pretty weal when it comes to PHP and web related stuff but I'm trying.

DNS is what I initially thought as well but when I copied the link and put it in firefox it resolved fine.
What the problem was/is, is that the link is being sent over to ssl  (https) and the certificate is failing verification.

Telling it to ignore verification has it up and working but I will need to find out why it's failing.....

$context = stream_context_create(array('ssl'=>array(
    'verify_peer' => false
)));

$fp = fopen("$RSSURL","rb",false,$context)
   or die("Error reading RSS data.");

My OpenSSL on Ubuntu 18.04 is showing to be 1.0.2o
« Last Edit: September 04, 2018, 08:15:32 AM by rwskinner »

 

anything