Re: [PHP] Upload is still not working ( More tesitngs)
Hi Everyone, I found some people stated this kind of error , because phpSUExec max allows 755. But I have changed my upload_files directory into owned by apache. it should solved the problem based on this logic. but it won't work at all. Does Any one have an idea on this yours, Michael Leung Michael Leung wrote: My Error Msg: I can read /tmp/phphRiKeP Warning: fopen(upload_files/doodah) [function.fopen]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 18 Warning: fopen(upload_files/Water lilies.jpg) [function.fopen]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 22 upload_files is valid a directoryI am able to write to upload_files This is very strange. upload_files is writeable, but can't write by fopen('upload_files/doodah', 'w') -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload is still not working ( More tesitngs)
Hi All, I did more testes I have added the followings code into my script error_reporting(E_ALL); ini_set('display_errors', TRUE); if (is_readable($_FILES['userfile']['tmp_name'])) { echo I can read . $_FILES['userfile']['tmp_name']; } if ($fp0 = fopen('upload_files/doodah', 'w')) { echo 'I can open upload/doodah for writing'; } if ($fp1 = fopen('upload_files/' . $_FILES['userfile']['name'], 'w')) { echo 'I can open upload_files/' . $_FILES['userfile']['name'] . ' for writing'; } if (is_dir('upload_files')) { echo ('upload_files is valid a directory'); } else { echo ('upload_files is NOT a directory'); } if (is_writeable('upload_files')) { echo ('I am able to write to upload_files'); } else { echo ('I am NOT able to write to upload_files'); } My Error Msg: I can read /tmp/phphRiKeP Warning: fopen(upload_files/doodah) [function.fopen]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 18 Warning: fopen(upload_files/Water lilies.jpg) [function.fopen]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 22 upload_files is valid a directoryI am able to write to upload_files This is very strange. upload_files is writeable, but can't write by fopen('upload_files/doodah', 'w') yours, Michael Leung -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload is still not working ( More tesitngs)
Michael Leung wrote: My Error Msg: I can read /tmp/phphRiKeP Warning: fopen(upload_files/doodah) [function.fopen]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 18 Warning: fopen(upload_files/Water lilies.jpg) [function.fopen]: failed to open stream: Permission denied in /var/www/html/simple_upload.php on line 22 upload_files is valid a directoryI am able to write to upload_files This is very strange. upload_files is writeable, but can't write by fopen('upload_files/doodah', 'w') Nothing strange about that it may be writable by the owner but not by others. Besides that as jason as already pointed out you may be running in safe mode. Other than that, the file upload page on php.net has a wealth of information posted by others like you who had trouble with their uploads, you are sure to find a usefull comment there. -- Raditha Dissanayake http://www.radinks.com/upload/ - Drag and Drop File Upload yours, Michael Leung -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php