BUG 10106 "Verify php settings" SOLVED
- New feature
- Verify php settings
- Added new feature
- Added new options in ADMIN>Settings:
* Check PM requirements
* PHP Information
* Available from version 2.0.46
This commit is contained in:
@@ -88,3 +88,8 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
|||||||
$G_TMP_MENU->AddIdRawOption('EMAILS', '../mails/emailList', ucfirst (strtolower ( G::LoadTranslation('ID_EMAILS'))), '', '', 'logs');
|
$G_TMP_MENU->AddIdRawOption('EMAILS', '../mails/emailList', ucfirst (strtolower ( G::LoadTranslation('ID_EMAILS'))), '', '', 'logs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($RBAC->userCanAccess("PM_SETUP") == 1) {
|
||||||
|
$G_TMP_MENU->AddIdRawOption("PM_REQUIREMENTS", "../setup/systemInfo", G::LoadTranslation("ID_PROCESSMAKER_REQUIREMENTS_CHECK"), "", "", "settings");
|
||||||
|
$G_TMP_MENU->AddIdRawOption("PHP_INFO", "../setup/systemInfo?option=php", G::LoadTranslation("ID_PHP_INFO"), "", "", "settings");
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ G::LoadClass( "configuration" );
|
|||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
if ($RBAC->userCanAccess( "PM_SETUP_ADVANCE" ) != 1) {
|
if ($RBAC->userCanAccess("PM_SETUP") != 1) {
|
||||||
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
|
G::SendTemporalMessage("ID_USER_HAVENT_RIGHTS_PAGE", "error", "labels");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
41
workflow/engine/methods/setup/systemInfo.php
Normal file
41
workflow/engine/methods/setup/systemInfo.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
$option = (isset($_GET["option"]))? $_GET["option"] : null;
|
||||||
|
|
||||||
|
switch ($option) {
|
||||||
|
case "phpinfo":
|
||||||
|
phpinfo();
|
||||||
|
break;
|
||||||
|
case "php":
|
||||||
|
$oHeadPublisher = &headPublisher::getSingleton();
|
||||||
|
$oHeadPublisher->addContent("setup/phpInfo"); //Adding a html file .html
|
||||||
|
$oHeadPublisher->addExtJsScript("setup/phpInfo", false); //Adding a javascript file .js
|
||||||
|
|
||||||
|
G::RenderPage("publish", "extJs");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
require_once (PATH_CONTROLLERS . "installer.php");
|
||||||
|
|
||||||
|
$installer = new Installer();
|
||||||
|
|
||||||
|
$systemInfo = $installer->getSystemInfo();
|
||||||
|
|
||||||
|
$oHeadPublisher = &headPublisher::getSingleton();
|
||||||
|
$oHeadPublisher->addContent("setup/systemInfo"); //Adding a html file .html
|
||||||
|
$oHeadPublisher->addExtJsScript("setup/systemInfo", false); //Adding a javascript file .js
|
||||||
|
|
||||||
|
$oHeadPublisher->assign("SYSINFO_PHP", "\"" . $systemInfo->php->version . "\", " . $systemInfo->php->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_MYSQL", "\"" . $systemInfo->mysql->version . "\", " . $systemInfo->mysql->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_MSSQL", "\"" . $systemInfo->mssql->version . "\", " . $systemInfo->mssql->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_CURL", "\"" . $systemInfo->curl->version . "\", " . $systemInfo->curl->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_OPENSSL", "\"" . $systemInfo->openssl->version . "\", " . $systemInfo->openssl->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_DOMXML", "\"" . $systemInfo->dom->version . "\", " . $systemInfo->dom->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_GD", "\"" . $systemInfo->gd->version . "\", " . $systemInfo->gd->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_MULTIBYTESTRING", "\"" . $systemInfo->multibyte->version . "\", " . $systemInfo->multibyte->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_SOAP", "\"" . $systemInfo->soap->version . "\", " . $systemInfo->soap->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_LDAP", "\"" . $systemInfo->ldap->version . "\", " . $systemInfo->ldap->result);
|
||||||
|
$oHeadPublisher->assign("SYSINFO_MEMORYLIMIT", "\"" . $systemInfo->memory->version . "\", " . $systemInfo->memory->result);
|
||||||
|
|
||||||
|
G::RenderPage("publish", "extJs");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -799,6 +799,17 @@ antes funcionaba.
|
|||||||
height:15px !important;
|
height:15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ICON_PM_REQUIREMENTS{
|
||||||
|
/*ss_wrench*/
|
||||||
|
background-image: url(/images/icons_silk/sprites.png) !important;
|
||||||
|
background-position:0 -17821px !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.ICON_PHP_INFO{
|
||||||
|
background-image: url(/images/documents/extension/php.png) !important;
|
||||||
|
width: 16px !important;
|
||||||
|
height: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Language Support module styles*/
|
/* Language Support module styles*/
|
||||||
.upload-icon {
|
.upload-icon {
|
||||||
|
|||||||
@@ -824,6 +824,17 @@ antes funcionaba.
|
|||||||
height:15px !important;
|
height:15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ICON_PM_REQUIREMENTS{
|
||||||
|
/*ss_wrench*/
|
||||||
|
background-image: url(/images/icons_silk/sprites.png) !important;
|
||||||
|
background-position:0 -17821px !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.ICON_PHP_INFO{
|
||||||
|
background-image: url(/images/documents/extension/php.png) !important;
|
||||||
|
width: 16px !important;
|
||||||
|
height: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Language Support module styles*/
|
/* Language Support module styles*/
|
||||||
.upload-icon {
|
.upload-icon {
|
||||||
|
|||||||
@@ -796,6 +796,17 @@ antes funcionaba.
|
|||||||
height:15px !important;
|
height:15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ICON_PM_REQUIREMENTS{
|
||||||
|
/*ss_wrench*/
|
||||||
|
background-image: url(/images/icons_silk/sprites.png) !important;
|
||||||
|
background-position:0 -17821px !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.ICON_PHP_INFO{
|
||||||
|
background-image: url(/images/documents/extension/php.png) !important;
|
||||||
|
width: 16px !important;
|
||||||
|
height: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* Language Support module styles*/
|
/* Language Support module styles*/
|
||||||
.upload-icon {
|
.upload-icon {
|
||||||
|
|||||||
@@ -434,6 +434,8 @@ cron.application = {
|
|||||||
],
|
],
|
||||||
bbar: pagingCron,
|
bbar: pagingCron,
|
||||||
|
|
||||||
|
border: false,
|
||||||
|
|
||||||
title: _("ID_CRON_ACTIONS_LOG"),
|
title: _("ID_CRON_ACTIONS_LOG"),
|
||||||
|
|
||||||
listeners: {
|
listeners: {
|
||||||
|
|||||||
1
workflow/engine/templates/setup/phpInfo.html
Normal file
1
workflow/engine/templates/setup/phpInfo.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<div></div>
|
||||||
38
workflow/engine/templates/setup/phpInfo.js
Normal file
38
workflow/engine/templates/setup/phpInfo.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
Ext.namespace("phpInfo");
|
||||||
|
|
||||||
|
phpInfo.application = {
|
||||||
|
init: function ()
|
||||||
|
{
|
||||||
|
//Components
|
||||||
|
var pnlMain = new Ext.Panel({
|
||||||
|
id: "pnlMain",
|
||||||
|
|
||||||
|
layout: "border",
|
||||||
|
|
||||||
|
border: false,
|
||||||
|
title: _("ID_PHP_INFO"),
|
||||||
|
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype: "panel",
|
||||||
|
|
||||||
|
region: "center",
|
||||||
|
|
||||||
|
margins: {top: 10, right: 10, bottom: 10, left: 10},
|
||||||
|
border: false,
|
||||||
|
|
||||||
|
html: "<iframe src=\"../setup/systemInfo?option=phpinfo\" width=\"100%\" height=\"100%\" frameborder=\"0\" style=\"border: 0;\"></iframe>"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
//Load all panels
|
||||||
|
var viewport = new Ext.Viewport({
|
||||||
|
layout: "fit",
|
||||||
|
items: [pnlMain]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ext.onReady(phpInfo.application.init, phpInfo.application);
|
||||||
|
|
||||||
1
workflow/engine/templates/setup/systemInfo.html
Normal file
1
workflow/engine/templates/setup/systemInfo.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<div></div>
|
||||||
193
workflow/engine/templates/setup/systemInfo.js
Normal file
193
workflow/engine/templates/setup/systemInfo.js
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
Ext.namespace("systemInfo");
|
||||||
|
|
||||||
|
systemInfo.application = {
|
||||||
|
init: function ()
|
||||||
|
{
|
||||||
|
var loadMaskSystemInfo = new Ext.LoadMask(Ext.getBody(), {msg: _("ID_CHECKING")});
|
||||||
|
|
||||||
|
systemInfoProcessAjax = function (option)
|
||||||
|
{
|
||||||
|
var url = "";
|
||||||
|
|
||||||
|
loadMaskSystemInfo.show();
|
||||||
|
|
||||||
|
switch (option) {
|
||||||
|
case "SYS":
|
||||||
|
url = "../installer/getSystemInfo"
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: url,
|
||||||
|
method: "POST",
|
||||||
|
|
||||||
|
success: function (response, opts)
|
||||||
|
{
|
||||||
|
var dataResponse = eval("(" + response.responseText + ")"); //json
|
||||||
|
|
||||||
|
switch (option) {
|
||||||
|
case "SYS":
|
||||||
|
Ext.getCmp("php").setValue(fieldFormatValue(dataResponse.php.version, dataResponse.php.result));
|
||||||
|
Ext.getCmp("mysql").setValue(fieldFormatValue(dataResponse.mysql.version, dataResponse.mysql.result));
|
||||||
|
//Ext.getCmp("mssql").setValue(fieldFormatValue(dataResponse.mssql.version, dataResponse.mssql.result));
|
||||||
|
Ext.getCmp("curl").setValue(fieldFormatValue(dataResponse.curl.version, dataResponse.curl.result));
|
||||||
|
Ext.getCmp("openssl").setValue(fieldFormatValue(dataResponse.openssl.version, dataResponse.openssl.result));
|
||||||
|
Ext.getCmp("dom").setValue(fieldFormatValue(dataResponse.dom.version, dataResponse.dom.result));
|
||||||
|
Ext.getCmp("gd").setValue(fieldFormatValue(dataResponse.gd.version, dataResponse.gd.result));
|
||||||
|
Ext.getCmp("multibyte").setValue(fieldFormatValue(dataResponse.multibyte.version, dataResponse.multibyte.result));
|
||||||
|
Ext.getCmp("soap").setValue(fieldFormatValue(dataResponse.soap.version, dataResponse.soap.result));
|
||||||
|
Ext.getCmp("ldap").setValue(fieldFormatValue(dataResponse.ldap.version, dataResponse.ldap.result));
|
||||||
|
Ext.getCmp("memory").setValue(fieldFormatValue(dataResponse.memory.version, dataResponse.memory.result));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
loadMaskSystemInfo.hide();
|
||||||
|
},
|
||||||
|
failure: function (response, opts)
|
||||||
|
{
|
||||||
|
loadMaskSystemInfo.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
fieldFormatValue = function (str, sw)
|
||||||
|
{
|
||||||
|
var img = "delete.png";
|
||||||
|
var size = "width=\"15\" height=\"15\"";
|
||||||
|
var color = "red";
|
||||||
|
|
||||||
|
if (sw == true || sw == 1) {
|
||||||
|
img = "dialog-ok-apply.png";
|
||||||
|
size = "width=\"12\" height=\"12\"";
|
||||||
|
color = "green";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<span style=\"color: " + color + ";\">" + str + "</span> <img src=\"/images/" + img + "\" " + size + " alt=\"\" />";
|
||||||
|
};
|
||||||
|
|
||||||
|
//Components
|
||||||
|
var pnlWest = new Ext.Panel({
|
||||||
|
id: "pnlWest",
|
||||||
|
|
||||||
|
region: "west",
|
||||||
|
|
||||||
|
margins: {top: 10, right: 0, bottom: 10, left: 10},
|
||||||
|
border: false,
|
||||||
|
bodyStyle: "padding: 10px; font: 0.80em arial;",
|
||||||
|
width: 250,
|
||||||
|
|
||||||
|
html: _("ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION")
|
||||||
|
});
|
||||||
|
|
||||||
|
var frmfsCenter = new Ext.form.FieldSet({
|
||||||
|
id: "frmfsCenter",
|
||||||
|
|
||||||
|
region: "center",
|
||||||
|
|
||||||
|
margins: {top: 10, right: 10, bottom: 10, left: 0},
|
||||||
|
border: false,
|
||||||
|
labelWidth: 200,
|
||||||
|
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "php",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_PHP"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_PHP + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "mysql",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MYSQL"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_MYSQL + ");")
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "mssql",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MSSQL"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_MSSQL + ");")
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "curl",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_CURL"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_CURL + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "openssl",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_OPENSSL"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_OPENSSL + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "dom",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_DOMXML"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_DOMXML + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "gd",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_GD"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_GD + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "multibyte",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MULTIBYTESTRING"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_MULTIBYTESTRING + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "soap",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_SOAP"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_SOAP + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "ldap",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_LDAP"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_LDAP + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
id: "memory",
|
||||||
|
fieldLabel: _("ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT"),
|
||||||
|
value: eval("fieldFormatValue(" + SYSINFO_MEMORYLIMIT + ");")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: "displayfield",
|
||||||
|
fieldLabel: "",
|
||||||
|
},
|
||||||
|
new Ext.Button({
|
||||||
|
text: _("ID_CHECK_AGAIN"),
|
||||||
|
handler: function () {
|
||||||
|
systemInfoProcessAjax("SYS");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
var pnlMain = new Ext.Panel({
|
||||||
|
id: "pnlMain",
|
||||||
|
|
||||||
|
layout: "border",
|
||||||
|
|
||||||
|
border: false,
|
||||||
|
title: _("ID_PROCESSMAKER_REQUIREMENTS_CHECK"),
|
||||||
|
|
||||||
|
items: [pnlWest, frmfsCenter]
|
||||||
|
});
|
||||||
|
|
||||||
|
//Load all panels
|
||||||
|
var viewport = new Ext.Viewport({
|
||||||
|
layout: "fit",
|
||||||
|
items: [pnlMain]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ext.onReady(systemInfo.application.init, systemInfo.application);
|
||||||
|
|
||||||
Reference in New Issue
Block a user