zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

PHP Notices when run by a daemon #98

Open ubellavance opened 7 years ago

ubellavance commented 7 years ago

When run by puppet as a daemon, a call to the phar sends a PHP Notice:

Jul 10 09:07:01 atqz9staging1 start-puppet-agent: PHP Notice:  Undefined index: HOMEDRIVE in phar:///usr/local/zend/var/libraries/ZendServerSDK/1.1.1a/library/zs-client.phar/module/Client/config/module.config.php on line 2
Jul 10 09:07:01 atqz9staging1 start-puppet-agent: PHP Notice:  Undefined index: HOMEPATH in phar:///usr/local/zend/var/libraries/ZendServerSDK/1.1.1a/library/zs-client.phar/module/Client/config/module.config.php on line 2

It caused problems when I was trying to create facts using the API, but that's behind me. However, these Notices show in /var/log/messsages(syslog on debian/ubuntu I guess). Would it be possible to set HOMEDRIVE to / if not defined and HOMEDRIVE to something that makes sense?

elmic11111 commented 11 months ago

I'm encountering this also on a Linus system when I bootstrapSingleServer.

` Notice: Undefined index: HOMEDRIVE in phar:///usr/local/zend/share/sdk/zs-client.phar/module/Client/config/module.config.php on line 2

Notice: Undefined index: HOMEPATH in phar:///usr/local/zend/share/sdk/zs-client.phar/module/Client/config/module.config.php on line 2

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in phar:///usr/local/zend/share/sdk/zs-client.phar/vendor/zendframework/zend-stdlib/src/ArrayObject.php on line 2 `

slaff commented 11 months ago

@elmic11111 try to replace this file /usr/local/zend/share/sdk/zs-client.phar with the latest version of the tool. The latest version can be downloaded from here: https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar