[Vtigercrm-commits] [vtiger development] #7618: 3 Changes / fixes to support PHP v5.4
vtiger development
vtiger-tickets at trac.vtiger.com
Tue Dec 11 07:20:41 PST 2012
#7618: 3 Changes / fixes to support PHP v5.4
-------------------------+--------------------------------------------------
Reporter: djantje | Owner: developer
Type: enhancement | Status: new
Priority: unassigned | Milestone: Unassigned
Component: vtigercrm | Version: 5.4.0
Severity: Medium | Keywords: php54
-------------------------+--------------------------------------------------
First, a few packages should first be upgraded (didn't test this)
http://trac.vtiger.com/svn/vtiger/vtigercrm/trunk/DEPENDENCIES.txt
All the specified dependencies are outdated, according to the
DEPENDENCIES.txt most of them are changed ny Vtiger, I have not tested the
latest packes.
For PHP 5.4 compatability 3 Fixes
[1] Change the overwriting global variable $_FILES
file:
include/utils/CommonUtils.php
function SaveImage($_FILES .. )
change the variable $_FILES to a non global; like $_FILESNG
[2] session_unregister (function removed as of PHP 5.4)
See https://forums.vtiger.com/viewtopic.php?f=15&t=53739
modules/Users/Authenticate.php
session_unregister('var');
change to
unset($_SESSION['var']);
[3] Change split function (doesn't exist/work in PHP 5.4)
(linux search to find files using split, excluding preg_split)
find /var/www/vtigercrm/ -iname '*php' | xargs grep -i ' split(' -ls
Affected files:
adodb/adodb-datadict.inc.php
adodb/adodb-perf.inc.php
adodb/drivers/adodb-informix72.inc.php
adodb/drivers/adodb-ldap.inc.php
adodb/drivers/adodb-postgres64.inc.php
include/ChartUtils.php
include/ListView/ListViewPagging.php
include/nusoap/class.soap_transport_http.php
include/nusoap/nusoap.php
include/php_writeexcel/class.writeexcel_formula.inc.php
include/php_writeexcel/class.writeexcel_worksheet.inc.php
include/tcpdf/tcpdf.php
include/utils/InventoryUtils.php
include/utils/utils.php
modules/Calendar/DetailView.php
modules/Calendar/iCalExport.php
modules/Calendar/ListView.php
modules/Calendar/RepeatEvents.php
modules/Documents/Documents.php
modules/HelpDesk/HelpDesk.php
modules/Migration/DBChanges/504_to_510rc.php
modules/Migration/DBChanges/510rc_to_510.php
modules/Mobile/third-party/qCal/qCal/Date.php
modules/Reports/AdvancedFilter.php
modules/Reports/CustomReportUtils.php
modules/Reports/DuplicateReport.php
modules/Reports/NewReport0.php
modules/Reports/ReportRun.php
modules/Reports/Reports.php
modules/Reports/Save.php
modules/Reports/SaveAndRun.php
modules/SMSNotifier/ext/providers/ClickATell.php
modules/System/includes/common_functions.php
modules/System/includes/mb/class.mbm5.inc.php
modules/System/includes/os/class.BSD.common.inc.php
modules/System/includes/os/class.Darwin.inc.php
modules/System/includes/os/class.FreeBSD.inc.php
modules/System/includes/os/class.HP-UX.inc.php
modules/System/includes/os/class.Linux.inc.php
modules/System/includes/os/class.NetBSD.inc.php
modules/System/includes/os/class.OpenBSD.inc.php
modules/System/includes/os/class.parseProgs.inc.php
modules/System/includes/os/class.SunOS.inc.php
modules/System/systemconfig.php
modules/Users/getListOfRecords.php
modules/Webmails/MailBox.php
Popup.php
Smarty/libs/plugins/function.fetch.php
vtlib/ModuleDir/5.0.4/ListView.php
vtlib/ModuleDir/5.1.0/ListView.php
vtlib/Vtiger/Filter.php
vtlib/Vtiger/LanguageImport.php
adodb/adodb-datadict.inc.php
change
list(,$column_def) = split("[\t ]+",$first,2);
to
list(,$column_def) = preg_split("/[\t| ]/",$first,2);
rename the functions using the split() function like this:
Empty expressions:
$array = split('',$var);
to
$array = str_split($var);
Not empty, but simple expressions like:
$array = split('expression',$var [, limit] );
to
$array = explode('expression',$var [, limit] ); (just change explode to
split)
After these changes, Vtiger 5.4 and Vtiger 6.0
(http://trac.vtiger.com/svn/vtiger/vtigercrm/branches/6.0.0/)
do run on PHP 5.4 (Debian Linux, PHP 5.4.4)
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7618>
vtiger development <http://trac.vtiger.com/>
vtiger CRM
More information about the vtigercrm-commits
mailing list