23

I'm getting this at the bottom of my page, where the debug bar should be. What is the problem?

This request: http://localhost:81/xxx/web/debug/default/toolbar?tag=5578f180963e82.28312577 is returning 404.

I need to see the error message & stack trace generated when I log to Yii::error(). It's not showing in runtime/log/app.log, so I need the debug bar.

Chloe
  • 25,162
  • 40
  • 190
  • 357
  • I restarted my Apache and it worked again, but not before I had trouble with Apache and had to delete semaphores with `ipcs` and `ipcrm`. – Chloe Jun 11 '15 at 03:56

7 Answers7

46

I removed files from frontend/runtime/debug and frontend/runtime/cache and nothing was changed.

But when I removed all folders from frontend/runtime then it started to work.

arogachev
  • 33,150
  • 7
  • 114
  • 117
Alexey Muravyov
  • 1,106
  • 13
  • 17
  • worked for me too. ran into this issue after updating Yii to the latest version 2.0.14 to 2.0.15.1. – Braeden Black Dec 16 '18 at 19:37
  • After removing everything from ` frontend/runtime` I got a much bigger error now; `Invalid Parameter – yii\base\InvalidParamException` `Session save path is not a valid directory:` `/var/www/myproj/frontend/config/../runtime/sessions` What can I do? – Phemelo Khetho Jan 26 '20 at 22:55
  • Looks like you store session under runtime/sessions folder. This is not default configuration, so you can try to create this folder manually. Check your settings Example: https://www.yiiframework.com/wiki/767/yii2-configuring-different-sessions-for-backend-and-frontend-in-yii-advanced-application-template – Alexey Muravyov Jan 27 '20 at 17:32
10

One reason could be missing write permissions for the runtime folder. The Debug Tool Bar creates there another directory debug which is used for *.data files.

This happens easily if the web server has its own user which differs to the user that has created the runtime folder.

robsch
  • 9,358
  • 9
  • 63
  • 104
  • I had changed the permissions to the runtime folder,and I restared Apache sever,but I found the permissions of this folder turn back only read – FavorMylikes May 07 '16 at 11:15
  • Are you sure? This sounds strange. Do you have any special configurations? – robsch May 07 '16 at 15:46
  • I had known the reason why I got this 404 error.Cause I added a captcha input in my form,and it will send a request like `url\captcha?tag=5578f180963e82.28312577`.My site works again when I comment that captcha.I try add captcha again,it still work well,then I don't know why yet.About the permissions,My folders can be written to a file,just show read-only. In the end,sorry for my english -_-b – FavorMylikes May 09 '16 at 01:38
5

I tried the info above without luck (and I suggest people here do the same, as in most circumstances it will solve your problem). But what worked for me was running. tail -f frontend/runtime/logs/app.log and it told me that there was an error with a table that it expected to exist but did not. Once I fixed that underlying issue my problem went away. In my specific case, I had the following enabled but no corresponding table/s.

'authManager' => [
    'class' => 'yii\rbac\DbManager',
],

Once I commented/removed it from my config, everything started working.

johnsnails
  • 1,971
  • 20
  • 29
0

i tried the removal of runtime folders but it didn't change a thing but a composer update fixed it for me

leila
  • 461
  • 1
  • 7
  • 21
0

Another reason for it not working is attaching HttpBearerAuth filter to the main application (not a specific controller). After removing the global filter, it suddenly works again. Not sure how to make it work with the filter. I will update this answer if I ever find a way.

mae
  • 14,947
  • 8
  • 32
  • 47
0

Give read/write/execute(777) permission to your project folder. This will work for you. It works for me.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 18 '21 at 17:42
0

Upgrade of yiisoft/yii2-debug library to latest(2.1.22) version resolved issue in my case.

srdjan
  • 33
  • 1
  • 5
  • Hi. `latest` is may not the best when the answer is read in a few years. May you can share the exact version number. – KargWare Nov 30 '22 at 06:31