venkat ganesh Posted September 25, 2012 Share Posted September 25, 2012 when i try write content to a xml file using file_put_contents i am getting warning "failed to open stream: Permission denied" for a particular folder where my xml is created. i am using php 5.2 version in iis7 in windows 2008 server. it works fine my windows xp with iis 6. my code is if (is_writable(_PS_MODULE_DIR_.$this->name.'/')) { $basedir =_PS_MODULE_DIR_; $foldername= $this->name; $filename = "$basedir$foldername/config.xml"; chmod($filename,0755); file_put_contents($filename, utf8_encode($xml)); } else echo 'error' folder has required permissions as specified in all other forums. but it still not working. any help please? thanks, ganesh Link to comment Share on other sites More sharing options...
vekia Posted September 25, 2012 Share Posted September 25, 2012 your www user probably doesnt have grants to file/folder, are you sure that everything with permissions is allright? Link to comment Share on other sites More sharing options...
venkat ganesh Posted September 25, 2012 Author Share Posted September 25, 2012 yep. i am sure that permission were given . it is working in my local system using wamp server . but it is not working in wn 2008 server using iis7. Link to comment Share on other sites More sharing options...
venkat ganesh Posted September 27, 2012 Author Share Posted September 27, 2012 please help to resolve the issue... Link to comment Share on other sites More sharing options...
Recommended Posts