2009年12月13日日曜日

xdebugインストール

xdebugはpeclでインストールする。

peclは別個で入れるかどうかするのですが、SuSEユーザの私は「php-devel」をインストールしたときに自動的に入ります。

それで早速コマンド
# pecl install xdebug
downloading xdebug-2.0.5.tar ...
Starting to download xdebug-2.0.5.tar (Unknown size)
...............................................................................................................................................................................................................................................................done: 1,340,928 bytes
67 source files, building
WARNING: php_bin /usr/bin/php5 appears to have a suffix 5, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3555: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5493: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2972: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2952: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2915: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3510: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7620: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5606: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4641: _LT_AC_TAGCONFIG is expanded from...
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3555: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5493: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2972: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2952: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2915: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3510: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7620: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5606: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4641: _LT_AC_TAGCONFIG is expanded from...
building in /var/tmp/pear-build-root/xdebug-2.0.5
running: /tmp/pear/temp/xdebug/configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... no
checking for gcc... no
configure: error: in `/var/tmp/pear-build-root/xdebug-2.0.5':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
ERROR: `/tmp/pear/temp/xdebug/configure' failed

cc、gccがないからコンパイルできないぞ・・・と


yastでcc、gccをインストールして再実行。
# pecl install xdebug
downloading xdebug-2.0.5.tar ...
Starting to download xdebug-2.0.5.tar (Unknown size)
...............done: 1,340,928 bytes
67 source files, building
WARNING: php_bin /usr/bin/php5 appears to have a suffix 5, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3555: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5493: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2972: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2952: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2915: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3510: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7620: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5606: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4641: _LT_AC_TAGCONFIG is expanded from...
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
aclocal.m4:3555: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5493: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5492: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:2972: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2952: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2915: AC_PROG_LIBTOOL is expanded from...
configure.in:150: the top level
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:3510: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:7620: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
configure.in:150: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
aclocal.m4:5606: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5605: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4641: _LT_AC_TAGCONFIG is expanded from...
building in /var/tmp/pear-build-root/xdebug-2.0.5
running: /tmp/pear/temp/xdebug/configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib64/php5/extensions
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking whether to enable eXtended debugging support... yes, shared
checking for gettimeofday... yes
checking for cos in -lm... yes
checking for ld used by cc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc static flag works... yes
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
sh: make: command not found
ERROR: `make' failed


あれ、makeもはいってなかった・・・


makeもインストールして、再実行!
Build process completed successfully
Installing '/usr/lib64/php5/extensions/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.0.5
configuration option "php_ini" is not set to php.ini location
You should add "extension=xdebug.so" to php.ini


最後だけ抜粋ですがokのようです。
# service apache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done



phpinfoで確認してok

pear.php.net is using a unsupported protocal - This should never happen.

最近Macサーバに移行してから、プログラム類や開発関係のデータもちょっとずつ
移行させているのですが、「あ、xdebug入れてない」と思って、導入開始しました。

たしか、peclかなんかのコマンドで行けるんじゃなかったっけ?
と思って、pearコマンドでインストール開始。

でも、xdebugとは別に以下のエラーが出てしまいました。

pear.php.net is using a unsupported protocal - This should never happen.

これはインストール以前の問題ですね。

プロトコルアンサポート・・・

とりあえずチャンネルを更新しようとおもって、以下のコマンド実行
# pear update-channels
Updating channel "doc.php.net"
Channel "doc.php.net" is up to date
Updating channel "pear.php.net"
Channel "pear.php.net" is up to date
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date


あれ、こんなんだっけ?

再度、xdebugインストール実行
# pear install xdebug
pear.php.net is using a unsupported protocal - This should never happen.
install failed



だめだ・・・



それでエラーコードを検索していたら、pearのblogで原因判明!
http://blog.pear.php.net/2009/08/28/fixing-unsupported-protocol/
5.2.10と5.2.11が対象って書いてあるけど、5.3.0も対象ね。


以下、pearのblogより抜粋で実行
# cd `pear config-get php_dir`
# mv .channels .channels-broken
# pear update-channels

どうにもチャンネルデータが壊れているので、消して(もしくは移動して)再取得すればいいみたい。

3行目の「pear update-channels」でチャンネルデータ再取得でok

うちは、タイムゾーンの設定不備で以下のエラーも出ちゃったけど、チャンネル更新はok
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in PEAR/Registry.php on line 930
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in /usr/share/php5/PEAR/PEAR/Registry.php on line 930

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in PEAR/Registry.php on line 930
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in /usr/share/php5/PEAR/PEAR/Registry.php on line 930

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in PEAR/Registry.php on line 930
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Tokyo' for 'JST/9.0/no DST' instead in /usr/share/php5/PEAR/PEAR/Registry.php on line 930
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded
Updating channel "pecl.php.net"
Update of Channel "pecl.php.net" succeeded

succeededってでてるのでok


今度こそxdebugインストール!
# pear install xdebug
No releases available for package "pear.php.net/xdebug" - package pecl/xdebug can be installed with "pecl install xdebug"
install failed

peclでやれと・・・

2009年12月11日金曜日

svn: Can't open fileエラー

svnサーバにコミットしたところ以下のようなエラーが返ってきてしまった。

svn: Can't open file '/var/svn/hogehoge/db/txn-current-lock': Permission denied
svn: MKACTIVITY of '/repos/hogehoge/!svn/act/069d9079-2501-0010-a783-df4e102faed0': 500 Internal Server Error (http://hogehoge.com)


というようなエラーが出てしまった・・・

Permission deniedということから、パーミッション設定がよくないらしい・・・


確認してみると、オーナーがrootになってました。

apache2のmod_davでsvnを利用している以上、apache2が操作できる権限にしておかなきゃね。

2009年12月7日月曜日

scpでファイル転送

svnのサーバを移動しないといけないので、scpコマンドの覚書です。

# scp [転送元アドレス] [転送先アドレス]

# 今回はファイルをリモートホストに転送します。
# scp svn_dump_test root@192.168.1.x:/var/svn/
The authenticity of host '192.168.1.xx (192.168.1.xx)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes # 初めての接続なので・・・
Warning: Permanently added '192.168.1.xx' (RSA) to the list of known hosts.
Password: *********

subversion設定の覚書

いつも忘れちゃうので、覚書です。

# ディレクトリ作成
# mkdir /var/svn
# mkdir /var/svn/test


# ファイルシステムで作成
# svnadmin --fs-type fsfs create /var/svn/test


今回はサーバ移動なので、以下の作業もします

# サーバAでダンプ
# svnadmin dump /var/svn/test > svn_dump_test


# サーバBでリストア
# mkdir /var/svn
# mkdir /var/svn/test
# svnadmin --fs-type fsfs create /var/svn/test
# svnadmin load /var/svn/test < svn_dump_test

2009年12月6日日曜日

MACでDDNS設定をする

年末の里帰りに向けて、MACにDDNSの設定をしようと思う。

今まではIODATAのiobb.netサービスを利用してDDNSを実現していたのですが、
先日のブログ記事の通り、「MAC mini on X Server」と「AirMac Base Station」を購入したので、できればそっちを利用したい。

設定ができなければ、IODATAのサービスを利用するという逃げ道もありです。


まずDDNSサービスですが、これはVALU-DOMAINが使えるみたいです。

この形式でリクエストすればいいみたいです。
http://dyn.value-domain.com/cgi-bin/dyn.fcg?d=ドメイン名&p=パスワード&h=ホスト名&i=IPアドレス

あと、IPアドレスの指定は設定しなければ、自動認識のようなので簡単です。


さっそくwgetでリクエストしたのですが、エラーが出てしまいます。
どうやら、macはwgetが無い模様・・・だけど、curlというのが有るみたいなので、これで試してみます。

# curl http://dyn.value-domain.com/cgi-bin/dyn.fcg?d=ドメイン名&p=パスワード&h=ホスト名
# status=2


statusの2は不正な「ドメイン名とパスワード」のときのメッセージです。
おかしいと思って、ブラウザのURL欄で試してみるも、こちらはOK!
「status=0」が返ってきます。


ちょっとした気まぐれで、URLをシングルクォーテーションで囲んでみたら、これが大当たり!
# curl 'http://dyn.value-domain.com/cgi-bin/dyn.fcg?d=ドメイン名&p=パスワード&h=ホスト名'
status=0


これで、ドメイン更新はOKだね!

2009年11月29日日曜日

MAC snow leopard



mac serverをセットアップしたんだけど、管理ツールをmacbookに入れるにはsnow leopardにアップデートしてくださいってんで、買っちゃいましたー

2009年11月28日土曜日

散髪すっきり

髪の毛が大分増えてきたから、切ってきたよー

いつも行ってる北千住までー


今日はいつものお姉さんじゃなくて青年でした。

それにはちょっとガッカリだったけど、あそこの店は失敗がないってくらい髪の毛がスッキリしましたよ

2009年11月22日日曜日

MAC miniのX Server付き届いたよー


届きましたーいろいろ!

後はセットアップだねー

2009年11月21日土曜日

MAC miniのX Server付き買ったよー

アップルストアで MAC mini の X server 付きと、AirMacExtreme を買ったよー。

配送状況を見ると、今日中には家に着く感じ!
てか、もう届いちゃって、不在票が有るんじゃないかってくらい!

一回家に帰って、不在票の処理だけでもしたいね。


今回、アップルのサイトでいつ届くのかと、状況を見守っていたのですが、
僕の購入履歴がおかしい。



AirPortExtremeってなんだ?AirMacExtremeじゃないの?
なんだそれ?

買い間違った?




しらべてみたら、本来AirPortっていう製品を日本では「AirMacExtreme」として売っているんだって、、、


紛らわしっ!

2009年11月3日火曜日

電気ケトル買ったよ

これでコーヒーも飲めるし、インスタントダイエット食品も食べれるね

2009年10月10日土曜日

競馬

今日は初競馬をしてきました。

知り合いの会社で売り出してる競馬予測ソフトが
新宿のウインズで宣伝活動されているとのことなので、応援に行ってきたのです。

てか、競馬場ってあんなに込んでいるのですね。びっくりです。

競馬予測ソフトの宣伝とのことなので、「ちょっと教えて」ってなことで、
予測内容を教えていただきました。

予測は「京都11R」の枠連。
3-5
4-5
3-4
5-7

上から順番に当たる可能性が有るとのことです。

ですが、競馬自体がよくわからないので一律に1000円で4000円分購入。



で、ちょっと待っていると結果発表。




なんと「4-5」が690円のあたりでしたー!

100円で690円なので6900円です。

つまり、2900円の回収!


こんなにさくっと勝てるなら、買ってもいいかもね!

ここからリンクすると、知り合いにブログがばれちゃうので、リンクはしないけどね。

2009年10月9日金曜日

Fatal error: Wrong parameters for Exception([string $exception [, long $code ]])

今までは自作のメッセージ関数を使ってエラーをハンドリングしてたんですが、
phpでもかなり例外処理まわりがしっかりしてきたので、
Exceptionクラスに入門してみました。

さっそく、Exceptionクラスで例外!(おい
Fatal error: Wrong parameters for Exception([string $exception [, long $code ]])

どうやら、パラメータがおかしいらしい。


なにがおかしいのかよくわからない・・・

なので、php.netのマニュアル道理にコンストラクタ処理を記述

public function __construct($message, $code = 0, Exception $previous = null)
{
    // 全てを正しく確実に代入する
    parent::__construct($message, $code, $previous);
}


エラー変わらず・・・







あ、$previousはphp5.3からだった!

ちくしょー

2009年10月3日土曜日

Gnucash導入

この10月からgnucashという財務会計ソフトを導入してみました。
家計簿用です。


「財務会計ソフトを家計簿で利用できるのか?」と思われる方もいるかと思いますが、
普通に売ってる家計簿も元は財務会計の落とし込みのようなものなので、
書店で売っているものと使い方は変わりません。

前職でとある企業の財務会計フロントシステムを運用していた経験から言うと、
家庭でこのレベルのアプリが利用できるかと思うと、
「前職やばい」というキモチは隠せません。

とりあえず、一ヶ月は続けていこうと思います。

2009年9月26日土曜日

北千住 de 散髪

今日は久しぶりの散髪です。

7月のはじめ以来なので3ヶ月分です。

サッパリサッパリ!

この後はよく行ってた南千住の自遊空間(http://jiqoo.jp/tempo.php?tempoNUM=9931786)で、
NARUTOとHxHを最新巻まで読んで帰宅。

久しぶりに充実した休日

2009年9月24日木曜日

DARKER THAN BLACK 流星の双子

DARKER THAN BLACK 流星の双子
http://www.d-black.net/index.html

DARKER THAN BLACKは前作が結構はまったので期待ですw

エンディングだけど、abingdon boys schoolも歌うらしいので、そっちも期待です。
西川貴教は声が結構好きです。

公式サイトを見た感じだと、やっぱり銀の復活はなさそうなので、
残念でなりません。

やっぱり銀かわいいよ銀。

2009年9月22日火曜日

初投稿

「bloggerでblogを作ってみました」のテスト