alber7's picture

i want to choose a file via input type file at my home.php -> action to my upload.php script and reading data to transfer them into mariadb

it works if i set an absolut path to my phpspreadsheet reader.

but i want to upload those files to my webserver and manage it from there, which isnt working, i cant upload files though my php script.

 

i have no idea what to do and i am at my end of knowledge, please help :D

 

Forum: 
Jeremy Davis's picture

I just noticed that I had missed your post.

I only know super basic PHP and you haven't supplied any code, so I have absolutely no idea why it isn't working for you. It certainly should be possible though.

The first thing that I would check is that the path you plan to upload to exists. And that the webserver user (www-data) has write access.

If that is all good (and you don't already) perhaps enable PHP debugging just in case there is some error message that is being hidden. Check that 'display_errors' is 'on' in your php.ini (IIRC it should be /etc/php7.3/apache2/php.ini on v16.x). Also our LAMP server has xdebug pre-installed (although not enabled by default IIRC). Having said that, I've never used it and suspect that it's likely overkill for an issue like this.

If you want some more input, please share your code and we can from there. And/or if you need me to elaborate on any of the points I've raised, please ask.

Add new comment