phpmady Posted December 25, 2010 Share Posted December 25, 2010 Hi, Happy Christmas I got a error in my php file only when am running in linux server $handle = fopen("bak\\".'db-backup-'."$date_time".'.sql','w+'); fwrite($handle,$return); I am trying to write the content in the bak folder, but it fails, its showing the following error. Warning: fopen(bak\db-backup-25-12-2010-06-53.sql) [function.fopen]: failed to open stream: Permission denied in /home/cmstouch/public_html/cmstouch_demo/touchPanel/global.php on line 404 Warning: fwrite(): supplied argument is not a valid stream resource in /home/cmstouch/public_html/cmstouch_demo/touchPanel/global.php on line 405 Thanks Link to comment https://forums.phpfreaks.com/topic/222633-fopen-error-in-linux-server/ Share on other sites More sharing options...
mmarif4u Posted December 25, 2010 Share Posted December 25, 2010 That mean, the permission are not right for the folder you are trying to write into. Change it to 766, 777. Depends on the situation. http://www.elated.com/articles/understanding-permissions/ Link to comment https://forums.phpfreaks.com/topic/222633-fopen-error-in-linux-server/#findComment-1151347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.