<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>仙人の心得 &#187; pear</title>
	<atom:link href="http://blog.mktime.com/archive/tag/pear/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mktime.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 31 Aug 2010 12:04:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.mktime.com/archive/tag/pear/feed" />
		<item>
		<title>php:Windows環境でphp.exe＋apache+MySQLの環境を作る</title>
		<link>http://blog.mktime.com/archive/29.html</link>
		<comments>http://blog.mktime.com/archive/29.html#comments</comments>
		<pubDate>Sun, 27 Jul 2008 13:31:05 +0000</pubDate>
		<dc:creator>nak</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=29</guid>
		<description><![CDATA[
php

php.netからバイナリをダウンロードする。
インストーラでもいいけど、とりあえずzipにしとく。

解凍したらフォルダごと適当なところに移動する。（以降、仮にC:\php-5.2.6-Win32に置いたと [...]]]></description>
			<content:encoded><![CDATA[<p>
<h3>php</h3>
<br />
php.netからバイナリをダウンロードする。<br />
インストーラでもいいけど、とりあえずzipにしとく。<br />
<br />
解凍したらフォルダごと適当なところに移動する。（以降、仮にC:\php-5.2.6-Win32に置いたと仮定して読んでください。）<br />
フォルダの中にあるphp.ini-recommendedをコピーしてphp.iniに名前を変える<br />
<br />
<h3>apache</h3>
apache.orgから現在の最新版Apache2.2のWindows用インストーラをダウンロード＆実行する。<br />
オプションは適当に選ぶ。<br />
<br />
httpd.confに設定を追加する。<br />
標準のパスでインストールしたなら、C:\Program Files\Apache Software Foundation\Apache2.2\conf\に設定ファイルhttpd.confがある。<br />
以下の設定を追記する。<br />
<pre class="file">
LoadModule php5_module "C:\php-5.2.6-Win32\php5apache2_2.dll"
PHPIniDir "C:\php-5.2.6-Win32"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</pre>
linux環境の&#8221;httpd configtest&#8221;に変わるコマンドは<br />
<pre class="console">
httpd.exe -t
</pre>
このコマンドを実行して&#8221;Syntax OK&#8221;が表示されることを確認する。<br />
OKならapacheを再起動する。<br />
<pre class="console">
httpd.exe -k restart
</pre>
<br />
公開ディレクトリにtest用のphpファイルを置いて、phpが実行されていればOKです。<br />
<br />
<br />
XdebugをWindows環境で使うには<br />
<a href="http://pecl4win.php.net/ext.php/php_xdebug.dll">http://pecl4win.php.net/ext.php/php_xdebug.dll</a><br />
からphp_xdebug.dllをダウンロードしてエクステンションDirに保存する。<br />
<br />
<h4>エクステンションとPEARを使う＆開発環境用にphp.iniを編集する</h4>
<div class="caption">php.ini</div>
<pre class="file">
#pearディレクトリをinlude_pathに入れる
include_path = ".:C:\php-5.2.6-Win32\pear"

#開発用にdisplay_errorsをOnにする
display_errors = On

#extension_dirを設定する
extension_dir = "C:\php-5.2.6-Win32\ext"

#エラーログを出力する
error_log = php_error.log

拡張を有効にする。php_xdebug.dllも追記する。
extension=php_mbstring.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
</pre>
<br />
<h4>PEARを使えるようにする</h4>
1.go-pear.batを実行して適当に進める。<br />
2.PEAR_ENV.regをダブルクリックしてレジストリに登録する。<br />
3.環境変数pathにpear.batがあるディレクトリを追加する。<br />
4.コマンドプロンプトで &#8220;pear list&#8221;コマンドが通ればOK。<br />
5.プロクシ環境ならpear configにプロクシ設定を行う。<br />
pear config-set http_proxy プロクシサーバ名:ポート番号<br />
<br />
<h3>MySQL</h3>
mysql.comからMySQL Community ServerのWindouws用Setup.exeをダウンロードします。<br />
ウィザードに従ってインストールします。<br />
インストールが終わるとそのまま設定ウィザードに続くので適当に。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/29.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.mktime.com/archive/29.html" />
	</item>
		<item>
		<title>linux：proxy接続環境で設定すること</title>
		<link>http://blog.mktime.com/archive/20.html</link>
		<comments>http://blog.mktime.com/archive/20.html#comments</comments>
		<pubDate>Thu, 24 Jul 2008 23:04:41 +0000</pubDate>
		<dc:creator>nak</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[wget]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=17</guid>
		<description><![CDATA[
よく設定方法を忘れるので、とりあえずこれだけは最初にセットするようにしよう。
環境変数の設定

$HOME/.bashrcに記述

export http_proxy=http://プロクシーサーバ名:ポート番号/
e [...]]]></description>
			<content:encoded><![CDATA[<p>
よく設定方法を忘れるので、とりあえずこれだけは最初にセットするようにしよう。<br />
<h3>環境変数の設定</h3>
<br />
$HOME/.bashrcに記述<br />
<pre class="file">
export http_proxy=http://プロクシーサーバ名:ポート番号/
export https_proxy=http://プロクシーサーバ名:ポート番号/
export ftp_proxy=http://プロクシーサーバ名:ポート番号/
</pre>
記述したら反映する。<br />
<pre class="console">
source .bashrc
</pre>
<br />
<h3>yumのproxy設定</h3>
/etc/yum.confの[main]セクションにに下記の１行を追加。<br />
<pre class="file">
[main]
 ・・・いろいろ省略・・・
proxy=http://プロクシーサーバ名:ポート番号/
</pre>
<h3>wgetのproxy設定</h3>
$HOME/.wgetrcに記述する。<br />
<pre class="file">
export http_proxy=http://プロクシーサーバ名:ポート番号/
</pre>
<h3>pearのproxy設定</h3>
pearコマンドでproxyサーバ＆ポートを指定する。<br />
<pre class="console">
pear config-set http_proxy プロクシーサーバ名:ポート番号
</pre>
<br />
<h3>うまく行かないときにチェックすること</h3>
環境変数がセットされているか…setコマンド<br />
ネットワーク設定は正しいか。<br />
DHCPならこんな感じ。<br />
<div class="caption">/etc/sysconfig/network-scripts/ifcfg-eth0</div>
<pre class="file">
TYPE=Ethernet
DEVICE=eth0
ONBOOT=yes
#NETMASK=255.255.255.0
#IPADDR=192.168.1.8
BOOTPROTO='dhcp'
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/20.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://blog.mktime.com/archive/20.html" />
	</item>
	</channel>
</rss>
