Murdon Posted August 21, 2011 Share Posted August 21, 2011 Hello everybody, I think, this is my first thread concerning a programming problem I opened up in my life. In every other case, I could figure it out by asking other programmers or - that helped me the most time - by asking google. But in this case I don't know. Environment: PHP Version 5.2.10 ubuntu6.7 Apache/2.2.12 Description I want to upload some content. In my case it could be a plain text file, it also could be a binary file. My page is generated dynamically by using PHP and contains more than just one "form" tag. Source code of my form: <form action="interlink/uploadtable.php" method="POST" enctype="multipart/form-data"> <input type="hidden" name="table" value="<?php echo ($sTableString_Base64); ?>" /> <table border="0"> <tr> <th scope="col" align="left">Wählen Sie eine Liste bzw. eine Tabelle aus, die importiert werden soll...</th> </tr> <tr> <td><input name="table_to_upload" type="file" size="55" /></td> </tr> <tr> <td><input name="hasHeadline" type="checkbox" value="TRUE" /> Die Liste enthält eine Kopfzeile </td> </tr> <tr> <td> </td> </tr> <tr> <td><input type="submit" value="Importieren" /></td> </tr> </table> </form> The language is "German", but this should matter anyway. The problem is, that the $_FILES array in the PHP file, which works with the entered file, is always empty. In other cases one or more of the following steps helped: * Ensuring that "enctype" is properly set (It is!) * Ensuring that max_file_uploads is valid (50) * Ensuring that upload_max_filesize is valid (16M) * Ensuring that post_max_size is valid (8M) * Ensuring that post_max_site is lower that upload_max_filesize * Ensuring that every form tag on the page has the enctype * Ensuring that the rights for the public user is valid (777 and 777 both, on temp dir and on destination dir) * ... I have read the whole "Gordons Luk's Blog" and made everything: http://getluky.net/2004/10/04/apachephp-_files-array-mysteriously-empty/ But the $_FILES array remains empty. And the temporary directory also remains empty. I have no more idea, what to do now. Does anyone of you had a same problem or has an idea? I attached the phpinfo() call as a pdf, so you can directly take a look at my configurations. Thanks in advance. Murdon [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/245391-php-apache-and-ubuntu-files-array-empty/ Share on other sites More sharing options...
cags Posted August 25, 2011 Share Posted August 25, 2011 If you create a boiled down example and run it on the same server does $_FILE remain empty? i.e. if you have nothing on the page but a form with a file input. Quote Link to comment https://forums.phpfreaks.com/topic/245391-php-apache-and-ubuntu-files-array-empty/#findComment-1261746 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.