質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

SQL

SQL(Structured Query Language)は、リレーショナルデータベース管理システム (RDBMS)のデータベース言語です。大きく分けて、データ定義言語(DDL)、データ操作言語(DML)、データ制御言語(DCL)の3つで構成されており、プログラム上でSQL文を生成して、RDBMSに命令を出し、RDBに必要なデータを格納できます。また、格納したデータを引き出すことも可能です。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

teratail

teratail(テラテイル)は、プログラミングに特化した日本語Q&Aサイトです。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

Q&A

解決済

2回答

5118閲覧

どこが間違っていますか?認証機能[PEAR::Auth]

b1ackc0ffee

総合スコア267

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

SQL

SQL(Structured Query Language)は、リレーショナルデータベース管理システム (RDBMS)のデータベース言語です。大きく分けて、データ定義言語(DDL)、データ操作言語(DML)、データ制御言語(DCL)の3つで構成されており、プログラム上でSQL文を生成して、RDBMSに命令を出し、RDBに必要なデータを格納できます。また、格納したデータを引き出すことも可能です。

PHP

PHPは、Webサイト構築に特化して開発されたプログラミング言語です。大きな特徴のひとつは、HTMLに直接プログラムを埋め込むことができるという点です。PHPを用いることで、HTMLを動的コンテンツとして出力できます。HTMLがそのままブラウザに表示されるのに対し、PHPプログラムはサーバ側で実行された結果がブラウザに表示されるため、PHPスクリプトは「サーバサイドスクリプト」と呼ばれています。

teratail

teratail(テラテイル)は、プログラミングに特化した日本語Q&Aサイトです。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

0グッド

0クリップ

投稿2015/07/07 05:41

編集2015/07/07 06:09

参考書を元にしたスケジュールアプリに認証機能を追加するところです。
ど素人ですので、お手数おかけしますがサルにもわかるように説明いただけるとありがたいです。

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\Auth.php on line 469

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\MDB2.php on line 390

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\MDB2.php on line 1885

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\MDB2.php on line 2572

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\MDB2.php on line 2595

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\pear\MDB2.php on line 2940

Deprecated: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Auth\Container\MDB2.php on line 93

Deprecated: Non-static method MDB2::connect() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Auth\Container\MDB2.php on line 114

Deprecated: Non-static method MDB2::factory() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 433

Deprecated: Non-static method MDB2::parseDSN() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 376

Deprecated: Non-static method MDB2::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 378

Deprecated: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 574

Deprecated: Non-static method MDB2::errorMessage() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 972

Deprecated: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 743

Deprecated: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\MDB2.php on line 434

Deprecated: Non-static method MDB2::isError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Auth\Container\MDB2.php on line 129

Deprecated: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Auth\Container\MDB2.php on line 130

Deprecated: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in C:\xampp\php\pear\Auth\Container\MDB2.php on line 300

のようなエラーメッセージが表示されますが、該当のファイルがどこにあるかわからない(エラーの内容がわからない)です。
そんな行数もあってどこのファイルの何が間違っているのでしょうか。

自分で書いたコードは下記です↓
MyAuth.php

lang

1<?php 2require_once 'Auth/Auth.php'; 3 4/* ここから--ログインページを生成するユーザー定義関数-- */ 5function myLogin(){ 6 require_once 'login.php'; 7} 8/* ここまで--ログインページを生成するユーザー定義関数-- */ 9/* ここから--認証を実行-- */ 10$params=array( 11 'dns' => 'mysqli://phpuser:psppass@localhost/php10', 12 'table' => 'schedule_user', 13 'usernamecol' => 'uid', 14 'passwordcol' =>'passwd'); 15 16$auth = new Auth('MDB2', $params, 'myLogin'); 17$auth->start(); 18/* ここまで--認証を実行-- */ 19if (!$auth->checkAuth()) { die(); } 20// ↑未認証の場合は処理を終了 21

login.php

lang

1<?php require_once '../Encode.php'; ?> 2<!DOCTYPE html> 3<html> 4<head> 5<meta charset="UTF-8" /> 6<title>PHP入門教室</title> 7</head> 8<body> 9<h3>ログインページ</h3> 10<hr /> 11<form method="POST" action="<?php print(e($_SERVER["PHP_SELF"]));?>"> 12 <div class="container"> 13 <label for="username">ユーザー名:</label><br /> 14 <input type="text" id="username" name="username" size="20" maxlength="30" /> 15 <div class="container"> 16 <label for="password">パスワード:</label><br /> 17 <input type="password" id="password" name="password" size="20" maxlength="30" /> 18 <div> 19 <input type="submit" name="submit" value="ログイン" /> 20<form> 21</body> 22</html> 23

.htacess

lang

1<IfModule mod_php5.c> 2php_value auto_prepend_file "MyAuth.php" 3</IfModule> 4

以上宜しくお願い致します。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

そのメッセージはエラーというより非推奨な機能を使っていることへの警告です。
以下のサイトの情報が参考になると思います。
Deprecated:警告を非表示にする。(PHP5.3.x)

投稿2015/07/07 05:50

sho_cs

総合スコア3541

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

b1ackc0ffee

2015/07/07 07:15

有難うございます^^ php.iniに error_reporting = E_ALL & ~E_ & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED と記載すると消えました!
guest

0

Pho 5.3.x で推奨されてない機能だと思います。

newの代入部分です。

エラーレベルを変えるかですね

投稿2015/07/07 05:46

編集2015/07/07 05:49
lol

総合スコア85

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

b1ackc0ffee

2015/07/07 07:16

有難うございます^^ 場所まで指摘いただき助かりました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問