View previous topic :: View next topic |
Author |
Message |
marlin -
Joined: 01 Sep 2006 Posts: 11
|
Posted: Wed Jul 29, 2020 6:46 pm Post subject: $_FILES fails with code=1 on Linux |
|
|
I'm running the X1 webserver on Linux Mint 20 Cinnamon. Using both Firefox and Midori the simple webpage
Code: | <html>
<form method="post" enctype="multipart/form-data" action="testUpl.php">
File: <input name="uplFile" type="file"><br><br>
<input type= submit value="Upload File" name="procUpl">
</form>
</html>
|
which gets processed by the simple php script
Code: | <?php
print_r($_FILES);
?>
|
yields
Code: | Array ( [uplFile] => Array ( [name] => watershdBridge2.jpg [type] => [tmp_name] => [error] => 1 [size] => 0 ) )
|
It is my understanding that the error code 1 means the uploaded file exceeds the upload_max_filesize directive in php.ini. However, the actual file size is only 97KB. I've verified that the php.ini directive "file_uploads" is On; and "upload_max_filesize" is 10MB.
If try the same webpage and php script on Windows 10 also using Abyss X1, I get
Code: | Array ( [uplPhoto] => Array ( [name] => watershdBridge2.jpg [type] => image/jpeg [tmp_name] => C:\Users\HP\AppData\Local\Temp\php6E6B.tmp [error] => 0 [size] => 97518 ) ) |
which is what you would expect, allowing you to then upload the file.
If you will permit a bit of a sales pitch, I have been using the X1 server on windows for many years and more recently on various Linux distributions. I have always been impressed with how user friendly it is to install and configure Abyss compared to the big A, whether the pre-configured Windows executable or the Linux tar ball. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Sat Aug 01, 2020 9:28 pm Post subject: Re: $_FILES fails with code=1 on Linux |
|
|
marlin wrote: |
It is my understanding that the error code 1 means the uploaded file exceeds the upload_max_filesize directive in php.ini. However, the actual file size is only 97KB. I've verified that the php.ini directive "file_uploads" is On; and "upload_max_filesize" is 10MB. |
Are you sure you are checking the right php.ini file? Try generating the parameters page with phpinfo() and verify the actual php.ini path and the value of upload_max_filesize. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
|