phpPgAdminでワーニングについて

このQ&Aのポイント
  • phpPgAdminをインストールしてログインできるかを確認しようと思ったら、いくつかのワーニングが表示されました。
  • ワーニングの内容は、PHPの将来のバージョンで同じ名前のメソッドを持つクラスはコンストラクタとして使用できなくなるため、Miscクラスに使用されている古いコンストラクタは非推奨となった、セッションのクッキーが既に送信されているためセッションが開始できない、ヘッダ情報がすでに送信されているためヘッダの変更ができないというものです。
  • さまざまな対策を試してみましたが問題は解決しませんでした。どなたか解決策をご存知の方がいれば教えていただきたいです。
回答を見る
  • ベストアンサー

phpPgAdminでワーニングについて

phpPgAdminをインストールしてログインできるかを確認しようと思ったら以下のワーニングが出力されてしまい困っています。 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Misc has a deprecated constructor in /usr/share/phppgadmin/classes/Misc.php on line 8 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /usr/share/phppgadmin/classes/Misc.php:8) in /usr/share/phppgadmin/libraries/lib.inc.php on line 56 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /usr/share/phppgadmin/classes/Misc.php:8) in /usr/share/phppgadmin/libraries/lib.inc.php on line 56 Warning: Cannot modify header information - headers already sent by (output started at /usr/share/phppgadmin/classes/Misc.php:8) in /usr/share/phppgadmin/classes/Misc.php on line 526 ネットで調べても解消する事ができませんでしたので投稿させていただきました。 環境は以下の通りです。 Ubuntu 17.04 PHP Version 7.0.18-0ubuntu0.17.04.1 ご存知の方がいましたらご教授お願いできませんでしょうか。 どうぞ、宜しくお願いします。

  • PHP
  • 回答数1
  • ありがとう数1

質問者が選んだベストアンサー

  • ベストアンサー
  • shimix
  • ベストアンサー率54% (865/1590)
回答No.1

エラーは最初のDeprecatedだけですね。あとは想定外のタイミングでHTTPレスポンスヘッダを送出した(エラーメッセージを返した)ためのものです。 Deprecatedに関してはググれば対処法も含めてたくさんHitすると思います。 https://www.google.co.jp/search?q=php+Deprecated

edo_1972
質問者

お礼

お礼が遅くなってすみません。 解決しました。では失礼します。

関連するQ&A

  • PHPエラー

    こんにちは。 初めてPHPでプログラミングをしている者です。 PHPのエラー解決方法で悩んでいます。 エラーの内容は Warning: session_start(): Cannot send session cookie - headers already sent by (output started at ~~) in ~~ Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ~~)in ~~~ です。 お時間のある方回答お待ちしています。

    • ベストアンサー
    • PHP
  • session_start()でwarningが表示されてしまいます。

    phpファイルの冒頭で<?php session_start() ?>と 記述しているのですが、 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ファイル名) in ファイル名 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ファイル名) in ファイル名 とwarningが出てしまいます。 warning中のheaders already sent byにヒントがあるとは感じるのですが、その意味が理解できません。 どなたかお詳しい方宜しくご教示くださいませ。

    • ベストアンサー
    • PHP
  • session_start()を使うと警告メッセージが出ます。

    PHP4.2.2、apche1.3.27、VineLinux2.6を使っています。 PHPで、session_start()を使うと以下のような警告メッセージが出てしまいます。何かphp.ini内に、セッティングしないといけないことが あるのでしょうか? [ブラウザに表示されたメッセージ] Warning: Cannot send session cookie - headers already sent by (output started at /usr/local/apache/htdocs/a/a02.php:10) in /usr/local/apache/htdocs/a/a02.php on line 12 Warning: Cannot send session cache limiter - headers already sent (output started at /usr/local/apache/htdocs/a/a02.php:10) in /usr/local/apache/htdocs/a/a02.php on line 12 10 + 200 = 210 [実行したスクリプト] <html> <head> <title>aaa</title> </head> <body bgcolor="red"> <?php session_cache_limiter('private'); session_start(); $a = 10; $b = 200; $c = $a + $b; print("$a + $b = $c"); ?> </body> </html>

    • ベストアンサー
    • PHP
  • セッション管理に関する質問

    レンタルサーバで、セッションを使ったアクセスカウンターを書いているのですが(管理人のアクセスで、カウンタが回らない様に) ↓のような警告が出ました 「Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/httpd/maagairu/public_html/index.php:7) in /home/httpd/maagairu/public_html/index.php on line 7」 「Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/httpd/maagairu/public_html/index.php:7) in /home/httpd/maagairu/public_html/index.php on line 7」 これは、「キャッシュが送れない」「クッキーを送れない」、という意味だと思うのですが、これは私のブラウザの設定の問題でしょうか。 この警告の解決方法を教えてください

    • ベストアンサー
    • PHP
  • セッションとヘッダーの順序について

    session_name("WebID"); session_start(); を header("Content-Type: text/html; charset=UTF-8"); のあとに呼び出すとエラーになります。 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\php\index.php:56) in C:\xampp\htdocs\php\verify.php on line 3 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\php\index.php:56) in C:\xampp\htdocs\php\verify.php on line 3 やはりセッションを先に呼び出さないといけないのでしょうか? session_unsetというものを使えばこの順序でもうまくいきますか? index.phpからエラーが起きたファイルを表示させているので、 順序は変えにくいのですが、順序を変えなくてもクリアできる 方法があったら教えてください。

    • ベストアンサー
    • PHP
  • 会員管理システムを作っているのですが、エラーが出て困っています。

    phpとsmartyで会員管理システムを構築しているのですが、以下のようなエラーが出て困っています。 エラー文 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\Login.class.php:1) in C:\xampp\htdocs\login.php on line 5 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\Login.class.php:1) in C:\xampp\htdocs\login.php on line 5 Warning: Smarty error: unable to read resource: "login.tpl" in C:\xampp\htdocs\Smarty.class.php on line 1092 このエラー文は何と言っているのですか? また、解決方法が分かる方、ご回答お願いします。

    • 締切済み
    • PHP
  • クッキーの利用

    xfreeのphpサーバーを利用祖いているのですが、クッキーの利用ができません。 (Warning: Cannot modify header information - headers already sent by (output started at hoge/cookie.php bom付ではないか確認をしました。) (sessionも変数を破棄するページでWarning: Cannot modify header information - headers already sent by (output started at hoge/session.php のようなエラーが出ます。破棄のページのみなのでbom付ではないかと思われます。) 下記の画像php.iniはどのように設定すればいいですか?

  • セッションの破棄

    セッションについて質問です。 $_SESSION['username']を複数ページで使用した後、破棄しようと思うのですが、エラーが出てしまいます。 セッション自体は破棄できていると思うのですが、これはどういったエラーなのでしょうか? ソースコード <?php session_start(); ?> <!DOCTYPE html> <head> <meta charset="utf-8" /> <title>セッション破棄</title> </head> <body> <?php //セッション変数を全て解除 $_SESSION = array(); //セッションクッキーの削除 if (isset($_COOKIE["PHPSESSID"])) { setcookie("PHPSESSID", '', time() - 1800, '/'); } //セッションを破棄する session_destroy(); if(empty($_SESSION['username'])){ echo "<p>セッション終了</p>"; echo "<a href='session.php'>はじめのページへ</a>"; echo "<a href='index.php'>top</a>"; } ?> </body> </html> エラーメッセージ Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/etdfftytg/etdfftytg.php.xdomain.jp/public_html/session3.php:1) in /home/etdfftytg/etdfftytg.php.xdomain.jp/public_html/session3.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at /home/etdfftytg/etdfftytg.php.xdomain.jp/public_html/session3.php:1) in /home/etdfftytg/etdfftytg.php.xdomain.jp/public_html/session3.php on line 16 Warning: session_destroy(): Trying to destroy uninitialized session in /home/etdfftytg/etdfftytg.php.xdomain.jp/public_html/session3.php on line 20

    • ベストアンサー
    • PHP
  • このエラーメッセージどういう事?

    PHP4.3.2でWEBアプリケーション作成中ですが下記のようなエラーが出ますどういう意味で、また、対処法などわかれば教えてください。 1・Fatal error: Call to undefined function: mb_convert_kana() in  2・Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at エラーは一緒に出るわけではなく、それぞれ別ファイルです。 よろしくお願いします。

    • ベストアンサー
    • PHP
  • バグの件

    オープンピーネのログインページより、ログイン失敗時に、下記のような表示がヘッダー上に出ます。修正するにはどうしたらよいでしょうか? Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/porto1.net/httpdocs/webapp/modules/pc/page/o_tologin.php:1) in /var/www/vhosts/porto1.net/httpdocs/webapp/modules/pc/page/o_tologin.php on line 26 Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/porto1.net/httpdocs/webapp/modules/pc/page/o_tologin.php:1) in /var/www/vhosts/porto1.net/httpdocs/webapp/lib/OpenPNE/Smarty.php on line 86

専門家に質問してみよう