phalcon/cphalcon · error · Phalcon\Logger\Adapter\Exceptions\FileOpenFailed
The file '{name}' cannot be opened with mode '{mode}'
Error message
The file '{name}' cannot be opened with mode '{mode}' What it means
Error "The file '{name}' cannot be opened with mode '{mode}'" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Logger/Adapter/Stream.zep:117
public function getName() -> string
{
return this->name;
}
/**
* Processes the message i.e. writes it to the file
*/
public function process(<Item> item) -> void
{
var fileHandler, message;
if (!is_resource(this->handler)) {
let fileHandler = this->phpFopen(this->name, this->mode);
if (!is_resource(fileHandler)) {
let this->handler = null;
throw new FileOpenFailed(this->name, this->mode);
}
let this->handler = fileHandler;
}
let message = this->getFormattedItem(item) . PHP_EOL;
this->phpFwrite(this->handler, message);
}
}
View on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Logger/Adapter/Stream.zep:117 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/56abc42883751b97.
Report an issue: GitHub.