nginx showing blank PHP pages

前端 未结 17 2207
走了就别回头了
走了就别回头了 2020-12-04 05:56

I have setup an nginx server with php5-fpm. When I try to load the site I get a blank page with no errors. Html pages are served fine but not php. I tried turning on disp

17条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 06:04

    In case anyone is having this issue but none of the above answers solve their problems, I was having this same issue and had the hardest time tracking it down since my config files were correct, my ngnix and php-fpm jobs were running fine, and there were no errors coming through any error logs.

    Dumb mistake but I never checked the Short Open Tag variable in my php.ini file which was set to short_open_tag = Off. Since my php files were using instead of , the pages were showing up blank. Short Open Tag should have been set to On in my case.

    Hope this helps someone.

提交回复
热议问题