[PHP-dev 912]Re: システムログについて

Tadashi Jokagi ml @ elf.no-ip.org
2003年 10月 17日 (金) 12:11:21 JST


      ぢょ〜@よくきたなです.
      ここは「PHP 自体の開発のためのメーリングリスト」です. 「PHP の使
    い方」的な質問は php-users でされるといいと思います.

呂 亜強さんの「[PHP-dev 911] システムログについて」から
>システムログに出力するプログラムをしています、なかなかうまくいきませんでした。
>ログファイルはsyslog.confに指定されていますけれども、書かれてないんです。
>syslog.confにログファイルを設定したら、PHPサーバーがもう一回起動する必要が
>ありますか。syslog関数の戻り値はないですか、成功するかどうかどのように確認します

      PHP サーバーはウェブサーバーのことなら php.ini の編集や
    httpd.conf などの編集をした場合は再起動の必要があるでしょう.
    syslog.conf を編集したなら syslogd の再起動は必要ないんですか? 必要
    ならしましたか?

      とかいいながら syslog に詳しくないんですが, 簡単に実験したところ
    こちらでは記録されています.

[elf @ server elf]$ sudo tail -f /var/log/messages&
[elf @ server elf]$ php -r 'syslog( LOG_NOTICE, "test");'
Oct 17 12:05:53 server php: test

    こちらの環境は下記のような感じです.

OS: Red Hat 9(rawhide入り)
PHP: 4.3.3(今回の環境はrawhideのphpのsrpmをカスタマイズ・ビルドしました)
apache: 1.3.27(Red Hat 7.3用アップデートのsrpmをカスタマイズビルドしました)
#今回CLIでやったんでapache関係ないけど

    configure はこんな感じみたいです(もう覚えてない)

[elf @ server elf]$ php -r "phpinfo();"|grep configure
Configure Command =>  './configure' '--host=i686-pc-linux-gnu' 
'--build=i686-pc-linux-gnu' '--target=i386-redhat-linux-gnu' 
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' 
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' 
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' 
'--libexecdir=/usr/libexec' '--localstatedir=/var' 
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man' 
'--infodir=/usr/share/info' '--prefix=/usr' 
'--with-config-file-path=/etc' '--enable-force-cgi-redirect' 
'--disable-debug' '--enable-pic' '--disable-rpath' 
'--enable-inline-optimization' '--enable-mbstring' '--with-bz2' 
'--with-db4' '--with-curl' '--with-dom=/usr' 
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' 
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' 
'--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' 
'--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' 
'--with-png' '--with-pspell' '--with-regex=system' '--with-xml' 
'--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' 
'--enable-bcmath' '--enable-exif' '--enable-ftp' 
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' 
'--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' 
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' 
'--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' 
'--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' 
'--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' 
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' 
'--enable-shmop' '--enable-versioning' '--enable-calendar' 
'--enable-dbx' '--enable-dio' '--enable-mcal' 
'--with-apxs=/usr/sbin/apxs'

    もっと突っ込んだ話は php-users なりでどうぞ.

----.----1----.----2----.----3----.----4----.----5----.----6----.----7
Tadashi Jokagi/Shibuya city mailto:elf @ elf.no-ip.org
Yokukitana http://elf.no-ip.org/
Yokukitana with PukiWiki http://elf.no-ip.org/puki/


PHP-dev メーリングリストの案内