Omeka Classic importer, jobs not completing

What I’m suggesting is that you might not be storing the logged PHP errors from the job at all, or possibly that they’re going to a different or unexpected location.

An error_log() call in a page only shows that errors are logged from web requests and doesn’t necessarily mean they’re logged in a useful way in a background job. Running a simple script on the command line or using php -a to call error_log(), those will use the CLI and so will show you where/whether you’re logging CLI errors. Adding one to the start of the import job (like, the start of the perform() method in src/Job/Import.php) could serve the same purpose.

If you have control over your php.ini, making a writable file and setting the php.ini setting error_log to that file’s path is one simple way of getting the PHP logs to be somewhere you’re sure of their location. You’d also want to make sure the setting log_errors is enabled.

Note: For some servers, there’s a separate php.ini for the CLI:

php -i | grep "Loaded Configuration File"

will tell you what php.ini file is being loaded for the CLI.

Along those same lines, this is an easy way to check what the error log settings currently are for the CLI (the top one shows what the configured log location is, the second shows whether logging is turned on):

php -i | grep "^error_log =>"
php -i | grep "log_errors"