How can I receive the Zend Server version by a PHP script running on this Zend Server?
phpinfo() and the commandline php -v
does not tell the Zend Server version!
How can I receive the Zend Server version by a PHP script running on this Zend Server?
phpinfo() and the commandline php -v
does not tell the Zend Server version!
You cannot derive the Server version from phpinfo
(or the environment for that matter).
I assume you are after the values that are displayed in the Server Control GUI at Monitor | Server Info, e.g. version
and build
. They are stored in in $InstallDir/GUI/application/data/zend-server.ini
. Your application has to have access to the folder where the Ini is located, load the Ini file (with something like Zend_Config) and then you can work with the values.
Note that ZS is build with ZF and the files are not obfuscated, so you can check out their source code to see how they access this information. Might very well be possible to reuse some of their code.
A quick and dirty way to get it:
$ cat /usr/local/zend/gui/application/data/zend-server.ini | grep version
Here you would replace /usr/local/zend
with whatever alternative path you might have chosen.
And you ll get some output like:
version = 5.6.0
You can use the following command: echo Zend_Version::VERSION;
Open the zend server .ini file (zs_ui.ini
) and find version
.
...endendServerguiconfigzs_ui.ini
Example:
zend_gui.version = 9.0.1
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
I found this script online that creates a thumbnail out of a image but the thumbnail image is created with poor quality how can I improve the quality of the image. And is there a better way to create ...
如何确认来自正确来源的数字。
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...
I wonder there is a way to post a message to a facebook business page with cURL? thanks
I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...
How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...