3日で作るPHPアプリケーション……試行錯誤メモ1
状態:不明
閲覧数:5,384
投稿日:2008-06-06
更新日:2011-01-28
[url=/modules/amazon/detail.php?asin=475615106X]<img src="http://php.w4c.work/originalSample/PHPStyleNext/images/3day.jpg" alt="3日で作るPHPアプリケーション " />[/url]
デモは、[url=http://php.w4c.work/originalSample/PHPStyleNext/3day/" target="_brank]こちら[/url]。
■SSHログイン
▼
pear upgrade PEAR
▼
pear list
▼
pear install -a channel://pear.php.net/XML_Serializer-0.18.0
▼
pear install -a Services_Amazon-0.7.0
▼
pear info Services_Amazon
■WEBサーバにインストールされているPEARライブラリを確認したい
Web上からグラフィカルな一覧を利用したいのであればPEAR_Info(PEAR版php info)を使う。ただし.htaccessでCGIモードに切り替える必要がある。
▼pear install PEAR_Info
▼PEARの一覧を表示させるPHPスクリプト。名称は任意。
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '/virtual/ユーザー名/pear/php/');
require_once('PEAR/Info.php');
$pearinfo = new PEAR_Info();
$pearinfo->show();
▼上記PHPスクリプトへブラウザアクセスした際に表示されるエラーメッセージ
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/etc/pear.conf) is not within the allowed path(s): (.:/virtual:/tmp:/usr/local/lib/php:/usr/local/php/bin) in /usr/local/lib/php/PEAR/Config.php on line 595
▲CGIモードへ切り替えていないため
▼.htaccess(上記PHPスクリプトと同じディレクトリ)
AddHandler application/x-httpd-phpcgi .php
■参考url
▼XREAのphpはセーフモード(safe mode)で動いている/XREAでPEARをインストールするのにハマッタときのメモ - Kemworld::Diary
http://d.hatena.ne.jp/kemworld/20071003/1191421021
[url=/modules/amazon/detail.php?asin=475615106X]<img src="http://php.w4c.work/originalSample/PHPStyleNext/images/3day.jpg" alt="3日で作るPHPアプリケーション " />[/url]
デモは、[url=http://php.w4c.work/originalSample/PHPStyleNext/3day/" target="_brank]こちら[/url]。
■SSHログイン
▼
pear upgrade PEAR
▼
pear list
▼
pear install -a channel://pear.php.net/XML_Serializer-0.18.0
▼
pear install -a Services_Amazon-0.7.0
▼
pear info Services_Amazon
■WEBサーバにインストールされているPEARライブラリを確認したい
Web上からグラフィカルな一覧を利用したいのであればPEAR_Info(PEAR版php info)を使う。ただし.htaccessでCGIモードに切り替える必要がある。
▼pear install PEAR_Info
▼PEARの一覧を表示させるPHPスクリプト。名称は任意。
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '/virtual/ユーザー名/pear/php/');
require_once('PEAR/Info.php');
$pearinfo = new PEAR_Info();
$pearinfo->show();
▼上記PHPスクリプトへブラウザアクセスした際に表示されるエラーメッセージ
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/etc/pear.conf) is not within the allowed path(s): (.:/virtual:/tmp:/usr/local/lib/php:/usr/local/php/bin) in /usr/local/lib/php/PEAR/Config.php on line 595
▲CGIモードへ切り替えていないため
▼.htaccess(上記PHPスクリプトと同じディレクトリ)
AddHandler application/x-httpd-phpcgi .php
■参考url
▼XREAのphpはセーフモード(safe mode)で動いている/XREAでPEARをインストールするのにハマッタときのメモ - Kemworld::Diary
http://d.hatena.ne.jp/kemworld/20071003/1191421021
[url=/modules/amazon/detail.php?asin=475615106X]<img src="http://php.w4c.work/originalSample/PHPStyleNext/images/3day.jpg" alt="3日で作るPHPアプリケーション " />[/url]