ほりうちの雑記帳 | {PHP,CMS,iPhone,…}

CAT | PHP

7月/10

23

wordpressとmod_mem(mod_cache)

WordPressでたまに「urlと異なるページが表示される」というバグに遭遇した。

高速化などのためにApache:workerでPHP(zts)でeacceleratorな構成にしていて、なおかつWP-SuperCacheとmod_memという構成にしていたから原因の切り分けにはかなりの手間が必要だったんだけど、結論から言うとmod_memが原因でした。

CacheEnable / => ページもキャッシュされる!

CacheEnable /wp-content/uploads
CacheEnable /wp-content/themes =>cssや画像のみをキャッシュ
に変えたら直りました。

原因はよくわからないけど、mod_memと{zts, 日本語URL, 動的コンテンツ, プリティURL}のどれかが原因になってると思う。

· ·

7月/10

2

apache+php+mysql野良ビルドログ

[apache](first)
cd srclib/apr
./configure –prefix=/usr/local/apr-httpd/
make
sudo make install

cd ../apr-util/
./configure –prefix=/usr/local/apr-util-httpd/ –with-apr=/usr/local/apr-httpd/
make
sudo make install
echo いつかこれらも追加–with-ldap=yes –with-ldap-include=/usr/include/ –with-ldap-lib=/var/lib/ldap

cd ../../
CFLAGS=”-march=core2 -O3″ ./configure –prefix=/usr/local/apache2 –with-apr=/usr/local/apr-httpd/ –with-apr-util=/usr/local/apr-util-httpd/ –disable-actions –disable-asis –disable-autoindex –disable-imagemap –disable-include –disable-negotiation –disable-setenvif –disable-status –disable-userdir –enable-auth-dbm –enable-auth-digest –enable-authnz-ldap –enable-dav –enable-dav-fs –enable-dav-lock –enable-expires –enable-mime-magic –enable-rewrite –enable-ssl –enable-vhost-alias –with-mpm=prefork –enable-static-support
make
make install
echo 次のオプションもいつか追加–enable-ldap

[MySQL]
CFLAGS=”-O3 -march=core2 -I/usr/local/include” CXX=gcc CXXFLAGS=”-O3 -march=core2 -felide-constructors -fno-exceptions -fno-rtti -I/usr/local/include” LDFLAGS=”-L/usr/local/lib” ./configure –with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=none –with-client-ldflags=-all-static –with-mysqld-ldflags=-all-static –enable-static –disable-shared –with-readline –with-mysqld-user=mysql –enable-assembler –enable-thread-safe-client –with-plugins=csv,innobase,innodb_plugin,myisam,heap

[PHP]
./configure –with-mysql –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql-sock=/tmp/mysql.sock –with-mysqli=/usr/local/bin/mysql_config –enable-mbstring -with-gd –with-zlib –enable-sigchild –enable-zend-multibyte –disable-ipv6 –enable-socket=static
echo 次コンパイルするときは–disable-cgiとかもうちょっと厳密にしよう

[apache](second)
cd srclib/apr
./configure –prefix=/usr/local/apr-httpd/
make
sudo make install

cd ../apr-util/
./configure –prefix=/usr/local/apr-util-httpd/ –with-apr=/usr/local/apr-httpd/
make
sudo make install
echo いつかこれらも追加–with-ldap=yes –with-ldap-include=/usr/include/ –with-ldap-lib=/var/lib/ldap

cd ../../
CFLAGS=”-march=core2 -O3″ ./configure –prefix=/usr/local/apache2 –with-apr=/usr/local/apr-httpd/ –with-apr-util=/usr/local/apr-util-httpd/ –disable-actions –disable-asis –disable-autoindex –disable-imagemap –disable-include –disable-negotiation –disable-setenvif –disable-status –disable-userdir –enable-auth-dbm –enable-auth-digest –enable-dav –enable-dav-fs –enable-dav-lock –enable-expires –enable-mime-magic –enable-rewrite –enable-ssl –enable-vhost-alias –with-mpm=prefork –enable-static-support –enable-module=so –enable-headers

echo phpを静的に組み込むにはどうすれば・・?DSO使いたくないお
echo ldap..

make
sudo make install

/usr/local/apr-httpd/

静的なのは一瞬なのに、phpとかは10秒以上かかるのがザラ・・。
なんかのオプションを間違えてる??

….loading….
+256ms    開始
0    84ms    DNS ルックアップ
+84ms    39ms    接続
+123ms    0    ブロッキング
+123ms    0    送信
+123ms    38ms    待機
+161ms    0    受信

URL

ステータス

ドメイン

サイズ

タイムライン
Firebug のログ上限に達したため、0 件表示されませんでした。        プレファレンス

GET archive.ut-shorinji.net

http://archive.ut-shorinji.net/

200 OK

archive.ut-shorinji.net

2.4 KB

4.75s

GET allz.css

http://archive.ut-shorinji.net/client/themes/oxygen/css/allz.css

200 OK

archive.ut-shorinji.net

23.5 KB

682ms

GET ajaxplorer_boot.js

http://archive.ut-shorinji.net/client/js/ajaxplorer_boot.js

200 OK

archive.ut-shorinji.net

74.5 KB

626ms

GET content.php?get_action=get_boot_conf

http://archive.ut-shorinji.net/content.php?get_action=get_boot_conf

200 OK

archive.ut-shorinji.net

10.1 KB

15.19s

GET ICON.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/ICON.png

200 OK

archive.ut-shorinji.net

4.7 KB

131ms

GET progress_bar.gif

http://archive.ut-shorinji.net/client/themes/oxygen/images/progress_bar.gif

200 OK

archive.ut-shorinji.net

1.6 KB

134ms

GET ajaxplorer.js

http://archive.ut-shorinji.net/client/js/ajaxplorer.js

200 OK

archive.ut-shorinji.net

193 KB

2.24s

GET content.php?get_action=get_xml_registry

http://archive.ut-shorinji.net/content.php?get_action=get_xml_registry

200 OK

archive.ut-shorinji.net

15.9 KB

13.44s

GET progress_box.gif

http://archive.ut-shorinji.net/client/themes/oxygen/images/progress_box.gif

200 OK

archive.ut-shorinji.net

110 B

151ms

GET strip.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/strip.png

200 OK

archive.ut-shorinji.net

2.8 KB

156ms

GET ToolbarBg.gif

http://archive.ut-shorinji.net/client/themes/oxygen/images/ToolbarBg.gif

200 OK

archive.ut-shorinji.net

1.6 KB

165ms

GET flag.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/flag.png

200 OK

archive.ut-shorinji.net

745 B

177ms

GET yast_security.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/yast_security.png

200 OK

archive.ut-shorinji.net

690 B

213ms

GET dialog_close.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/dialog_close.png

200 OK

archive.ut-shorinji.net

3.6 KB

224ms

GET locationBg.gif

http://archive.ut-shorinji.net/client/themes/oxygen/images/locationBg.gif

200 OK

archive.ut-shorinji.net

235 B

1.77s

GET search.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/search.png

200 OK

archive.ut-shorinji.net

977 B

696ms

GET fileclose.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/fileclose.png

200 OK

archive.ut-shorinji.net

820 B

354ms

GET file_info.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/file_info.png

200 OK

archive.ut-shorinji.net

583 B

278ms

GET folder.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/mimes/16/folder.png

200 OK

archive.ut-shorinji.net

399 B

259ms

GET hgrabber.gif

http://archive.ut-shorinji.net/client/themes/oxygen/images/hgrabber.gif

200 OK

archive.ut-shorinji.net

834 B

2.11s

GET vgrabber.gif

http://archive.ut-shorinji.net/client/themes/oxygen/images/vgrabber.gif

200 OK

archive.ut-shorinji.net

830 B

2.55s

GET goto_parent.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/goto_parent.png

200 OK

archive.ut-shorinji.net

379 B

781ms

GET reload.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/reload.png

200 OK

archive.ut-shorinji.net

506 B

325ms

GET bookmark_menu.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/bookmark_menu.png

200 OK

archive.ut-shorinji.net

3.4 KB

535ms

GET network-wired.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/network-wired.png

200 OK

archive.ut-shorinji.net

491 B

553ms

GET arrow_down.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/arrow_down.png

200 OK

archive.ut-shorinji.net

2.9 KB

614ms

GET arrow_left.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/arrow_left.png

200 OK

archive.ut-shorinji.net

3 KB

909ms

GET arrow_right.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/arrow_right.png

200 OK

archive.ut-shorinji.net

3 KB

2.49s

GET content.php?get_action=ls&options=al&dir=%2F

http://archive.ut-shorinji.net/content.php?get_action=ls&options=al&dir=%2F

200 OK

archive.ut-shorinji.net

67 B

472ms

GET view_icon.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/view_icon.png

200 OK

archive.ut-shorinji.net

393 B

2.26s

GET encrypted.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/encrypted.png

200 OK

archive.ut-shorinji.net

1002 B

761ms

GET decrypted.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/decrypted.png

200 OK

archive.ut-shorinji.net

1.2 KB

2.75s

GET info.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/info.png

200 OK

archive.ut-shorinji.net

1 KB

2.67s

GET bookmark_add.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/bookmark_add.png

200 OK

archive.ut-shorinji.net

830 B

2.49s

GET encrypted.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/16/encrypted.png

200 OK

archive.ut-shorinji.net

667 B

1.53s

GET dialog_ok_apply.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/dialog_ok_apply.png

200 OK

archive.ut-shorinji.net

808 B

340ms

GET content.php?get_action=get_seed

http://archive.ut-shorinji.net/content.php?get_action=get_seed

200 OK

archive.ut-shorinji.net

32 B

13.85s

GET view_text.png

http://archive.ut-shorinji.net/client/themes/oxygen/images/actions/22/view_text.png

200 OK

archive.ut-shorinji.net

599 B

132ms

GET __utm.gif?utmwv=4.7.2&utmn=169819193&utmhn=archive.ut-shorinji.net&utmcs=UTF-8&utmsr=1440×900&utmsc=24-bit&utmul=ja&utmje=1&utmfl=10.1%20r53&utmdt=AjaXplorer%20-%20%2F&utmhid=1518370729&utmr=-&utmp=%2F&utmac=XXXXX&utmcc=__utma%3D56422011.2064260773.1277651009.1277651009.1277651009.1%3B%2B__utmz%3D56422011.1277651009.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&gaq=1

http://www.google-analytics.com/__utm.gif?utmwv=4.7.2&utmn=169819193&utmhn=archive.ut-shorinji.net&utmcs=UTF-8&utmsr=1440×900&utmsc=24-bit&utmul=ja&utmje=1&utmfl=10.1%20r53&utmdt=AjaXplorer%20-%20%2F&utmhid=1518370729&utmr=-&utmp=%2F&utmac=XXXXX&utmcc=__utma%3D56422011.2064260773.1277651009.1277651009.1277651009.1%3B%2B__utmz%3D56422011.1277651009.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&gaq=1

200 OK

google-analytics.com

35 B

161ms

39 件のリクエスト

359.8 KB

(0 キャッシュから)
51.41s (onload: 5.77s)
Firebug のログ上限に達したため、0 件表示されませんでした。        プレファレンス
GET http://archive.ut-shorinji.net/content.php?get_action=get_boot_conf
GET http://archive.ut-shorinji.net/content.php?get_action=get_boot_conf

200 OK
14.83s
ajaxpl…boot.js (1 行目)
GET http://archive.ut-shorinji.net/client/js/ajaxplorer.js
GET http://archive.ut-shorinji.net/client/js/ajaxplorer.js

200 OK
337ms
ajaxpl…boot.js (1 行目)
GET http://archive.ut-shorinji.net/content.php?get_action=get_xml_registry
GET http://archive.ut-shorinji.net/content.php?get_action=get_xml_registry

200 OK
13.42s
ajaxpl…boot.js (1 行目)
GET http://archive.ut-shorinji.net/content.php?get_action=ls&options=al&dir=%2F
GET http://archive.ut-shorinji.net/content.php?get_action=ls&options=al&dir=%2F

200 OK
476ms
ajaxpl…boot.js (1 行目)
GET http://archive.ut-shorinji.net/content.php?get_action=get_seed
GET http://archive.ut-shorinji.net/content.php?get_action=get_seed

200 OK
13.86s
ajaxpl…boot.js (1 行目)

No tags

6月/10

26

uniproカンパニーサイト

ユニプロカンパニーサイトを公開しました。

まあ、まだ文章が当てだったり、「株式会社」はもう少し割きの話しだったりだけど、とりあえずあと1週間で完成させるぞ。
はやくインデックスしてほしいな。
ちなみにユニプロはソーシャルアプリ、iPhone/iPadアプリ、サイト製作を得意とする開発会社です。

No tags

4月/10

21

Twitter on CakePHP

TwitterのOAuthをCakePHPで使う方法。

http://code.42dh.com/oauth/から/vendorsにつっこむ。

ねむいので続きはまた今度。(更新予定)

· ·

Older posts >>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Theme Design by devolux.nh2.me