I posted a few days ago about problems with filesystem commands like copy(), move_uploaded_file(), backticked shell commands and so on while using CGI PHP under apache suexec.

It seems that these only work in directory trees starting in the directory in which the script itself resides. So if the script is in, say, /usr/home/user/website/cgi-bin then none of these will work except on (executable) files and directories in this directory or its sub-directories. So an attempt to move_uploaded_file() to /usr/home/user/website/pages/images/ will fail but will succeed if aimed at /usr/home/user/website/cgi-bin/images

Symbolic links provide a workaround in cases like the one I've been looking at, where I want to provide a form in a website control panel to upload images for display in the site.

I'm posting this so it's available to others, because I haven't found any mention of this (or any other) solution when googling.

PWR.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to