Thank you for the suggestion, it helped, and now things seem to be working better.
By investigating the server log, I found that I was still having the PHP memory problem (note that although ini_set('display_errors', E_ALL); was already set, it was not producing any messages in the web browser). In desperation, I reboot the computer the web server was on, and after that, these problems disappeared. Perhaps just restarting httpd would have been enough (because the changes in php.ini weren't read?), but I didn't investigate that.