Joined: 30/03/2012 18:47:31
Location: Spokane, Washington
Summary: Since upgrading to PHP 7.2, the Services_GeoNames PEAR package has been producing an error related the PEAR_Exception.
I see no reference to this so far on the Geonames forum, http://forum.geonames.org/
The code which is used for the api.geonames.org service has not been altered since the upgrade to 7.2. The error message first showed itself to us on April 19th, 2019. I had upgraded from PHP 7.0.33 to 7.2.17 on April 16th, so this occurrence may be related to that PHP version change.
I wonder if it is relation to the PEAR PHP Extension.
This is the error message recorded in the error_log file
[14-May-2019 14:12:51 America/Los_Angeles] PHP Warning: require_once(PEAR/Exception.php): failed to open stream: No such file or directory in /home/username/public_html/Services/GeoNames/Exception.php on line 29
[14-May-2019 14:12:51 America/Los_Angeles] PHP Fatal error: require_once(): Failed opening required 'PEAR/Exception.php' (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/username/public_html/Services/GeoNames/Exception.php on line 29
GeoNames/Exception.php line 29 is the following:
When running the re-installation of PEAR_Exception on cPanel, the following was displayed to verify its installation:
Installing PHP Extensions and Applications Package PEAR_Exception
uninstall ok: channel://pear.php.net/PEAR_Exception-1.0.0 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update downloading PEAR_Exception-1.0.0.tgz ... Starting to download PEAR_Exception-1.0.0.tgz (5,270 bytes) .....done: 5,270 bytes install ok: channel://pear.php.net/PEAR_Exception-1.0.0
There is a similar log when reinstalling GeoNames:
uninstall ok: channel://pear.php.net/Services_GeoNames-1.0.1
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
downloading Services_GeoNames-1.0.1.tgz ...
Starting to download Services_GeoNames-1.0.1.tgz (46,442 bytes)
.............done: 46,442 bytes
install ok: channel://pear.php.net/Services_GeoNames-1.0.1