PHP site keeps opening to blank page, no errors

前端 未结 4 784
天命终不由人
天命终不由人 2021-01-22 19:42

First, the premises: PHP loaded on IIS6 on Win2003 STD R2 SP2, PHP_5213 using FastCGI, MySQL_5145.

Customer sent me the site files, which I unzipped to C:\\InetPub

相关标签:
4条回答
  • 2021-01-22 20:19

    Edit your php.ini file and set the display_errors and display_startup_errors options to On so that you can have a chance to see what the problem is.

    0 讨论(0)
  • 2021-01-22 20:29

    When moving files from one server to another and getting the blank page, check whether the code is using short opening php tags like <? instead of the full <?php opening tag. If it is and the original server has the following line in the php.ini file...

    short_open_tag = On
    

    but the new server has...

    short_open_tag = Off
    

    then the blank screen may be the result.

    0 讨论(0)
  • 2021-01-22 20:34

    Possible problems:

    server configuration, which might be due to php is not being executed , how can you tell, look at the source of the file on the browser.

    If you have an error in the php file, it might not wr0k, you can add two lines of code to report errors.

    error_reporting(E_ALL | E_STRICT);  
    ini_set('display_startup_errors',1);  
    ini_set('display_errors',1);
    

    check your logs.

    If you are not familiar with php configuration with FastCGI or IIS you can use lamp bundles for windows.

    0 讨论(0)
  • 2021-01-22 20:37

    I've worked with a few servers I didn't have full access to and some didn't have errors enabled by default. I had to call echo error_get_last() at bottom of each page.

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