Skip to content

log actual mkdir() failure reason #554

@oadam

Description

@oadam

Configuration:

PhpFastCache version: 6.0.7
PHP version: 7.0.22-0ubuntu0.16.04.1
Operating system: ubuntu

Issue description:

I'm using the files driver in production. Most of the time everything is working fine, but sometimes mkdir fails for an unknown reason (I'm almost sure it's not a permission issue), and phpFastCache logs an unhelpful PLEASE CHMOD /mytmpdir - 511 OR ANY WRITABLE PERMISSION!

Would it be possible to update the file driver so that it returns the actual root cause ? A code similar to this (from https://stackoverflow.com/a/929490/436792) could be used :

if (!@mkdir($dir)) {
    $error = error_get_last();
    // use $error['message'];
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions