How to allow uploading images to imgur

Previously on the Alexhost VPS my website could upload images to Imgurl with an upload that I set and the Imgur API, now that I moved the site to Contabo the images cannot be uploaded to Imgurl from the site, what is the reason and how do I solve it from Webmin or Virtualmin?

Now
a1

Check the web log files or php logs, my guess its a php limit if its a php app.

You’re going to have to provide more details than that. We’re not imgur, and I can’t even guess what software you’re using to upload images to imgur (but I know we don’t make that either).

So, if we’re going to be able to provide any kind of assistance, we’d need to see the actual error when uploading is attempted (from the error log and/or PHP log, not the uninformative error from the UI of your app), at the very least. We might also need to know details about what the actual code is doing.

Here’s an example:

  • This is the same file in both:
  • This one works on another server: http://blochat.online

And this one doesn’t work here in Contabo, Webmin, or Virtualmix:


https://redinga.top

When I upload a file, I see “error could not upload image.”

I suspect your script is not configured correctly. I suggest you verify that the paths are correct and have the appropriate permissions.

This issue has nothing to do with Virtualmin per se.

That doesn’t answer any question I asked. I can’t help, if you’re unwilling to even look at a log.

I’m new to VPS servers and found this log section.

Not sure that going to be any help.
Any error in the php error log.

also make sure php is work ok

on the above domain you need to be looking at upload.php which is the script that your form posts the data too. As it is a php file & I assume you have php error logging switched on, view the relevant php log file to see what is going wrong.
The default files are located at /home/<domain-user>/logs and the default file name is called php_log. This may help you track the error down

1 Like

Disable the “Apache website” feature in “Edit Virtual Server” and then re-enable it. This will regenerate configs and most probably fix the issue you’re having. Also, make sure you have the FPM mode selected on the “PHP Options” page.

My guess is upload.php was written for php 7.x and is now running on php 8.x and is failing through programming differences between the 2 versions

No, not really! This error comes from Apache’s FCGI/PHP-FPM before PHP runs.

I get that error quite a lot but everything is working as designed so the error doesn’t seem to have much effect ( well on my code anyway )

I already did it, I deactivated it and saved it and then I reactivated it and it’s still the same and the FPM is activated.

If you click the PHP logo on the “PHP Options” page, what does it show? Does it run as the correct user?

where?

and I checked the /home/redinga/logs/php_log directory and it is empty

In your screenshot, the PHP logo is right next to the PHP version dropdown.

Check that your server allows outgoing HTTPS connections. Make sure PHP cURL and OpenSSL are enabled, and your Imgur API keys are correct. Test connectivity from the server and restart the web server after any changes.