The PHP code on my installation was generating warnings like this one:
[Fri Jun 01 10:03:51 2012] [error] [client x.x.x.x] PHP Warning: date()
[<a href='function.date'>function.date</a>]: It is not safe to rely on the
system's timezone settings. You are *required* to use the date.timezone
setting or the date_default_timezone_set() function. In case you used any
of those methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected 'America/New_York' for
'EDT/-4.0/DST' instead in
/var/www/www.muck.ca/htdocs/pw/php/objects/class.record.php on line 223,
referer: http://www.muck.ca/pw/php/beta/
The warnings were also appearing in the output of the page itself,
corrupting the JSON results, and I kept seeing "Login Failed" and clicking
on the button wouldn't make the dialog go away, and it looked like it 'half
logged in'.
To fix it, I did this in my php.ini:
error_reporting = E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR
Perhaps the most ideal solution would be:
1) Get the PHP code to be as aggressive as possible at calling functions
which turn off error logging and warnings if it's going to be returning
JSON output.
2) Have the javascript fail more gracefully when it receives garbarge
output, and perhaps display it to the user in some limited way to help with
diagnostics.