On many Drupal pages (both user and administrator mode) I get:
"warning: chmod() [function.chmod]: No such file or directory in F:\drupal\includes\file.inc on line 131."
It seems that this line does not find .htaccess file:
chmod($directory .'/.htaccess', 0664);
I think the reason is that on a Windows machine with an IIS "./htaccess" makes it look at the root folder.
it should be without the slash:
chmod($directory .'.htaccess', 0664);
(the directory is already given).
I think the change can aply to all OS
Info:
Microsoft-IIS/6.0
PHP 5.2.6
Drupal 6.6
Comments
Comment #1
zak45 commentedThis fixed my problem mentioned above:
Colin Wrote:
I've fixed the chmod() error - it turns out it was a permissions problem & the web server user (IUSR_Machinename) needed to be able to write to the windows\temp directory.
Source: http://www.opensourceopenminds.com/general-discussions/forum/question-er...
Comment #2
christiaan_ commentedHad the same error "warning: chmod() [function.chmod]: No such file or directory in C:\drupal\includes\file.inc on line 131" and other file system error relating to files not being able to be copied by modules. Also on a IIS Microsoft Windows server, the issue turned out to be with the Drupal File System Temporary directory, as in #1, not the .htaccess file.
The defualt, as read from the PHP settings on the server config was C:\WINNT\TEMP in my case. All settings seemed to be in order, but kept getting the file errors. Changed the directory to C:\TEMP in admin/settings/file-system on the drupal site and all was well - no more errors.
Comment #3
apostlen712 commentedthat worked for me.. I went to admin>file system and changed the temp direcotry to c:\temp then the errors went away.
Comment #4
mzark99 commentedBrilliant. Thank you!
Comment #5
rolodmonkey commentedThis appears to have a solution.