Error 500: Premature end of script headers

前端 未结 15 1375
臣服心动
臣服心动 2020-12-01 14:31

I get a \"Premature end of script headers: contactform.cgi\" error message when running the below script. What frustrates me is that I ran this as a .php on another server

相关标签:
15条回答
  • 2020-12-01 14:56

    In my case (referencing a PHP file in the top folder of a Wordpress plugin) I had to change the permissions on that folder. My test environment was fine, but when deployed the folder had 775. I changed it to 755 and it works fine.

    0 讨论(0)
  • 2020-12-01 14:58

    to fix this, I had to change permissions for whole directory to 755 (777 did not work for me), and changed file owners for whole directory

    chmod -R 755 public_html
    chown -R nobody:nobody public_html
    

    nobody is user that runs php in my computer.

    0 讨论(0)
  • 2020-12-01 14:58

    I have this issue and resolve this by changing PHP version from 5.3.3 to 5.6.30.

    0 讨论(0)
提交回复
热议问题