Home  >  Q&A  >  body text

The api written in thinkPHP returns normally, but the browser status is 500?


thinkPHP5 developed apis that were normal locally, but this problem occurred when they were placed on the server. The data returned was normal, but the status was wrong.

It seems to be a file permissions issue. . .

世界只因有你世界只因有你2669 days ago694

reply all(8)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-06-29 10:10:22

    Close thinkphp log

    reply
    0
  • PHP中文网

    PHP中文网2017-06-29 10:10:22


    Permissions issue, I have said it myself...

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-06-29 10:10:22

    sudo chmod 777 runtime/ Just set the permissions of this folder.

    reply
    0
  • 三叔

    三叔2017-06-29 10:10:22

    Check the user group of fpm, and then change the project directory to the same one as fpm

    reply
    0
  • 代言

    代言2017-06-29 10:10:22

    500 means there is a problem with your server configuration. . . Check to see if there are any differences in the configuration between your local environment and your server environment!

    reply
    0
  • 高洛峰

    高洛峰2017-06-29 10:10:22

    The server configuration is different, please pay attention to the capitalization

    reply
    0
  • 学习ing

    学习ing2017-06-29 10:10:22

    You can look at the log files of nginx or apache, any error messages will be displayed there.

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-29 10:10:22

    Is there a problem with the case of the file name? Linux system is case-sensitive, but window is not case-sensitive

    reply
    0
  • Cancelreply