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

zak45’s picture

This 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...

christiaan_’s picture

Version: 6.6 » 6.15

Had 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.

apostlen712’s picture

that worked for me.. I went to admin>file system and changed the temp direcotry to c:\temp then the errors went away.

mzark99’s picture

Brilliant. Thank you!

rolodmonkey’s picture

Status: Active » Fixed

This appears to have a solution.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.