The error here happens when we run the PHP command to move the uploaded file to its final location in the Omeka files directory, and it returns false to indicate the move failed.
Yes, the /public_html/error_log had a couple of entries from my struggle with adding elements in Omka (although way fewer than my failed attempts).
And it’s not clearer to me what’s gone wrong:
I’m getting different behaviour from uploading .pdf versus uploading a .jpg file. When I try to upload a ,pdf this is what appears on screen and gets written to /home/public_html/{omeka installation folder}/admin/error_log. I’ve not been able to find a php error log file.
@hknappe Do you have other entries in that log file? Ones relevant to this problem would mention “rename”.
@atrevorsmith The different error you have for PDFs is just specific to the PDFText plugin you’re trying to use. It runs a command on your server, but your server has disabled one of the PHP functions needed for running commands. That’s not related to your uploading problem (but does mean you can’t use PdfText on this server).
And the line(s) immediately before what you captured in this screenshot? What you have here is basically a restatement of the error we already know about, but what we’re looking for would be just before.
“but does mean you can’t use PdfText on this server” - so does that mean that I cannot upload .pdf files at all on this server in Omeka. Please explain, is this a restriction that my service provider has imposed? My Omeka installation is out of the box with minimal configuration changes. Doesn’t that use a PDFText plugin that comes with Omeka? How would I change the PDFText plugin to one that works on this server?
You can upload PDF files, but you’d have to uninstall or deactivate the PdfText plugin first. PdfText just extracts embedded text from the PDF; it’s not required to upload PDFs.
The restriction that’s making PdfText not work is from your hosting provider. You could ask them about enabling the necessary functions (this one is escapeshellarg, but the shell_exec function is also required), but hosts that disable these functions are often not willing to enable them, or will require you to use a more costly form of hosting in order to do so.
OK. I’ve deactivated PdfText plugin and now the behaviour is the same for both .jpg and .pdf. Could running the PdfText plugin be the root cause of the file upload problem?
@hknappe Have you checked your disk space usage? That’s still the best first explanation for a sudden inability to upload files, that you’re just out of space. On some servers you have separate quotas for space just in the public_html folder or similar, just to note a possible complication.
@atrevorsmith No, PdfText shouldn’t have anything to do with this, beyond the one error screen you posted that was unique to PDF uploads.
For both of you: are you able to manually upload a file into the Omeka files/ folder? Say, through cPanel or FTP?
There’s really been very little change in the relevant code for storing files in quite some time, and I’m not aware of any outstanding bugs related to it.
I’m low on ideas at this point: you might be best checking with support from your web host.
@jflatnes Thanks for your effort and suggestion. I will try that during the weekend. But for the time being I have bypassed the problem by setting up a clean Omeka on another server, and imported all elements with API Importer. And that went well. No problem uploading images on that server.
@jflatnes I’ve finally managed to work on this again and the addition of “storage.adapterOptions.useCopy = true” to application/config/config.ini seems to have worked. I’ll do some more testing though.
Many many thanks. I’ll pursue the pdfText issue with my service provider