Re: Problems running PHP under Linux
| From: | Brice | Date: | Wed, 04 Jan 2006 08:23:52 +0000 |
| Subject: | Re: Problems running PHP under Linux | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-16918@lists.php.net to get a copy of this message | ||
> Dear Sir,
>
> I had written a small code in php to copy a file, its as follows
>
> <?
> copy('/etc/test1.txt','/tmp/test.txt');
> ?>
>
> I had named the file as cp.php.
>
>
> The problem is when i open the file in my browser(Mozilla),it issues
> a warning as follows
>
> Warning: copy(/etc/test1.txt): failed to open stream: Permission
> denied in /var/www/html/cp.php on line 2.
The user who runs the script (the same who runs Apache) don't have the
rights to read it.
> i had issued all permissions to that file, but still it doesn't work.
What did you do exactly?
Brice Favre.
>
> but when i run the same code from the command prompt by issusing as
> command "php cp.php"
> it works fine.
>
>
> Please help me.