At the risk of seeming thick, what errors are showing in your web server logs?
The last line of your post is very telling to me. If a script works fine from the command line and doesn't from the CGI environment then the first thing I think of being wrong is permissions. Web servers (and hence the CGI scripts which become child processes of the web server process) tend to run as an unprivileged user.
You haven't specified what operating system this is all running under but based on your file path notations I'm going to presume it is a flavor of Unix or Linux.
Quite often web servers are run as the user id "nobody" which typically has no permissions on the system at all. Other implementations include using the userid of "apache", "www" or "web" or some derivation thereof.
Check the ownership and permissions of both the upload directory in question and the file in question. Check what userid your web processes are running as. Make sure the permissions of the files and directories match the userid that the web processes are running as.
In reply to Re: The System function and its usage
by blue_cowdawg
in thread The System function and its usage
by Structed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |