[SOLVED] PHP-CLI Error "Zend Monitor UI is disabled"

General discussion forum for the Zend Server

[SOLVED] PHP-CLI Error "Zend Monitor UI is disabled"

Postby swafnil on Wed Dec 19, 2012 10:58 am

Good Morning,

my Zend Server 5.6 installation gives me the following message each time I try to run scripts on CLI:

Code: Select all
[19.12.2012 10:51:53 SYSTEM] Zend Monitor UI is disabled in CLI/CGI run...


I tried disabling Zend Monitor on the server administration page and also deactivated both Monitor and Monitor UI through editing monitor.ini and monitor_ui.ini, setting the "enabled" values to 0, still the message persists.

I know it's just a notification but it's still annoying, especially when evaluating CLI calls from CGI.

Thanks for help!

Regards, Sascha
swafnil
 
Posts: 4
Joined: Mon Feb 09, 2009 12:50 pm

Re: PHP-CLI notification message "Zend Monitor UI is disable

Postby zvika on Wed Dec 19, 2012 2:40 pm

Hi

I'm assuming you are on Windows, so please update if you're on another OS.
In general, when reporting issues or asking questions, try to elaborate more on the OS, Usage etc.

When running PHP CLI I get this:
Code: Select all
"c:\Program Files (x86)\Zend\ZendServer\bin\php.exe" -v
PHP 5.3.14 (cli) (built: Jun 18 2012 15:26:45)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Java Bridge v3.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Session Clustering v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Code Tracing v1.0, Copyright (c) 2009-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Monitor v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Cluster Utils v1.0.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Page Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Monitor UI extension v4.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]

As you can see, Monitor UI is working as expected.

Please provide your usage / how you run PHP-CLI, and try the command above.
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 796
Joined: Sun Dec 14, 2008 9:48 am

Re: PHP-CLI notification message "Zend Monitor UI is disable

Postby swafnil on Wed Dec 19, 2012 3:27 pm

Thanks again for the quick reply. As requested here's some more info about my system:

OS: Windows 7 x64
Webserver: Zend Server 5.6 with PHP 5.3 and Apache 2.2

Whenever I execute anything via CLI i.e. "php -r var_dump(123);", I first get the message
Code: Select all
[19.12.2012 15:11:37 SYSTEM] Zend Monitor UI is disabled in CLI/CGI run...


So this would be a complete script execution:

Code: Select all
C:\Users\Sascha>php -r var_dump(123);
[19.12.2012 15:11:37 SYSTEM] Zend Monitor UI is disabled in CLI/CGI run...
int(123)
swafnil
 
Posts: 4
Joined: Mon Feb 09, 2009 12:50 pm

Re: PHP-CLI notification message "Zend Monitor UI is disable

Postby zvika on Wed Dec 19, 2012 4:41 pm

Hi Sascha,
I need to understand the difference in command prompt outputs.

1. What is the output of the following commands on your regular Command Prompt (under C:\Users\Sascha>)?
2. What is the output of same lines on Admin console? To open Admin console from your user, right click "command prompt" under Start -> Programs -> Accessories, and click "run as administrator".

Code: Select all
echo %PATH%
"c:\Program Files (x86)\Zend\ZendServer\bin\php.exe" -v
php -v
php -i | find "Loaded Configuration File"
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 796
Joined: Sun Dec 14, 2008 9:48 am

Re: PHP-CLI notification message "Zend Monitor UI is disable

Postby swafnil on Wed Dec 19, 2012 7:31 pm

Hi Zvika,

thanks again for your help, here's the desired output:

Running in regular shell:

Code: Select all
C:\Users\Sascha>echo %PATH%
C:\Progra~2\Oracle\product\11.2.0\client_2;C:\Progra~2\Oracle\product\11.2.0\client_2\bin;C:\Program Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v
1.0\;C:\Program Files (x86)\Zend\ZendServer\bin;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;C:\Progra
m Files (x86)\Zend\MySQL51\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Progra
m Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program File
s (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Oracle\instantclient_
11_2

C:\Users\Sascha>"c:\Program Files (x86)\Zend\ZendServer\bin\php.exe" -v
[19.12.2012 19:29:46 SYSTEM] Zend Monitor UI is disabled in CLI/CGI run...
PHP 5.3.9-ZS5.6.0 (cli) (built: Feb 23 2012 11:12:13)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Session Clustering v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Optimizer+ v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Code Tracing v1.0, Copyright (c) 2009-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Monitor v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Cluster Utils v1.0.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Page Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Monitor UI extension v4.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]

C:\Users\Sascha>php -v
[19.12.2012 19:26:15 SYSTEM] Zend Monitor UI is disabled in CLI/CGI run...
PHP 5.3.9-ZS5.6.0 (cli) (built: Feb 23 2012 11:12:13)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Session Clustering v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Optimizer+ v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Code Tracing v1.0, Copyright (c) 2009-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Monitor v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Cluster Utils v1.0.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Page Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Monitor UI extension v4.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]


C:\Users\Sascha>php -i | find "Loaded Configuration File"
[19.12.2012 19:26:36 SYSTEM] Zend Monitor UI is disabled in CLI/CGI run...
Loaded Configuration File => C:\Program Files (x86)\Zend\ZendServer\etc\php.ini


Running admin shell:
Code: Select all
C:\Windows\system32>echo %PATH%
C:\Progra~2\Oracle\product\11.2.0\client_2;C:\Progra~2\Oracle\product\11.2.0\client_2\bin;C:\Program Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v
1.0\;C:\Program Files (x86)\Zend\ZendServer\bin;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\bin;C:\Progra
m Files (x86)\Zend\MySQL51\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Progra
m Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program File
s (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Oracle\instantclient_
11_2

C:\Windows\system32>"c:\Program Files (x86)\Zend\ZendServer\bin\php.exe" -v
PHP 5.3.9-ZS5.6.0 (cli) (built: Feb 23 2012 11:12:13)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Session Clustering v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Optimizer+ v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Code Tracing v1.0, Copyright (c) 2009-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Monitor v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Cluster Utils v1.0.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Page Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Monitor UI extension v4.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]


C:\Windows\system32>php -v
PHP 5.3.9-ZS5.6.0 (cli) (built: Feb 23 2012 11:12:13)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
    with Zend Extension Manager v5.1, Copyright (c) 2003-2010, by Zend Technologies
    - with Zend Data Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Job Queue v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Session Clustering v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Utils v1.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Optimizer+ v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Code Tracing v1.0, Copyright (c) 2009-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Monitor v4.1, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Debugger v5.3, Copyright (c) 1999-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Cluster Utils v1.0.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]
    - with Zend Page Cache v4.0, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [disabled]
    - with Zend Monitor UI extension v4.1, Copyright (c) 2004-2010, by Zend Technologies [loaded] [licensed] [enabled]


C:\Windows\system32>php -i | find "Loaded Configuration File"
Loaded Configuration File => C:\Program Files (x86)\Zend\ZendServer\etc\php.ini


How comes the message is only showing up when run in a regular shell? Permissions issue?
swafnil
 
Posts: 4
Joined: Mon Feb 09, 2009 12:50 pm

Re: PHP-CLI notification message "Zend Monitor UI is disable

Postby zvika on Thu Dec 20, 2012 8:25 am

Hi Sascha

Thanks for the feedback.

The problem you are showing is not being able to populate an error from PHP to the logs, and is basically a permission issue for the user running PHP.
System user which runs services (and Apache), and Admin user(s) can write to Zend Server logs at "C:\Program Files (x86)\Zend\ZendServer\logs".

If you right click on the monitor_ui.log file in the logs folder, and choose Properties, then check to go Security tab,
you will see that "Users" record only has Read permissions for that file, while System and Admin users have more access rights.

To resolve this, simply add Write permissions to the monitor_ui.log, for your own Windows User or the entire "Users" entity.

Note: When installing updates, most likely that the permissions will be reverted to default if the logs directory is refreshed,
so you can repeat this process if needed after applying updates.

[Update] Zend Server 6 beta does not contain this bug anymore.

Thanks Sascha for reporting this!
Zvika Dror
Zend Support Team
User avatar
zvika
Zend Global Support
 
Posts: 796
Joined: Sun Dec 14, 2008 9:48 am

Re: PHP-CLI notification message "Zend Monitor UI is disable

Postby swafnil on Thu Dec 20, 2012 8:54 am

Good Morning Zvika,

you were perfectly right with the wrong permissions on monitor_ui.log, after changing the permission specific for my user the error was gone.

That was a real good troubleshooting session, thanks a lot!

Cheers, Sascha

P.S. Could you update the thread title to include it has been solved? This could help other users find a solution easier. Thanks!
swafnil
 
Posts: 4
Joined: Mon Feb 09, 2009 12:50 pm

Re: [SOLVED] PHP-CLI Error "Zend Monitor UI is disabled"

Postby timo_karvinen on Thu Jan 17, 2013 4:29 pm

Hello.

I can verify both the error and the solution with IBM i version of Zend Server as well.
What makes this doubly annoying on IBM i is that when running in batch all those messages generate a spoolfile on QPRINT, if you are on i you know what that means.

Anyway, like I said this is the same error on IBM i, when the user running php-cli doesn't have permissions to write to log file /usr/local/zendsvr/var/log/monitor_ui.log this error is "displayed on screen" which means a spoolfile if running as batch job.
The problem goes away by giving write permissions to the logfile/directory for the user used to run php-cli scripts in qshell/pase.

-Timo
timo_karvinen
 
Posts: 74
Joined: Wed Aug 12, 2009 7:58 am
Location: Tampere, Finland


Return to Zend Server

Who is online

Users browsing this forum: No registered users and 3 guests