How to know if php CAN write files on server and WHERE it can?
| From: | Giulio | Date: | Fri, 29 Apr 2005 08:51:12 +0000 |
| Subject: | How to know if php CAN write files on server and WHERE it can? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-214192@lists.php.net to get a copy of this message | ||
I know, uploading files and handling them is an issue covered again and again, but there are still some answers I can'tfind on archives.
Having to read some uploaded files, perform operations on them ( basically attach them on a single file ), and then save the resulting file using ftp, and trying to have the php page as general as possible ( I mean have it work on the larger number of server possible and without configuration settings ):
1) Could it be possible to have a php or server config that doesn't allow at all to write and read files on the server( I'm afraid yes) and how can I detect this situation from code, at least to show a "this script can't run here" message?
2) All the upload_and_copy_files_somewhere_else examples relay on a destination directory explicitly set in the script. How can i have my php discover on its own where it can write and read, no matter the position since it is a kind of temporary and working folder, and I'll delete all files used when finished?
3) Which security settings ( safe_mode and so on ) should I be aware of?
Some good tutorial somewhere?
Thank you so much,
GiulioCantoberon Multimedia srl http://www.cantoberon.it Tel. 06 39737052