A warning is not reported for the output before the header in php.

Source: Internet
Author: User
No output is available before header or session_start (). Otherwise, a warning error is reported, but why not. Version: wamp {code...} used in 5.3.5 ...} directly skip and change to session_start () without reporting the error level php. ini sets error_rep... no output is available before header or session_start (). Otherwise, a warning error is reported, but why not.
Version: 5.3.5
Wamp used

    
 

Skip directly and change it to session_start ().
Error level php. ini is set to error_reporting = E_ALL | E_STRICT

Reply content:

No output is available before header or session_start (). Otherwise, a warning error is reported, but why not.
Version: 5.3.5
Wamp used

    
  

Skip directly and change it to session_start ().
Error level php. ini is set to error_reporting = E_ALL | E_STRICT

Check whether output_buffering is enabled in phpinfo. If yes, there is no problem.

Check whether there is any warning prompt:

  • Check whether there is any print on the webpage. you have read it. No
  • Check whether there is any error log. The default xampp/wamp settings are more secure (rather than easy-to-use development by default) and do not directly display the error information on the webpage.

If you have read all the logs, you still cannot find the warning record. Check why the logs are not displayed and not logged. (assume that a warning is generated ):
Print phpinfo () and check which php. ini file is loaded in your runtime environment. After locating the php. ini file

  • Check the error_reporting settings (you have checked, but are not sure if other INI files are used)
  • Check display_error settings
  • Check error_log settings

If the above check is correct (the INI file is configured with warning, but you did not find it in the log file), it means that the current environment configuration will not generate warning, then let's go to the output buffer settings as described by felix021 upstairs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.