![]() ![]() |
Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 25.08.2007 Ostrzeżenie: (0%)
|
Witajcie! (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Mam problem. Zainstalowałem na swoim serwerze apacza2 i PHP5 (najnowsze wersje). PHP5 zostało skonfigurowane w ten sposób: Cytat './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-openssl' '--with-curl' '--with-zlib' '--with-bz2' '--with-mysql' '--with-gd' '--enable-sockets' '--enable-mbstring' '--with-mcrypt' W php.ini jest oczywiście włączona funkcja file_uploads, i ustawiony katalog tymczasowych plików (uprawnienia tego katalogu tymczasowo to 777). No i teraz problem w tym, że to nie działa :| Cytat <form enctype="multipart/form-data" action="http://192.168.0.8/uploadtest.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> Kod <?php $uploaddir = '/var/www/uploaded/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> Po wrzuceniu pliku wywala tą część skryptu która obsługuje problemy:D czyli Possible file upload attack. W logach serwera też głucho;/ Co jest?? Czy ktoś będzie mógł mi pomóc?? |
|
|
|
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 359 Pomógł: 1 Dołączył: 16.04.2006 Skąd: Łódź Ostrzeżenie: (0%)
|
a co pokazuje to print_r na $_FILES ?
|
|
|
|
![]() ![]() |
|
Aktualny czas: 22.12.2025 - 23:23 |