<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://shiyoka.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://shiyoka.com/feed.php">
        <title>ClownWiki - php</title>
        <description></description>
        <link>https://shiyoka.com/</link>
        <image rdf:resource="https://shiyoka.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-05-08T13:21:28+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:apache_sudo&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:apc&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:composer&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:empry_isset&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:framework&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:gd&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:mod_cgi&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:pear&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:phalcon&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:php_datetime&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:server_env&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:tips&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:xdebug&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:xhprof_xhgui&amp;rev=1739713984&amp;do=diff"/>
                <rdf:li rdf:resource="https://shiyoka.com/doku.php?id=php:yii&amp;rev=1739713984&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://shiyoka.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>ClownWiki</title>
        <link>https://shiyoka.com/</link>
        <url>https://shiyoka.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:apache_sudo&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache_sudo</title>
        <link>https://shiyoka.com/doku.php?id=php:apache_sudo&amp;rev=1739713984&amp;do=diff</link>
        <description>apacheでsudo

apacheで以下のようなコマンド（sudo）を実行したい場合


$cmd = &quot;sudo -H ls -l /&quot;;
$ret = shell_exec($cmd);


設定ファイルを編集


# visudo


ttyなしでsudoができる


コメントアウト
-）Defaults    requiretty
+）#Defaults    requiretty</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:apc&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apc</title>
        <link>https://shiyoka.com/doku.php?id=php:apc&amp;rev=1739713984&amp;do=diff</link>
        <description>APC

構築

開発環境


# yum -y install
# yum -y php-pear
# yum -y php-devel
# yum -y httpd-devel
# yum -y install pcre-devel


APCインストール


# pecl install APC


設定ファイル作成


# echo &quot;extension=apc.so&quot; &gt; /etc/php.d/apc.ini</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:composer&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>composer</title>
        <link>https://shiyoka.com/doku.php?id=php:composer&amp;rev=1739713984&amp;do=diff</link>
        <description>Composer

&lt;https://getcomposer.org/&gt;

Install

任意のディレクトリ（プロジェクトのルートなど）に移動してインストーラを実行する。


[root@web01 ~]# cd ProjectRoot
[root@web01 ProjectRoot]# curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /root/ProjectRoot/composer.phar
Use it: php composer.phar</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:empry_isset&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>empry_isset</title>
        <link>https://shiyoka.com/doku.php?id=php:empry_isset&amp;rev=1739713984&amp;do=diff</link>
        <description>empryやらissetやら

isset

変数がセットされており、nullでないことを調べる。
変数が未定義の場合、falseが返される（※nullではない）

empty

変数が空であるかを調べる。

各パターンの返り値</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:framework&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>framework</title>
        <link>https://shiyoka.com/doku.php?id=php:framework&amp;rev=1739713984&amp;do=diff</link>
        <description>代表的なフレームワーク

CakePHP

公式：&lt;http://cakephp.jp/&gt;
ダウロード：&lt;https://github.com/cakephp/cakephp&gt;
マニュアル：&lt;http://book.cakephp.org/2.0/ja/index.html&gt;

Lithium

CakePHP から派生
公式：&lt;http://lithify.me/&gt;
ダウロード：&lt;http://rad-dev.org/lithium/versions&gt;
マニュアル：
チュートリアル：&lt;http://rad-dev.org/lithium/wiki/drafts/blog-tutorial&gt;

CodeIgniter

公式：&lt;http://codeigniter.jp/&gt;
ダウロード：&lt;http://sourceforge.jp/projects/codeigniter/releases/&gt;
マニュアル：…</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:gd&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gd</title>
        <link>https://shiyoka.com/doku.php?id=php:gd&amp;rev=1739713984&amp;do=diff</link>
        <description>gd index</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:mod_cgi&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mod_cgi</title>
        <link>https://shiyoka.com/doku.php?id=php:mod_cgi&amp;rev=1739713984&amp;do=diff</link>
        <description>CGI or Module

CGI

	&quot; Common Gateway Interface（コモン・ゲートウェイ・インタフェース、CGI）は、ウェブサーバ上でユーザプログラムを動作させるための仕組み。&quot;

FastCGI

	&quot; FastCGIとは、Webサーバ上でユーザプログラムを動作させるためのインタフェース仕様の一つである。</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:pear&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pear</title>
        <link>https://shiyoka.com/doku.php?id=php:pear&amp;rev=1739713984&amp;do=diff</link>
        <description>pear

	*  Install

PHP 5.2.x


# yum -y --enablerepo=utterramblings install php-pear


PHP 5.3.x


# yum -y --enablerepo=remi install php-pear


	*  インストール確認


 # pear
 Commands:
 build                  Build an Extension From C Source
 bundle                 Unpacks a Pecl Package
 channel-add            Add a Channel
 channel-alias          Specify an alias to a channel name
 channel-delete         Remove a Channel From the List
 ～</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:phalcon&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>phalcon</title>
        <link>https://shiyoka.com/doku.php?id=php:phalcon&amp;rev=1739713984&amp;do=diff</link>
        <description>Phalcon

Phalcon
&lt;http://www.phalconphp.com/ja/&gt;

cphalcon
&lt;https://github.com/phalcon/cphalcon&gt;

phalcon-devtools
&lt;https://github.com/phalcon/phalcon-devtools&gt;

Phalcon

ビルド、インストール


# yum install gcc
# git clone git://github.com/phalcon/cphalcon.git
# cd cphalcon/build/
# ./install
# echo &quot;extension=phalcon.so&quot; &gt; /etc/php.d/phalcon.ini
# /etc/init.d/httpd restart

# php -i|grep -ir phalcon
/etc/php.d/phalcon.ini
phalcon
phalcon =&gt; enabled
Author =&gt; Phalcon Team and contributors
PTOOLSPATH =&gt; /…</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:php_datetime&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>php_datetime</title>
        <link>https://shiyoka.com/doku.php?id=php:php_datetime&amp;rev=1739713984&amp;do=diff</link>
        <description>日付 ～DateTimeクラス～


&lt;?php
$date = DateTime::createFromFormat(&#039;j-M-Y&#039;, &#039;15-Feb-2009&#039;);
echo $date-&gt;format(&#039;Y-m-d&#039;);
?&gt;




今日


$nowtime = new DateTime(&quot;now&quot;);


昨日


$yesterday = new DateTime(&quot;now&quot;);
$yesterday-&gt;sub(new DateInterval(&#039;P1D&#039;));</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:server_env&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>server_env</title>
        <link>https://shiyoka.com/doku.php?id=php:server_env&amp;rev=1739713984&amp;do=diff</link>
        <description>環境変数から環境を判別して条件分岐

・apache で mod_env を有効にする。

・virtualhost に setenv で任意のタグをつける


&lt;VirtualHost *:80&gt;
   ServerAdmin webmaster@test-test.com
   DocumentRoot &quot;/var/www/vhosts/test-test.com&quot;
   ServerName test-test.com
   DirectoryIndex index.php index.html
   &lt;Directory &quot;/var/www/vhosts/test-test.com&quot;&gt;
      SetEnv SERVER_ENV &quot;taro&quot;
   &lt;/Directory&gt;
&lt;/VirtualHost&gt;</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:tips&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>tips</title>
        <link>https://shiyoka.com/doku.php?id=php:tips&amp;rev=1739713984&amp;do=diff</link>
        <description>Tips

カンマ区切りを配列に格納したいのに、最後に不要なカンマがあるとき


&lt;?php
$str = &quot;111,222,333,&quot;;
$str = rtrim($str, &quot;,&quot;);
$ary = explode(&quot;,&quot; $str);


error_log


bool error_log ( string $message [, int $message_type = 0 [, string $destination [, string $extra_headers ]]] )</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:xdebug&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>xdebug</title>
        <link>https://shiyoka.com/doku.php?id=php:xdebug&amp;rev=1739713984&amp;do=diff</link>
        <description>Xdebug ～ボトルネック、処理時間計測～

インストール


 pecl install xdebug


設定：php.iniに以下の記述を追加


 extension=xdebug.so
 xdebug.profiler_enable = 0
 xdebug.profiler_enable_trigger = 1
 xdebug.profiler_output_dir = /tmp</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:xhprof_xhgui&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>xhprof_xhgui</title>
        <link>https://shiyoka.com/doku.php?id=php:xhprof_xhgui&amp;rev=1739713984&amp;do=diff</link>
        <description># xhprof

&lt;http://php.net/manual/ja/book.xhprof.php&gt;

	&quot; XHProf は、軽量で階層型な命令ベースのプロファイラです。 データ収集フェーズでは、呼び出し回数や プログラムの動的コールグラフ内の弧の包括的メトリクスを追跡します。 排他的メトリクス (実行時間や CPU 時間、メモリ使用量など) の計算は、レポーティングや後処理のフェーズで行います。 関数のプロファイルは、呼び出す側と呼び出される側に分けることができます。 XHProf が再帰関数を扱うときには、コールグラフ内での循環をデータ収集時に検出し、 循環を回避するために、再帰の実行のたびにその深さも含めた一意な名前をつけます。…</description>
    </item>
    <item rdf:about="https://shiyoka.com/doku.php?id=php:yii&amp;rev=1739713984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-16T13:53:04+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>yii</title>
        <link>https://shiyoka.com/doku.php?id=php:yii&amp;rev=1739713984&amp;do=diff</link>
        <description>Yii

公式：&lt;http://www.yiiframework.com/&gt;

インストール

公式サイトからダウンロードして、解凍、ブラウザでアクセスできる場所に設置

wget “&lt;http://yii.googlecode.com/files/yii-1.1.13.e9e4a0.tar.gz&gt;”
tar zxvf yii-1.1.13.e9e4a0.tar.gz
mv yii-1.1.13.e9e4a0 /var/www/html/yii

ブラウザで動作環境のチェック</description>
    </item>
</rdf:RDF>
