PHP 4.1.2 fails to create directories with an error indicating that mkdir was not provided the correct number of parameters. According to http://php.net/mkdir, the mode parameter is optional, but my server complains about it being missing. When I supplied this parameter, mkdir worked without a problem.

CommentFileSizeAuthor
fscache_mkdir_patch.diff520 bytesjavanaut
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

javanaut’s picture

Reading the manual, I later noticed this:

"Note: Mode is ignored on Windows, and became optional in PHP 4.2.0."

That would make this a problem only for pre-PHP 4.2.0 users.

styro’s picture

Yep I had also noticed that problem on Debian Woody.

Would 0777 be too insecure though? I've used 0700 without any problems.

javanaut’s picture

0777 is the default mode if one is not specified. That is ANDed against your umask (typically 022), so whatever that is will be the final permission mode.

gordon’s picture

Assigned: Unassigned » gordon

changed mod to 0750 which is more secure.

Anonymous’s picture