Score:-1

How do I debug Drupal\Component\PhpStorage\FileStorage::createDirectory()?

in flag

On my site, I am getting this warning.

Alert: User warning: mkdir(): Permission Denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() (line 123 of core/lib/Drupal/Component/PhpStorage/FileStorage.php).

I want to debug or get the exact path and directory where Drupal is trying to create the directory.

I tried changing the file permissions for sites/default/files with chmod -R 777 path, without success.

How can I debug it?

Kamal Oberoi avatar
in flag
I’m voting to close this question because debugging is not possible.
Score:1
id flag

The standard debugger for PHP is Xdebug. Install it and set a breakpoint at that line. If for some reason you cannot use Xdebug, \Drupal::logger('my_module')->notice($message) or error_log() the filename to be written and examine the logs.

Kamal Oberoi avatar
in flag
My Problem is at server. I can't debug at server.
Kamal Oberoi avatar
in flag
Error showing in core files i can't update core file.
cn flag
@KamalOberoi If you can’t use a debugger and you can’t edit the files, how do you expect to debug the site?
Kamal Oberoi avatar
in flag
@Clive I want to use debugger but error is showing at core files. I don't want to put drupal logger in core files. If i know error is coming from my custom module or any contrib module then i can put try / catch and logger.
id flag
I vote to close this question as unanswerable. I provided a correct answer detailing how to debug in Drupal but the constraint is that no debugging is possible.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.