Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0

Bug #15926 can't pid file option setting
Submitted: 2009-02-22 14:36 UTC
From: neta Assigned: kvz
Status: Closed Package: System_Daemon
PHP Version: 5.2.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 13 + 27 = ?

 
 [2009-02-22 14:36 UTC] neta (neta wat)
Description: ------------ Is this a bug ? or my code is wrong? Test script: --------------- <?php require_once("System/Daemon.php"); System_Daemon::setOption("appName", "mydaemon"); System_Daemon::setOption("appPidLocation", "/tmp/mydaemon.pid"); System_Daemon::setOption("logLocation", "/tmp/mydaemon.log"); System_Daemon::start(); // ?> Expected result: ---------------- (No error occur) Actual result: -------------- $ php daemon.php [Feb 22 18:33:05] info: starting mydaemon daemon, output in: /tmp/mydaemon.log PHP Fatal error: Uncaught System_Daemon_Exception: [Feb 22 18:33:05] emerg: mydaemon daemon was unable to write pid file [l:959] in /usr/local/lib/php/System/Daemon.php on line 959 #0 /usr/local/lib/php/System/Daemon.php(959): System_Daemon::log(0, 'mydaemon daemon...') #1 /usr/local/lib/php/System/Daemon.php(457): System_Daemon::_summon() #2 /home/watanabe/tmp/daemon.php(6): System_Daemon::start() #3 {main} thrown in /usr/local/lib/php/System/Daemon.php on line 701 Fatal error: Uncaught System_Daemon_Exception: [Feb 22 18:33:05] emerg: mydaemon daemon was unable to write pid file [l:959] in /usr/local/lib/php/System/Daemon.php on line 959 #0 /usr/local/lib/php/System/Daemon.php(959): System_Daemon::log(0, 'mydaemon daemon...') #1 /usr/local/lib/php/System/Daemon.php(457): System_Daemon::_summon() #2 /home/watanabe/tmp/daemon.php(6): System_Daemon::start() #3 {main} thrown in /usr/local/lib/php/System/Daemon.php on line 701

Comments

 [2009-02-23 03:04 UTC] kvz (Kevin van Zonneveld)
-Status: Open +Status: Feedback
Thank you for taking the time to report a problem with the package. Unfortunately you are not using a current version of the package -- the problem might already be fixed. Please download a new version from http://pear.php.net/packages.php If you are able to reproduce the bug with one of the latest versions, please change the package version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PEAR. The most recent version of System_Daemon should give the error: Since version 0.6.3, the pidfile needs to be in it's own subdirectory like: /tmp/mydaemon/mydaemon.pid [l:961] in /home/kevin/workspace/plutonia-system_daemon/System/Daemon.php on line 961 So this indicates that you're not using the latest version. Please upgrade, place the .pid in it's own subdirectory and try again. If it still fails reopen this issue.
 [2009-02-23 03:04 UTC] kvz (Kevin van Zonneveld)
-Assigned To: +Assigned To: kvz
 [2009-02-23 03:05 UTC] kvz (Kevin van Zonneveld)
-Status: Feedback +Status: Closed
 [2009-02-23 18:22 UTC] neta (neta wat)
-Status: Closed +Status: Open
Hi. Thank you for your response. I have confirmed the version of System_Daemon module files on my machine, but it is latest version , 0.6.9 ! I got the md5sum below. $ find /usr/local/lib/php/System -type f | xargs md5sum e3b1b1d61697676d0a4264de8baf29cf /usr/local/lib/php/System/Daemon/OS/Debian.php cbcf98a6693a16198b13f9d6f9a0303c /usr/local/lib/php/System/Daemon/OS/Exception.php dd90a14739a8f3540eaa59f017e0c4e3 /usr/local/lib/php/System/Daemon/OS/Linux.php 0514bfd37bedacb34aea78c9efb5304e /usr/local/lib/php/System/Daemon/OS/RedHat.php 1a4d4ab2b01defb0f5abf8a483403330 /usr/local/lib/php/System/Daemon/OS/Ubuntu.php 971d6196f64970f82c3d85aa2d018d1e /usr/local/lib/php/System/Daemon/OS/Windows.php 19f236f7723a4be0a38a7c8f18609c84 /usr/local/lib/php/System/Daemon/OS/BSD.php 59ec525d1c00abe6eee00a124faaa0cd /usr/local/lib/php/System/Daemon/Options.php d6e6d48091935a375b2159e7b12234b2 /usr/local/lib/php/System/Daemon/OS.php 4ced99054500109a304c2b011dc9ffd2 /usr/local/lib/php/System/Daemon/Exception.php 7663d1d63c6b294274c5a26e30a14fcd /usr/local/lib/php/System/Daemon.php
 [2009-02-23 18:51 UTC] kvz (Kevin van Zonneveld)
Thank you for the hashes, that really makes sure you're running the latest. Maybe the output is in your logfile /tmp/mydaemon.log ? Have you read that? Anyway, have you already tried moving the pid file to it's own subdir?
 [2009-02-23 20:34 UTC] kvz (Kevin van Zonneveld)
-Status: Assigned +Status: Feedback
 [2009-03-26 14:18 UTC] kvz (Kevin van Zonneveld)
-Status: Feedback +Status: No Feedback
 [2009-03-26 14:18 UTC] kvz (Kevin van Zonneveld)
-Status: No Feedback +Status: Closed