ballouta Posted October 22, 2008 Share Posted October 22, 2008 Hello I have the file 353516023853268.rpl that i am sure it exists in my Public_html the first php copy command works when i copy this file to the 'back' folder. while the second is not working. it doesn't copy the file, I can;t find the problem. Please note that 'ahsan' folder exists. I also modified the code to copy this file to another directory in 'stk' folder but still have the sam eproblem. thank you <?php echo "Copying the rpl file to the backup folder....<br>"; if (!copy("/home/wwwrpld/public_html/353516023853268.rpl", "/home/wwwrpld/public_html/back/dct4/353516023853268.rpl-Motif")) { echo "failed to copy $myf...\n"; } echo "Copying the rpl file to the user folder.... the user here is $user <br>"; if (!copy("/home/wwwrpld/public_html/353516023853268.rpl", "/home/wwwrpld/stk/ahsan/353516023853268.rpl")) { echo "failed to copy $myf...\n"; } ?> Link to comment https://forums.phpfreaks.com/topic/129552-error-copying-file/ Share on other sites More sharing options...
GKWelding Posted October 22, 2008 Share Posted October 22, 2008 I bet if you moved the stk folder to your public_html folder and changed the path accordingly this would work. I think this is an issue with PHP writing to folders outside of the public_html or www folders on apache servers. you may want to check this out and possibly check the file permissions for stk. Link to comment https://forums.phpfreaks.com/topic/129552-error-copying-file/#findComment-671658 Share on other sites More sharing options...
ballouta Posted October 22, 2008 Author Share Posted October 22, 2008 hi actually i have anothe website where i can run this code properly without any error. let's say that the problem is in folders permissions, what is the correct permission for the stk folder and its sub directories? thank you Link to comment https://forums.phpfreaks.com/topic/129552-error-copying-file/#findComment-671672 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.