
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>
<!-- 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??