Cannot upload images to self hosted site
-
I am experiencing a great deal of trouble with this function on my self hosted website. Every time I try to upload anything to the media library I am hit with this ambiguous <“” has failed to upload. Specified file failed upload test.> error message. The file name in the error is not able to be displayed and displays as an empty string as well (array offset type null error for some reason). I cannot see any files in my media library either despite manually placing test files there on my host.
System:
Centos 7.8.2003
Apache 2.4.6
PHP 7.4.7
MariaDB 10.4.13
Wordpress 5.4.2Browser: Firefox on Win10
Steps to reproduce: Attempt to upload a file to media gallery
Let me list what I’ve tried to do to fix this on my own:
Disable all plugins and themes
Disable Apache mod_security
Ensured Selinux context is correct for ~/wp-content/uploads (httpd_sys_rw_content_t)
Ensured file permissions and ownership are correct (apache:apache, 755)
Set Selinux to permissive
Ensured that file_uploads = On in /etc/php.ini
Ensured max file upload size and post size are appropriate
Re-installed PHP
Downgraded to PHP 7.3.x
Reinstalled WordPress through browser
Read through as many similar posts as possible and tried their solutions before becoming too mentally exhausted to keep working at it.This has got to be some cruel joke because I cannot for the life of me figure out why file uploads won’t work. Every other aspect of the site works perfectly, even with Selinux enforcing and mod_security enabled (core ruleset). I can create new pages, posts, users, forms, etc but can’t upload an image or select an image I manually place on the host. It has got to be an issue with Apache or PHP and not the database. I even have a separate FTP server on the same machine that I built for practice and it works perfectly fine even with fairly paranoid security settings.
I am hoping for some kind of silver bullet I’m missing here. Please give me a response with any ideas you may have towards this issue!
- The topic ‘Cannot upload images to self hosted site’ is closed to new replies.