Problems running PHP under Linux
| From: | sunil bachwal | Date: | Wed, 04 Jan 2006 05:54:01 +0000 |
| Subject: | Problems running PHP under Linux | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-16917@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.
i had issued all permissions to that file, but still it doesn't work.
but when i run the same code from the command prompt by issusing as command "php cp.php"
it works fine.
Please help me.