Help us understand the problem. What is going on with this article?

mixhost上でPHP Warning: Cannot modify header informationが発生した場合の対処

【背景】レンタルサーバーmixhost上のphp環境で"twitteroauth"を使用しtwitter認証を実施

【問題】PHP Warning: Cannot modify header information - headers already sent by(output started at /home/xxxxxx/public_html/xxxxx/twitter-login/login.php:8) が発生
※2箇所で発生し、いずれもheader()指定

【対応】下記サイトを参考に対応実施
「Warning: Cannot modify header information…」エラーの解決方法[PHP]

●mixhostの"MultiPHP INI Editor"の"編集モード"で"output_buffering = 4096"を設定

phpini.png

以上で解決

Stchan
超初心者のWebサイト作成者です
https://portfolio-878f6.web.app/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away