Re: Problems with PHP upload to symlink
| From: | Rasmus Lerdorf | Date: | Sat, 15 Jul 2000 17:25:06 +0000 |
| Subject: | Re: Problems with PHP upload to symlink | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6755@lists.php.net to get a copy of this message | ||
> I have a php script web form that uploads a single file to the web
> server which works fine when uploading to normal directory on the web
> server. When I try to upload to a symlink created in the web
> directory which links to outside the web directory it doesn't work.
>
>
> Here is the line I use to copy a file:
>
> exec("cp $sound /home/html/sounds/uploads/$sound_name");
Most likely a permissions problem. Use the built-in copy() function
instead of shelling out to cp. Should give you better error messages as
well.
-Rasmus