Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught yii\web\HeadersAlreadySentException: Headers already sent in #17548

Closed
mhejini opened this issue Sep 7, 2019 · 5 comments
Labels

Comments

@mhejini
Copy link

mhejini commented Sep 7, 2019

Hi ,
i have this error in my project

Fatal error: Uncaught yii\web\HeadersAlreadySentException: Headers already sent in /home/es/domains/es/public_html/vendor/yiisoft/yii2/web/Response.php on line 428. in /home/es/domains/es/public_html/vendor/yiisoft/yii2/web/Response.php:366 Stack trace: #0 /home/es/domains/es/public_html/vendor/yiisoft/yii2/web/Response.php(339): yii\web\Response->sendHeaders() #1 /home/es/domains/es/public_html/vendor/yiisoft/yii2/web/ErrorHandler.php(135): yii\web\Response->send() #2 /home/es/domains/es/public_html/vendor/yiisoft/yii2/base/ErrorHandler.php(262): yii\web\ErrorHandler->renderException(Object(yii\base\ErrorException)) #3 [internal function]: yii\base\ErrorHandler->handleFatalError() #4 {main} thrown in /home/es/domains/es/public_html/vendor/yiisoft/yii2/web/Response.php on line 366

first time Yii2 version was 2.0.25, i updated that to 2.0.26 but this problem stayed that,
again i changed that to 2.0.23 but not solved, php version is 7.3.7
this project dont have any problem in local server but have just problem in host server
and some times dont have error but more times have error
below error is exist in host server too
(https://user-images.githubusercontent.com/18082695/64474404-cf4a7980-d189-11e9-9732-94457eec7c92.jpeg)

please help me ,
thank you

@samdark
Copy link
Member

samdark commented Sep 7, 2019

Such behavior is there since 2.0.14. Prior to that version in case there was output started, headers were silently not sent resulting in hard to debug issues.

In your case fix your php.ini first then check if error is still there.

@yii-bot
Copy link

yii-bot commented Sep 7, 2019

Thank you for your question.
In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.

This is an automated comment, triggered by adding the label question.

@mhejini
Copy link
Author

mhejini commented Sep 7, 2019

Such behavior is there since 2.0.14. Prior to that version in case there was output started, headers were silently not sent resulting in hard to debug issues.

In your case fix your php.ini first then check if error is still there.

thanks for your reply
yes i told to the supporter that solving this problem , they told me that mysql.so dont supporting with php 7.3!!
how can i solve this problem mysql.so in php 7.3.7?

@samdark
Copy link
Member

samdark commented Sep 7, 2019

You don't need mysql.so at all. Yii does not use it so remove it from php.ini.

@mhejini
Copy link
Author

mhejini commented Sep 7, 2019

You don't need mysql.so at all. Yii does not use it so remove it from php.ini.

thank you so much
Solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants