zfcampus / zf-console

Create console applications in PHP
BSD 3-Clause "New" or "Revised" License
64 stars 25 forks source link

Warning generated every time I use console #21

Closed GeeH closed 9 years ago

GeeH commented 9 years ago

Hello.

In multiple applications, every time I use a console route I get the following warning:

HP Warning:  cli_set_process_title(): cli_set_process_title had an error: Not initialized correctly in /Users/geeh/www/modules.zendframework.com/vendor/zfcampus/zf-console/src/Application.php on line 534

This happens both inside and outside of ZF2 app.

Thank you.

ArnaudLigny commented 9 years ago

Hello Gary, I have the same problem on my Mac: It seems this functionality is blocked for security reasons (by Apple).

While waiting to find a better solution, I work around the problem with @cli_set_proc_title().

RalfEggert commented 9 years ago

@GeeH can you confirm that your working on a Mac? Which PHP versions are you using?

RalfEggert commented 9 years ago

Same problem here with no real solution except using root

https://github.com/liip/php-osx/issues/139

GeeH commented 9 years ago

I can indeed - I’m using Mac OS X 10.10.3 and PHP version 5.6.5

On 25 April 2015 at 12:59:46, Ralf Eggert (notifications@github.com) wrote:

Same problem here with no real solution except using root

liip/php-osx#139

— Reply to this email directly or view it on GitHub.

RalfEggert commented 9 years ago

If you look at the method there is already a version check implemented.

https://github.com/zfcampus/zf-console/blob/master/src/Application.php#L528

Maybe we could add an OS check as well. Would PHP_OS be sufficient to identify Mac OS X? What do you get from var_dump(PHP_OS);?

Other suggestions to identify OS X?

RalfEggert commented 9 years ago

Or maybe php_uname() could do the job?

GeeH commented 9 years ago

string(6) “Darwin"

HTH :P On 25 April 2015 at 12:59:46, Ralf Eggert (notifications@github.com) wrote:

Same problem here with no real solution except using root

liip/php-osx#139

— Reply to this email directly or view it on GitHub.

RalfEggert commented 9 years ago

I will try to provide a fix later on...

RalfEggert commented 9 years ago

http://en.wikipedia.org/wiki/Darwin_%28operating_system%29