CONTENTS
Lastmodified 2015-09-13 (日) 08:03:13
OpenPNE 2 系(v2.14.1.1)のエラーログは、インストールディレクトリ内部に生成されます。具体的には /OpenPNE2_Install_directory/var/log。
で、デフォルトだとローテーションとかしないから、php のバージョンUPなどで、php_errors.logへのログ出力があると、肥大化する一方。(^^ゞ
PHP 5.4.45 (cli) (built: Sep 11 2015 09:22:30) なんかだと、こう
[12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isError() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/lib/include/DB/common.php on line 1014 [12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isError() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/lib/include/DB/common.php on line 1292 [12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isError() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/lib/include/DB.php on line 1387 [12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isError() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/webapp/lib/OpenPNE/DB.php on line 83 [12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isError() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/lib/include/DB/common.php on line 1397 [12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isError() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/lib/include/DB/common.php on line 1009 [12-Sep-2015 06:00:02 Asia/Tokyo] PHP Strict Standards: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible conte xt in /OpenPNE2_Install_directory/lib/include/DB/common.php on line 2195
↑この部分については、OpenPNE DB errorの項の対処で消えますが、
[13-Sep-2015 02:00:00 Asia/Tokyo] PHP Strict Standards: Non-static method OpenPNE_Config::getInstance() should not be called statically in /OpenPNE2_Install_directory/webapp/init.inc on line 93 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Strict Standards: Non-static method DB::connect() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/webapp/lib/OpenPNE/DB.php on line 60 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Strict Standards: Non-static method DB::parseDSN() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/DB.php on line 520 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/webapp/lib/OpenPNE/RSS.php on line 25 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 659 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1007 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1412 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1467 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1508 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1526 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1539 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1624 [13-Sep-2015 02:00:00 Asia/Tokyo] PHP Deprecated: Assigning the return value of new by reference is deprecated in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 1827 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::parse_date() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 3097 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::uncomment_rfc822() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 9203 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::parse_date() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 3097 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::uncomment_rfc822() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 9203 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::parse_date() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 3097 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::uncomment_rfc822() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 9203 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::parse_date() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 3097 [13-Sep-2015 02:00:01 Asia/Tokyo] PHP Strict Standards: Non-static method SimplePie_Misc::uncomment_rfc822() should not be called statically, assuming $this from incompatible context in /OpenPNE2_Install_directory/lib/include/simplepie.inc on line 9203
と言うログが延々と・・・。
で、このログを何とかしましょうということで、先ずはローテーションさせることに。
エラーローグの抑制も企んでいるので、一時間毎にローテーションさせながら対処方も探ることにするので、
/etc/newsyslog.conf
########## OpnePNE2 PHP ################# /OpenPNE2_Install_directory/var/log/php_errors.log 600 24 * 1 C
/usr/local/etc/php.ini
;error_reporting = E_ALL ;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED ;error_reporting = E_ALL & ~(E_NOTICE | E_DEPRECATED) error_reporting = E_ALL & ~(E_NOTICE | E_DEPRECATED | E_STRICT)
error_reportingを書き換えるもエラー出力変わらず。
total 7340249 -rw-r--r-- 1 www www 15630727 Aug 24 17:44 db_errors.log -rw------- 1 root www 378019 Sep 13 06:00 php_errors.log -rw------- 1 root www 128 Sep 13 06:00 php_errors.log.0 -rw------- 1 root www 229325 Sep 13 05:00 php_errors.log.1 -rw------- 1 root www 229325 Sep 12 20:00 php_errors.log.10 -rw------- 1 root www 229325 Sep 12 19:00 php_errors.log.11 -rw------- 1 root www 229325 Sep 12 18:00 php_errors.log.12 -rw------- 1 root www 229325 Sep 12 17:00 php_errors.log.13 -rw------- 1 root www 229325 Sep 12 16:00 php_errors.log.14 -rw------- 1 root www 229325 Sep 12 15:00 php_errors.log.15 -rw------- 1 root www 229325 Sep 12 14:00 php_errors.log.16 -rw------- 1 root www 229325 Sep 12 13:00 php_errors.log.17 -rw------- 1 root www 229325 Sep 12 12:00 php_errors.log.18 -rw------- 1 root www 229325 Sep 12 11:00 php_errors.log.19 -rw------- 1 root www 229325 Sep 13 04:00 php_errors.log.2 -rw------- 1 root www 152926 Sep 12 10:00 php_errors.log.20 -rw------- 1 www www 3849595 Sep 12 09:09 php_errors.log.21 -rw------- 1 root www 229325 Sep 13 03:00 php_errors.log.3 -rw------- 1 root www 229325 Sep 13 02:00 php_errors.log.4 -rw------- 1 root www 229325 Sep 13 01:00 php_errors.log.5 -rw------- 1 root www 229325 Sep 13 00:00 php_errors.log.6 -rw------- 1 root www 229324 Sep 12 23:00 php_errors.log.7 -rw------- 1 root www 229323 Sep 12 22:00 php_errors.log.8 -rw------- 1 root www 229324 Sep 12 21:00 php_errors.log.9 -rw-r--r-- 1 root www 7492061628 Sep 12 06:00 php_errors.log_bk -rw-r--r-- 1 root www 229197 Sep 12 07:00 php_errors.log_bk0 -rw-rw-rw- 1 root www 1 Sep 13 04:40 rss_cache.log
/var/log/php_errors.logの方にはエラー出力されていないので、OpenPNEのエラーは別の制御系かもしれません・・・?
エラーログの書き込みタイミングを見ていると、書き込みが20分毎・・・ということで、
/etc/crontab
########### 20111128 ##### #*/20 * * * * root sh /OpenPNE2_Install_directory/bin/tool_rss_cache.cron /OpenPNE2_Install_directory/bin/ /usr/local/bin/php > /dev/null 00 6 * * * root sh /OpenPNE2_Install_directory/bin/tool_send_daily_news.cron /OpenPNE2_Install_directory/bin/ /usr/local/bin/php | mail -s "daily news log" foo@smb.net
と、RSS出力をコメントアウトして停めたら、20分毎のログ出力は止まりました。
でもなぁ┐(´д`)┌ 根本的解決じゃないしなぁw 毎日6時にはエラーログ出るしなぁ・・・www
/usr/local/etc/php.ini の設定とは別の制御をされている・・・らしい、ということで、/OpenPNE2_Install_directory/config.php をみてみると(初めに見るべき?w)こんな記述が。
/OpenPNE2_Install_directory/config.php
/// // デバッグ、エラーハンドリング、ログ設定 /// error_reporting(E_ALL ^ E_NOTICE); switch(OPENPNE_DEBUGGING) { // テスト開発環境 case 2: $GLOBALS['SMARTY']['debugging'] = true; case 1: ini_set('display_errors', true); ini_set('log_errors', false); break; // 本番運用環境 case 0: default: ini_set('display_errors', false); ini_set('log_errors', true); ini_set('error_log', OPENPNE_VAR_DIR . '/log/php_errors.log'); break; }
なんだ、ちゃんとあるじゃない。
// error_reporting(E_ALL ^ E_NOTICE); error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
これでどうよ。
ということで、一件落着。きれいさっぱり消えました。
php_errors.log.0
Sep 13 07:00:00 blackcube newsyslog[61215]: logfile turned over Sep 13 08:00:00 blackcube newsyslog[66780]: logfile turned over
遠回りしたぁ・・・(^^ゞ
http://d.hatena.ne.jp/steel-plate/20080213/1202915669
Total access 2792:本日 1:昨日 0