I am trying to install Omeka S on Hostinger’s shared host platform. While the installation mostly seems to work, I am not able to upload media files on pre-existing items. As I am able to upload asset files and media files when I am first creating an item, and enabling logging does not provide any additional information, I am at a loss.
I had this same difficulty with a previous version (Omeka S 4.1.1?) and updating it to Omeka S 4.2.0 did not resolve the issue. Furthermore, I have also tried again on a different account with a fresh installation of Omeka S but also had the same issue.
I would appreciate suggestions on next steps for debugging. Thanks.
Steps to Reproduce:
- Create a new subdomain and database in Hostinger’s hPanel.
- Download Omeka S (on host shell using wget).
- Expand the ZIP archive.
- Copy the contents (including
.htaccess) to thepublic_htmldirectory for the subdomain. - Complete setup.
- Create an item.
- Upload a media using either file upload or URL.
- Activate Save button.
What Happens:
- The media file is not uploaded.
- White page with the content “Forbidden”.
- Browser console reports a 403 response to the POST request (e.g.
/admin/item/1/edit).
What is Expected:
- Media file is uploaded and attached to the item.
Notes:
- Uploading asset files works.
- Uploading a media file when initially creating an item works.
- I seem to have met the installation requirements. (Listed below)
- Changing the thumbnailer to
Omeka\File\Thumbnailer\GdorOmeka\File\Thumbnailer\NoThumbnaildoes not resolve the issue. (While theimagickPHP extension seems to be installed, it appears that ImageMagick is not. In any case, Gd and NoThumbnail seem to work as expected when uploading the media file while initially creating the item, so this would not seem to be an issue.) - Disabling mod_security according to Hostinger’s directions does not resolve the issue. (Adding
SecFilterEngine OffandSecFilterScanPOST Offto.htaccess. Could they, since writing that article, have changed how they configured mod_security?) - setting APPLICATION_ENV or enabling application logging does not provide additional information.
- Disable file validation does not resolve the issue.
| Requirement | From System information |
|---|---|
| Linux | OS Version: Linux 4.18.0-553.62.1.lve.el8.x86_64 x86_64 |
| Apache (with AllowOverride set to “All” and mod_rewrite enabled) | (The supplied .htaccess contains rewrite rules, and renaming it disables routing entirely. Restoring it restores Omeka S functionality.) |
| MySQL, minimum version 5.7.9 (or MariaDB, minimum version 10.2.6) | Server Version: 11.8.3-MariaDB-log |
| PHP, minimum version 8.1, with PDO, pdo_mysql, and xml extensions installed. | Version: 8.3.24 Extensions: bcmath, bz2, calendar, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, libxml, litespeed, mbstring, memcached, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, random, readline, redis, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, timezonedb, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib Disabled Functions: apache_child_terminate, chgrp, dl, exec, ini_alter, leak, link, mb_send_mail, mysql_list_dbs, passthru, popen, shell_exec, symlink, system, virtual |
ImageMagick version 6.7.5 or greater, the PHP imagick extension, or the PHP gd extension |
gd extension is installed |