Skip to content

Instantly share code, notes, and snippets.


Nick Benson Ottergoose

View GitHub Profile
LucaRosaldi / distance-sample.php
Last active Jan 11, 2022
PHP: Get Distance Between two Geolocated Points (lat/lon)
View distance-sample.php
/* These are two points in New York City */
$point1 = array('lat' => 40.770623, 'long' => -73.964367);
$point2 = array('lat' => 40.758224, 'long' => -73.917404);
$distance = getDistanceBetweenPoints($point1['lat'], $point1['long'], $point2['lat'], $point2['long']);
foreach ($distance as $unit => $value) {
echo $unit.': '.number_format($value,4).'<br />';
litzinger /
Last active Jan 19, 2022
How to show errors when you get a white screen in EE. Turning up the debugging will reveal PHP errors.


Below are two techniques to help debug the WSOD (white screen of death), usually a 500 server error, in an ExpressionEngine site. The Basic-Debugging option will be suitable in most cases and is specific to ExpressionEngine. The Advanced-Debugging is generic and applicable to any PHP based software. If the basic debugging does not work, try the advanced.

If you get a WSOD you will need to first get your site to reveal an error before reporting it to EllisLab or the add-on developer. Simply reporting "I get a white screen" does not give the developer enough information to assist you. An error message on the other hand will point the developer to the source of the issue.