Upload file from website

Hello!
I’ve set my website on Webmin, one of the html forms must allow the user to choose a file and upload it in a folder on the server.
I tried with copy function and move_uploaded_file in php, but no file is uploaded or copied on the directory on the server (/var/www/…).
Is there a way to do it?
Thanks

this will be a PHP problem not webmin, you also have not supplied any system information, there is little chance of helping you without that sort of background.
With the php that handles the upload, is the file you are trying t upload bigger than the upload file size limit set in the relevant php.ini ?

Yes, I’m sorry: I’m using Webmin 2.102 and OS Ubuntu Linux 22.04.2
The file I’m using as a test to upload is not bigger than the limit in php.ini and file_uploads is On

so webmin only, no virtualmin ? and the post size is big enough ?

Yes, only Webimn and maximum size is big enough in both cases
Using move_uploaded_file() on the form, it makes me choose a file and goes on without errors, but it isn’t loaded on the directory on the server

Webmin has nothing to do with PHP. It isn’t written in PHP, Webmin isn’t your web server (that’s probably Apache or nginx), and it isn’t a PHP application server. Hopefully, you’re running your apps using PHP-FPM, in which case this might be a permissions issue.

In short: No, there is no way to make Webmin make your PHP application work, because Webmin doesn’t do anything with PHP. It’s a general purpose systems management tool.

And, as an aside, Virtualmin is recommended if you’re hosting websites on your system. Webmin isn’t a web hosting control panel.

yes yes YES — Virtualmin takes care of so many configuration and management headaches even if you just have a single website hosted on a server !!

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