Closed NanoCaiordo closed 9 years ago
Hmm, I don't know why that would return false. The PHP docs say it returns false on failure, but does not really say why getopt would fail. http://php.net/getopt#refsect1-function.getopt-returnvalues
Can you try adding error_reporting(-1) to the file to show what PHP errors may be ocurring?
error_reporting(-1);
ini_set('error_log', '/var/log/gearman-manager.log');
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
exit(var_dump(getopt("ac:dD:h:Hl:o:p:P:u:v::w:r:x:Z")));
No errors on script start up apart the usual bool(false) and
cat /var/log/gearman-manager.log
is still empty (thus I did make sure that error_log('test') successfully wrote to gearman-manager.log which it did).
IIRC you need to set -v or -vv or -vvv in the params line in the init.d script
e.g. my init.d script for one of my workers contains this line.
PARAMS="-c ${CONFIGDIR}/config.ini -vvv"
On Thu, Apr 9, 2015 at 12:10 AM, Marco Pannetto notifications@github.com wrote:
error_reporting(-1); ini_set('error_log', '/var/log/gearman-manager.log'); ini_set('display_errors', 1); ini_set('display_startup_errors', 1);
cat /var/log/gearman-manager.log is still empty (thus I did make sure that error_log('test') successfully wrote to gearman-manager.log which it did).
— Reply to this email directly or view it on GitHub https://github.com/brianlmoon/GearmanManager/issues/113#issuecomment-91063948 .
Same problem, -vvv doesn't enable any verbose debugging.
The options go all the way up to -vvvvv try that first and then work backwards.
On Fri, Apr 10, 2015 at 5:32 AM, Marco Pannetto notifications@github.com wrote:
Same problem, -vvv doesn't enable any verbose debugging.
— Reply to this email directly or view it on GitHub https://github.com/brianlmoon/GearmanManager/issues/113#issuecomment-91426008 .
Nothing to do, but if I execute
/usr/local/bin/gearman-manager -P /var/run/gearman/manager.pid -l /var/log/gearman-manager.log -u gearmand -d -c /etc/gearman-manager/config.ini
then getopt() is properly filled. It is clear to me that daemon
doesn't let pass any parameter and logs are empty from relevant data.
Gearman-manager is not the issue, I've created a start up script and a php file and the problem persist. I'm closing this issue and opened one at php.net https://bugs.php.net/bug.php?id=69421
Cheers
Can you not upgrade your version of PHP? I'm running 5.6.7-1 here.
On Fri, Apr 10, 2015 at 6:34 PM, Marco Pannetto notifications@github.com wrote:
Gearman-manager is not the issue, I've created a start up script and a php file and the problem persist. I'm closing this issue and opened one at php.net https://bugs.php.net/bug.php?id=69421
Cheers
— Reply to this email directly or view it on GitHub https://github.com/brianlmoon/GearmanManager/issues/113#issuecomment-91630628 .
Upgrading to 5.5 was enough to fix it. Thank you.
Hello, I've recently installed GearmanManager on a CloudLinux Server release 6.6 X-Powered-By PHP/5.4.39 and it wasn't able to find the ./workers dir. I soon realized that none of the parameters was passed to the script.
/etc/rc.d/init.d/gearman-manager correctly try to daemonize the script with
deamon --pidfile=/var/run/gearman/manager.pid /usr/local/bin/gearman-manager -P /var/run/gearman/manager.pid -l /var/log/gearman-manager.log -u gearmand -d -c /etc/gearman-manager/config.ini
In /usr/local/share/gearman-manager/pecl-manager.php I've then placed
exit(var_dump(getopt("ac:dD:h:Hl:o:p:P:u:v::w:r:x:Z")));
and its output is:However
exit(var_dump($argv));
outputs: