Can't upload images

Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: dd191175-1708-bacb-aa2d-9f5da55a8720
Description:
Hi Everyone,

We are having image upload problems from a while, I am troubleshooting our Wordpress instance from a month and not luck on finding the issue.

We recently updated our core to 5.7 while expecting a fix on that however still no luck :frowning:

And there is an additional bug is appeared, browser upload gives us 404 forbidden screen but not always.

So, before upgrading the new distribution of Bitnami Wordpress, here is the last resort of me. Upgrading the distribution is super hard for us because we have CI/CD deployment mechanism with Bitbucket hook.

We also have a clone installation on our preprod environment, everything perfectly works on there.

Please help :slight_smile:

T

I already tried the suggested solutions in the community :frowning:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-content/cache
sudo find /opt/bitnami/apps/wordpress/htdocs/wp-content/cache -type f -exec chmod 664 {} ;
sudo find /opt/bitnami/apps/wordpress/htdocs/wp-content/cache -type d -exec chmod 775 {} ;
sudo chown bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-config.php
sudo chmod g+w /opt/bitnami/apps/wordpress/htdocs/wp-config.php

including the codes above, still no luck.

I also tried to disabling all plugins and activating one by one. nope again :frowning:

Hello @theoilandgasyear,

It seems Apache’s error_log file didn’t get included in our support tool’s report, probably because it was too big. Could you upload the log file at /opt/bitnami/apache2/logs/error_log to a file-sharing server and share it with me as explained in this guide?

Regards,
Francisco de Paz

1 Like

Hi Francisco,

I just sent you the log file via PM. I hope it helps but as far as I see there is nothing interesting in there :frowning:

All the best,
T.

Hello @theoilandgasyear,

Could you try changing your theme to a default one? If the problem persists, please increase Apache’s LogLevel to debug in /opt/bitnami/apache2/conf/httpd.conf, restart Apache, reproduce the issue and share via private message an updated error_log file?

Regards,
Francisco de Paz

1 Like

Hi Francisco,

I just sent you the latest error_log file via PM.

Looking forward to hearing back from you,

All the best.

Hello @theoilandgasyear,

It seems there are some permission errors in your /opt/bitnami/apps/wordpress/htdocs:

[Mon Apr 12 09:00:05.034133 2021] [proxy_fcgi:error] [pid 1936:tid 140160796575488] [client 172.31.40.237:64222] AH01071: Got error 'PHP message: Unable to open /opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/ips.php for reading and writing.', referer: https://theenergyyear.com/
[Mon Apr 12 09:00:05.279997 2021] [proxy_fcgi:error] [pid 1868:tid 140160796575488] [client 172.31.40.237:64218] AH01071: Got error 'PHP message: Unable to open /opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/ips.php for reading and writing.', referer: https://theenergyyear.com/

Can you please re-run the following commands? I have changed the affected folder:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs
sudo find /opt/bitnami/apps/wordpress/htdocs -type d -exec chmod 775 {} \;
sudo find /opt/bitnami/apps/wordpress/htdocs -type f -exec chmod 664 {} \;
sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php

Regards,
Francisco de Paz

1 Like

Hi Francisco,

I ran the commands and also restarted the services but still can’t upload images as seen below :frowning:

All the best,

Hello @theoilandgasyear,

To keep debugging the issue, could you try uploading a different file? For example, try uploading a .pdf that doesn’t go above the size limit. Could you also try using the browser uploader instead of the multi-file uploader?

I have seen some reports on this regarding the same version you are using, WP 5.3. From what you told me, the other instance you have is having the same issue, and upgrading to 5.7 didn’t solve it, is that right? Is your other instance also using or bitnami WordPress stack?

Regards,
Francisco de Paz

Hi @fdepaz,
On the screenshots, first one is the browser uploader and the second one is multi-file uploader- both fails to upload.

I’ve tried to upload different sizes of PDFs however they all successfully uploaded. I rode the reports in there but they are also unsolved :frowning: That’s so weird.

Is there anything comes to you what could affects us? As they said on the reports, I tried to disable the WordFence but no luck.

On the other hand yes, the other instance is 5.7 and yes it’s Bitnami WordPress stack and it’s rarely happening there.

We’re planning to upgrade our production environment to 5.7 soon.

If you don’t mind, let’s keep the ticket open till we proceed with the core upgrade and I’ll keep you and community informed.

Hello @theoilandgasyear,

If the PDFs successfully uploaded there may be an issue with the file you were using to test this. I haven’t been able to find the cause though it seems it is an error with the application itself.

We can indeed leave this thread open until you have more news on this.

Regards,
Francisco de Paz

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.