PHP

PHP_CodeSnifferインストール

インストール $ pear install PHP_CodeSniffer downloading PHP_CodeSniffer-1.2.2.tgz ... Starting to download PHP_CodeSniffer-1.2.2.tgz (311,533 bytes) .................................................................done: 311,533 bytes insta…

Deprecated:警告を非表示にする。(PHP5.3.x)

自宅環境でPEAR::HTML_QuickFormを使ったら以下のように大量に警告が出た。 以下、エラー一部抜粋(検索用) ・・・・・ PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/share/pear/PEAR/HTML/QuickForm/date.php on …

Xdebug(2.0.5)をインストールする

環境・CentOS:5.4 ・PHP:5.3.1 ・(php-develインストール済) LatestバージョンをGET〜解凍〜phpize $ wget http://xdebug.org/files/xdebug-2.0.5.tgz $ tar zxvf xdebug-2.0.5.tgz $ cd xdebug-2.0.5 $ phpizeここでエラー発生。 Configuring for: PHP Api …

include_pathを複数指定にする。(/etc/php.ini)

なぜか、require_onceでエラーがでていたので、get_include_path()で確認したら、設定したと思っていたinclude_pathの記述の仕方が間違っていたので、修正したときのメモ。 PEARとSmartyのあるディレクトリのパスを指定したい。以下のパス ・/usr/share/pear…

Warning: date()が出るのでdate.timezoneの設定。

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or theult_timezone_set() function. In case you used any of those methods and you are still getting this warning,…

ゼミサーバにもPEAR:Pagerをインストールする

PEAR:Pagerを使いたかったので導入することに。 まず以下のサイトでダウンロードして最新の安定バージョンPager-2.4.8.tgzを入手。 http://pear.php.net/package/Pager/download/ その後、解凍して、pearのディレクトリに移すだけの処理。 $ tar xvfz Pager-…

ゼミサーバにもSmartyを導入しておく

pearに続いてSmartyも導入しておくことに。 まず、公式サイトからLatest Stable ReleaseのバージョンのSmarty-2.6.26.tar.gzを入手。 http://www.smarty.net/download.php で解凍して、/usr/local/include/php/Smartyに場所を移動。 $ tar xvfz Smarty-2.6.2…

ゼミのサーバにもPEARを導入した。その時のメモ

pearをいれるために、php-develを入れる必要があるらしいので。 php-devel-5.3.0-2.el5.remi.2.i386.rpmをダウロードして。 $ rpm -Uvh php-devel-5.3.0-2.el5.remi.2.i386.rpm実行したら、依存性のエラーが出た・・・。autoconfとautomakeが必要らしいので…