MovableType → WordPress完了

Posted under 雑記 by uechoco on 火曜日 15 4月 2008 at 20 : 45 : 34

MovableTypeからWordPressへの移行が完了しました。
なかなか使い勝手はいい感じです。プラグインも充実していて、今までブログ上で書いたソースコードの多くを既にiG: Syntax Hiliterプラグイン仕様に移行済みです。

重要:RSSフィードのアドレスが変更となります。お手数ですが、購読されている方は、再登録をお願いいたします


[php]PECLコマンドが成功するまでのエラー解決備忘録(syck編)

Posted under php,symfony by uechoco on 火曜日 8 4月 2008 at 15 : 20 : 02

 今度はsyckのインストール。syckはsymfonyが拡張対応しているYAMLパーサですね。Fedoraだったらsyck-phpパッケージとかがあるのかな?

★1. stable版がない

 まずは適当にコマンドを打つ。

[root@localhost etc]# pecl install syck
Failed to download pecl/syck within preferred state "stable", latest release is version 0.9.2, stability "beta", use "channel://pecl.php.net/syck-0.9.2" to install
Cannot initialize 'channel://pecl.php.net/syck', invalid or missing package file
Package "channel://pecl.php.net/syck" is not valid
install failed

?

 stable版がないようです。

★2. syckライブラリのインストール

 beta指定で再びコマンドを打つ。

[root@localhost etc]# pecl install syck-beta
downloading syck-0.9.2.tgz ...
Starting to download syck-0.9.2.tgz (11,339 bytes)
.....done: 11,339 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/syck-0.9.2
running: /tmp/pear/download/syck-0.9.2/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -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... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for syck support... yes, shared
checking for syck files in default path... not found
configure: error: Please reinstall the syck distribution
ERROR: `/tmp/pear/download/syck-0.9.2/configure' failed

?

 たぶん、syckライブラリにパスが通ってないとかかな。勘違いしていたのは、syckはphpのためのものではなくて、phpでも使えるYAMLパーサ。なので、syckライブラリを先にインストールしておく必要があるみたい。
 CentOSでは、syckのパッケージはないようなので、ダウンロードしてmakeすることに。

[root@localhost ~]# cd /usr/local/src
[root@localhost src]# wget http://rubyforge.org/frs/download.php/4492/syck-0.55.tar.gz
--04:53:17--  http://rubyforge.org/frs/download.php/4492/syck-0.55.tar.gz
rubyforge.org をDNSに問いあわせています... 205.234.109.19
rubyforge.org|205.234.109.19|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 302 Found
場所: http://files.rubyforge.mmmultiworks.com/syck/syck-0.55.tar.gz [続く]
--04:53:17--  http://files.rubyforge.mmmultiworks.com/syck/syck-0.55.tar.gz
files.rubyforge.mmmultiworks.com をDNSに問いあわせています... 216.243.185.119
files.rubyforge.mmmultiworks.com|216.243.185.119|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 354205 (346K) [application/x-gzip]
Saving to: `syck-0.55.tar.gz'

100%[=====================================>] 354,205     76.6K/s   in 4.7s

04:53:24 (73.3 KB/s) - `syck-0.55.tar.gz' を保存しました [354205/354205]

?

[root@localhost src]# tar zxvf syck-0.55.tar.gz
syck-0.55/
syck-0.55/config/
syck-0.55/config/install-sh
syck-0.55/config/README
syck-0.55/config/missing
syck-0.55/config/depcomp
syck-0.55/CHANGELOG
syck-0.55/COPYING
syck-0.55/Makefile.am
syck-0.55/README
syck-0.55/README.BYTECODE
syck-0.55/README.EXT
syck-0.55/RELEASE
syck-0.55/TODO
syck-0.55/bootstrap
syck-0.55/configure.in
syck-0.55/ext/
syck-0.55/ext/cocoa/
syck-0.55/ext/cocoa/YAML.xcode/
syck-0.55/ext/cocoa/YAML.xcode/project.pbxproj
syck-0.55/ext/cocoa/Info.plist
syck-0.55/ext/cocoa/README
syck-0.55/ext/cocoa/YAML_Prefix.pch
syck-0.55/ext/cocoa/src/
syck-0.55/ext/cocoa/src/SyckInput.m
syck-0.55/ext/cocoa/src/YAML.h
syck-0.55/ext/cocoa/src/YAMLCategories.h
syck-0.55/ext/cocoa/src/YAMLCategories.m
syck-0.55/ext/cocoa/src/YAMLCocoaCategories.h
syck-0.55/ext/cocoa/src/YAMLCocoaCategories.m
syck-0.55/ext/cocoa/src/YamlController.h
syck-0.55/ext/cocoa/src/main.c
syck-0.55/ext/cocoa/src/Base64 NSData code/
syck-0.55/ext/cocoa/src/Base64 NSData code/Base64 AltiVec algorithm info.rtf
syck-0.55/ext/cocoa/src/Base64 NSData code/Documentation.html
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions.h
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions.m
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/Methods/
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/Methods/Methods.html
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/CompositePage.html
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/GSNSDataExtensions.html
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/index.html
syck-0.55/ext/cocoa/src/Base64 NSData code/GSNSDataExtensions/toc.html
syck-0.55/ext/php/
syck-0.55/ext/php/tests/
syck-0.55/ext/php/tests/001.phpt
syck-0.55/ext/php/Makefile.in
syck-0.55/ext/php/config.m4
syck-0.55/ext/php/make_module.sh
syck-0.55/ext/php/php_syck.h
syck-0.55/ext/php/phpext.c
syck-0.55/ext/php/syck.php
syck-0.55/ext/python/
syck-0.55/ext/python/setup.py
syck-0.55/ext/python/pyext.c
syck-0.55/ext/python/XmlYaml/
syck-0.55/ext/python/XmlYaml/README_yaml2xml
syck-0.55/ext/python/XmlYaml/convertyaml_map.py
syck-0.55/ext/python/XmlYaml/convertyaml_seq.py
syck-0.55/ext/python/XmlYaml/people.xml
syck-0.55/ext/python/yaml2xml.py
syck-0.55/ext/python/ydump.py
syck-0.55/ext/python/ypath.py
syck-0.55/ext/python/tests/
syck-0.55/ext/python/tests/basic.py
syck-0.55/ext/python/tests/ypath_test.py
syck-0.55/ext/python/tests/ypath_test.yml
syck-0.55/ext/ruby/
syck-0.55/ext/ruby/ext/
syck-0.55/ext/ruby/ext/syck/
syck-0.55/ext/ruby/ext/syck/MANIFEST
syck-0.55/ext/ruby/ext/syck/extconf.rb
syck-0.55/ext/ruby/ext/syck/rubyext.c
syck-0.55/ext/ruby/lib/
syck-0.55/ext/ruby/lib/okay/
syck-0.55/ext/ruby/lib/okay/news.rb
syck-0.55/ext/ruby/lib/okay/rpc.rb
syck-0.55/ext/ruby/lib/okay.rb
syck-0.55/ext/ruby/lib/yaml.rb
syck-0.55/ext/ruby/lib/yod.rb
syck-0.55/ext/ruby/lib/yaml/
syck-0.55/ext/ruby/lib/yaml/baseemitter.rb
syck-0.55/ext/ruby/lib/yaml/basenode.rb
syck-0.55/ext/ruby/lib/yaml/compat.rb
syck-0.55/ext/ruby/lib/yaml/constants.rb
syck-0.55/ext/ruby/lib/yaml/dbm.rb
syck-0.55/ext/ruby/lib/yaml/emitter.rb
syck-0.55/ext/ruby/lib/yaml/encoding.rb
syck-0.55/ext/ruby/lib/yaml/error.rb
syck-0.55/ext/ruby/lib/yaml/rubytypes.rb
syck-0.55/ext/ruby/lib/yaml/store.rb
syck-0.55/ext/ruby/lib/yaml/stream.rb
syck-0.55/ext/ruby/lib/yaml/stringio.rb
syck-0.55/ext/ruby/lib/yaml/syck.rb
syck-0.55/ext/ruby/lib/yaml/tag.rb
syck-0.55/ext/ruby/lib/yaml/types.rb
syck-0.55/ext/ruby/lib/yaml/yamlnode.rb
syck-0.55/ext/ruby/lib/yaml/ypath.rb
syck-0.55/ext/ruby/CHANGELOG
syck-0.55/ext/ruby/README
syck-0.55/ext/ruby/install.rb
syck-0.55/ext/ruby/samples/
syck-0.55/ext/ruby/samples/okayNews-modules.rb
syck-0.55/ext/ruby/samples/okayNews-sample.rb
syck-0.55/ext/ruby/samples/okayNews-validate.rb
syck-0.55/ext/ruby/samples/okayRpc-client.rb
syck-0.55/ext/ruby/samples/okayRpc-server.rb
syck-0.55/ext/ruby/samples/yaml-sortHashKeys.rb
syck-0.55/ext/ruby/tests/
syck-0.55/ext/ruby/tests/basic.rb
syck-0.55/ext/ruby/yts/
syck-0.55/ext/ruby/yts/YtsAnchorAlias.yml
syck-0.55/ext/ruby/yts/YtsBasicTests.yml
syck-0.55/ext/ruby/yts/YtsBlockMapping.yml
syck-0.55/ext/ruby/yts/YtsBlockSequence.yml
syck-0.55/ext/ruby/yts/YtsDocumentSeparator.yml
syck-0.55/ext/ruby/yts/YtsErrorTests.yml
syck-0.55/ext/ruby/yts/YtsFlowCollections.yml
syck-0.55/ext/ruby/yts/YtsFoldedScalars.yml
syck-0.55/ext/ruby/yts/YtsMapInSeq.yml
syck-0.55/ext/ruby/yts/YtsNullsAndEmpties.yml
syck-0.55/ext/ruby/yts/YtsRubyTests.yml
syck-0.55/ext/ruby/yts/YtsSpecificationExamples.yml
syck-0.55/ext/ruby/yts/YtsTypeTransfers.yml
syck-0.55/ext/ruby/yts/YtsYpath.yml
syck-0.55/ext/ruby/yts/cookbook.rb
syck-0.55/ext/ruby/yts/index.yml
syck-0.55/ext/ruby/yts/yts.rb
syck-0.55/ext/yamlbyte/
syck-0.55/ext/yamlbyte/Makefile
syck-0.55/ext/yamlbyte/yamlbyte.h
syck-0.55/ext/yamlbyte/ybext.c
syck-0.55/lib/
syck-0.55/lib/Makefile.in
syck-0.55/lib/Makefile.am
syck-0.55/lib/bytecode.c
syck-0.55/lib/bytecode.re
syck-0.55/lib/emitter.c
syck-0.55/lib/gram.y
syck-0.55/lib/handler.c
syck-0.55/lib/implicit.c
syck-0.55/lib/implicit.re
syck-0.55/lib/node.c
syck-0.55/lib/syck.c
syck-0.55/lib/syck.h
syck-0.55/lib/syck_st.c
syck-0.55/lib/syck_st.h
syck-0.55/lib/token.c
syck-0.55/lib/token.re
syck-0.55/lib/yaml2byte.c
syck-0.55/lib/yamlbyte.h
syck-0.55/lib/Makefile
syck-0.55/lib/.deps/
syck-0.55/lib/.deps/bytecode.Po
syck-0.55/lib/.deps/emitter.Po
syck-0.55/lib/.deps/gram.Po
syck-0.55/lib/.deps/handler.Po
syck-0.55/lib/.deps/implicit.Po
syck-0.55/lib/.deps/node.Po
syck-0.55/lib/.deps/syck.Po
syck-0.55/lib/.deps/syck_st.Po
syck-0.55/lib/.deps/token.Po
syck-0.55/lib/.deps/yaml2byte.Po
syck-0.55/lib/gram.h
syck-0.55/lib/gram.output
syck-0.55/lib/gram.c
syck-0.55/tests/
syck-0.55/tests/CuTest.c
syck-0.55/tests/Basic.c
syck-0.55/tests/Makefile.in
syck-0.55/tests/CuTest.h
syck-0.55/tests/Emit.c
syck-0.55/tests/Makefile.am
syck-0.55/tests/Parse.c
syck-0.55/tests/YTS.c
syck-0.55/tests/YTS.c.erb
syck-0.55/tests/YTS.c.rb
syck-0.55/tests/Makefile
syck-0.55/tests/.deps/
syck-0.55/tests/.deps/Basic.Po
syck-0.55/tests/.deps/CuTest.Po
syck-0.55/tests/.deps/Emit.Po
syck-0.55/tests/.deps/Parse.Po
syck-0.55/tests/.deps/YTS.Po
syck-0.55/aclocal.m4
syck-0.55/config.h.in
syck-0.55/Makefile.in
syck-0.55/configure
syck-0.55/config.status
syck-0.55/Makefile
syck-0.55/config.h
syck-0.55/stamp-h1

?

[root@localhost src]# cd syck-0.55
[root@localhost syck-0.55]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for bison... no
checking for byacc... no
checking for style of include used by make... GNU
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
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 alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for vprintf... yes
checking for _doprnt... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands

?

[root@localhost syck-0.55]# make
# ==== 略 ====

?

[root@localhost syck-0.55]# make install
# ==== 略 ====

?

 これでsyckライブラリは入ったかな。

★3. syckのphp拡張をインストールする

 再びbeta版をインストール

[root@localhost syck-0.55]# pecl install syck-beta
downloading syck-0.9.2.tgz ...
Starting to download syck-0.9.2.tgz (11,339 bytes)
.....done: 11,339 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/syck-0.9.2
running: /tmp/pear/download/syck-0.9.2/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -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... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for syck support... yes, shared
checking for syck files in default path... found in /usr/local
checking for syck_new_parser in -lsyck... yes
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/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 how to run the C preprocessor... gcc -E
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 for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) 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
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /var/tmp/pear-build-root/syck-0.9.2/libtool --mode=compile gcc  -I. -I/tmp/pear/download/syck-0.9.2 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/syck-0.9.2/include -I/var/tmp/pear-build-root/syck-0.9.2/main -I/tmp/pear/download/syck-0.9.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/download/syck-0.9.2/phpext.c -o phpext.lo
mkdir .libs
gcc -I. -I/tmp/pear/download/syck-0.9.2 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/syck-0.9.2/include -I/var/tmp/pear-build-root/syck-0.9.2/main -I/tmp/pear/download/syck-0.9.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/syck-0.9.2/phpext.c  -fPIC -DPIC -o .libs/phpext.o
/tmp/pear/download/syck-0.9.2/phpext.c: In function 'zif_syck_load':
/tmp/pear/download/syck-0.9.2/phpext.c:818: warning: passing argument 2 of 'syck_parser_bad_anchor_handler' from incompatible pointer type
/tmp/pear/download/syck-0.9.2/phpext.c:819: warning: passing argument 2 of 'syck_parser_error_handler' from incompatible pointer type
/tmp/pear/download/syck-0.9.2/phpext.c: In function 'zif_syck_dump':
/tmp/pear/download/syck-0.9.2/phpext.c:862: warning: passing argument 2 of 'syck_output_handler' from incompatible pointer type
/bin/sh /var/tmp/pear-build-root/syck-0.9.2/libtool --mode=link gcc -DPHP_ATOM_INC -I/var/tmp/pear-build-root/syck-0.9.2/include -I/var/tmp/pear-build-root/syck-0.9.2/main -I/tmp/pear/download/syck-0.9.2 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -o syck.la -export-dynamic -avoid-version -prefer-pic -module -rpath /var/tmp/pear-build-root/syck-0.9.2/modules  phpext.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lsyck
gcc -shared  .libs/phpext.o  -L/usr/local/lib -lsyck  -Wl,-rpath -Wl,/usr/local/lib -Wl,-soname -Wl,syck.so -o .libs/syck.so
creating syck.la
(cd .libs && rm -f syck.la && ln -s ../syck.la syck.la)
/bin/sh /var/tmp/pear-build-root/syck-0.9.2/libtool --mode=install cp ./syck.la /var/tmp/pear-build-root/syck-0.9.2/modules
cp ./.libs/syck.so /var/tmp/pear-build-root/syck-0.9.2/modules/syck.so
cp ./.libs/syck.lai /var/tmp/pear-build-root/syck-0.9.2/modules/syck.la
PATH="$PATH:/sbin" ldconfig -n /var/tmp/pear-build-root/syck-0.9.2/modules
----------------------------------------------------------------------
Libraries have been installed in:
/var/tmp/pear-build-root/syck-0.9.2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/var/tmp/pear-build-root/install-syck-0.9.2" install
Installing shared extensions:     /var/tmp/pear-build-root/install-syck-0.9.2/usr/lib/php/modules/
running: find "/var/tmp/pear-build-root/install-syck-0.9.2" -ls
2195934    8 drwxr-xr-x   3 root     root         4096  3月 31 04:59 /var/tmp/pear-build-root/install-syck-0.9.2
2195955    8 drwxr-xr-x   3 root     root         4096  3月 31 04:59 /var/tmp/pear-build-root/install-syck-0.9.2/usr
2195956    8 drwxr-xr-x   3 root     root         4096  3月 31 04:59 /var/tmp/pear-build-root/install-syck-0.9.2/usr/lib
2195957    8 drwxr-xr-x   3 root     root         4096  3月 31 04:59 /var/tmp/pear-build-root/install-syck-0.9.2/usr/lib/php
2195958    8 drwxr-xr-x   2 root     root         4096  3月 31 04:59 /var/tmp/pear-build-root/install-syck-0.9.2/usr/lib/php/modules
2195954  264 -rwxr-xr-x   1 root     root       261334  3月 31 04:59 /var/tmp/pear-build-root/install-syck-0.9.2/usr/lib/php/modules/syck.so

Build process completed successfully
Installing '/usr/lib/php/modules/syck.so'
install ok: channel://pecl.php.net/syck-0.9.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=syck.so" to php.ini

?

 はい、インストール完了!あとは、php.iniか、/etc/php.d/syck.iniにextension=syck.soを追加すれば使えるようになります。


[php]DB on DB

Posted under php by uechoco on 火曜日 8 4月 2008 at 10 : 46 : 10

 DBMSを用いてDBを管理するようなアプリを作ろうとしたとき、DB上にDBを格納できるようなDB設計をして、DBonDBを操作するモデルを含んだアプリを作るのがよいのか、そもそもDBMSをフルに使いこなせばよいので、phpMyAdminのようなDB操作のラッパーアプリを作ればよいのか、どっちがよいのか。

 ラッパーアプリのほうが楽なんだけど、DB操作に対するいろんな権限を持ってると、セキュリティが甘かったときに困る。

 DB on DBアプリのほうは、作るのは大変そうなんだけれど、設計するのは楽しそう。

 どっちにしようかな。


[php]PECLコマンドが成功するまでのエラー解決備忘録(imagick編)

Posted under php by uechoco on 火曜日 8 4月 2008 at 10 : 33 : 10

 peclコマンドを初めて使ったですが、エラーが多かった、解決の備忘録。ちなみにインストールしたのは、imagick。

★1. Allowed memory size of 8388608 bytes exhausted

pecl install imagick

と打ったら

[root@localhost ~]# pecl install imagick
downloading imagick-2.1.1.tgz ...
Starting to download imagick-2.1.1.tgz (74,980 bytes)
.................done: 74,980 bytes

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 536342 bytes) in /usr/share/pear/PEAR/Task/Replace.php on line 177

とかえってきました。

 こういうエラーってエラー内容をそのまま検索すると意外と出てくるものですが、案の定、ありました。

php.iniのmemory_limitを増やしても、peclの実行でmemory exhaustedが発生してしまう時の対処法 – Connect, Automate, Speed Up, Make Happy
http://d.hatena.ne.jp/snegishi/20071212/1197422664

 記事の中では、/usr/share/php/pearcmd.php@ini_set('memory_limit', '16M');を追加すると書いてありましたが、私の環境(CentOS 5.1、yum経由でphp・pearインストール済み)では/usr/share/pear/pearcmd.phpにありました。元の記事はUbuntuだったのでまぁ誤差の範囲内ですかね。

 pearcmd.phpの冒頭45行目くらいに@ini_setの連続があったのでそこに追加しました。下のような感じ。


<?php

ob_implicit_flush(true);

@ini_set('track_errors', true);

@ini_set('html_errors', false);

@ini_set('magic_quotes_runtime', false);

@ini_set('memory_limit', '16M'); // ここに追加

$_PEAR_PHPDIR = '#$%^&*';

set_error_handler('error_handler');
?>

★2. phpize: command not found

 もう一度挑戦

[root@localhost ~]# pecl install imagick
downloading imagick-2.1.1.tgz ...
Starting to download imagick-2.1.1.tgz (74,980 bytes)
.................done: 74,980 bytes
5 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed

 はい失敗。phpizeがないって。インストールの仕方を調べても、あんまり出てこなかったけれども、php-develパッケージをインストールするとphpizeがついて来るそうなので、yumでインストール。

yum -y install php-devel

 依存関係でautomakeもインストールされましたと。

Installed: php-devel.i386 0:5.1.6-15.el5
Dependency Installed: automake.noarch 0:1.9.6-2.1
Complete!

 これでphpizeは使えるようになったかな。

?★3. ImageMagickのインストール

 さらにもう一度挑戦

[root@localhost ~]# pecl install imagick
downloading imagick-2.1.1.tgz ...
Starting to download imagick-2.1.1.tgz (74,980 bytes)
.................done: 74,980 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
1. Please provide the prefix of Imagemagick installation : autodetect

1-1, 'all', 'abort', or Enter to continue: [Enter]#[Enter]キーを押して続行
building in /var/tmp/pear-build-root/imagick-2.1.1
running: /tmp/pear/temp/imagick/configure --with-imagick
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/tmp/pear/temp/imagick/configure --with-imagick' failed

 なんとなく、ImageMagickがインストールしてないためのエラーな気がします。よって、インストール。

yum -y install ImageMagick-devel

?

Installed: ImageMagick-devel.i386 0:6.2.8.0-3.el5.4
Dependency Installed: ImageMagick.i386 0:6.2.8.0-3.el5.4 alsa-lib.i386 0:1.0.14-1.rc4.el5 audiofile.i386 1:0.2.6-5 avahi.i386 0:0.6.16-1.el5 avahi-glib.i386 0:0.6.16-1.el5 bzip2-devel.i386 0:1.0.3-3 esound.i386 1:0.2.36-3 gamin.i386 0:0.1.7-8.el5 gd.i386 0:2.0.33-9.4.el5_1.1 ghostscript.i386 0:8.15.2-9.1.el5_1.1 ghostscript-devel.i386 0:8.15.2-9.1.el5_1.1 ghostscript-fonts.noarch 0:5.50-13.1.1 gnome-keyring.i386 0:0.6.0-1.fc6 gnome-mime-data.i386 0:2.4.2-3.1 gnome-mount.i386 0:0.5-3.el5 gnome-vfs2.i386 0:2.16.2-4.el5 lcms.i386 0:1.15-1.2.2 lcms-devel.i386 0:1.15-1.2.2 libICE-devel.i386 0:1.0.1-2.1 libSM-devel.i386 0:1.0.1-3.1 libX11-devel.i386 0:1.0.3-8.0.1.el5 libXau-devel.i386 0:1.0.1-3.1 libXdmcp-devel.i386 0:1.0.1-2.1 libXext-devel.i386 0:1.0.1-2.1 libXt-devel.i386 0:1.0.2-3.1.fc6 libart_lgpl.i386 0:2.3.17-4 libbonobo.i386 0:2.16.0-1.fc6 libbonoboui.i386 0:2.16.0-1.fc6 libcroco.i386 0:0.6.1-2.1 libdaemon.i386 0:0.10-5.el5 libglade2.i386 0:2.6.0-2 libgnome.i386 0:2.16.0-6.el5 libgnomecanvas.i386 0:2.14.0-4.1 libgnomeui.i386 0:2.16.0-5.el5 libgsf.i386 0:1.14.1-6.1 libjpeg-devel.i386 0:6b-37 librsvg2.i386 0:2.16.1-1.el5 libtiff-devel.i386 0:3.8.2-7.el5 libwmf.i386 0:0.2.8.4-10.1 mesa-libGL-devel.i386 0:6.5.1-7.5.el5 shared-mime-info.i386 0:0.19-3.el5 urw-fonts.noarch 0:2.3-6.1.1 xorg-x11-proto-devel.i386 0:7.1-9.el5.centos
Complete!

?

★4. pecl install imagick

 さらにさらにもう一度挑戦

[root@localhost ~]# pecl install imagick
downloading imagick-2.1.1.tgz ...
Starting to download imagick-2.1.1.tgz (74,980 bytes)
.................done: 74,980 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20050922
Zend Extension Api No:   220051025
1. Please provide the prefix of Imagemagick installation : autodetect

1-1, 'all', 'abort', or Enter to continue: [Enter]#[Enter]キーを押して続行
building in /var/tmp/pear-build-root/imagick-2.1.1
running: /tmp/pear/temp/imagick/configure --with-imagick
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
#======= 省略 =======
Build process completed successfully
Installing '/usr/lib/php/modules/imagick.so'
install ok: channel://pecl.php.net/imagick-2.1.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=imagick.so" to php.ini

 うまくいったみたいです。最後に、php.iniに”extension=imagick.so”を加えれば完了なのかな?


[マンガ]P2!-let’s Play Pingpong!の評価が高いよね

Posted under 雑記 by uechoco on 月曜日 7 4月 2008 at 10 : 58 : 58

P2!っていうジャンプで連載していた卓球マンガが少し前にありました。個人的には、ワンピースとか、ナルトとかと同じレベルの期待感で毎週見てたのですが、あっという間に終わってしまいました。

ふと、そういえば完結編が含まれてる最終巻ってそろそろだったような・・・と思ってAmazonで調べてみたら、先月の初めに最終巻が出てました。

P2!全体(1?7巻それぞれ)のレビュー評価は高いですね。最終巻は、8件すべて★5つです。レビュー結果を鵜呑みにするわけじゃないけど、P2!がやっぱりいいマンガだったんだなっと知れたのは良かった。

最終巻だけ買っとこうかなー。


« 前ページへ次ページへ »

Copyright © 2012 うえちょこ@ぼろぐ. WP Theme created by Web Top.