Reputation: 31
I've just installed Vtiger 6.5 on windows xampp server, the installation went smoothly but as soon as I started the browser (localhost/vtigercrm) I get this error.
Fatal error: Cannot unset $this in C:\xampp\htdocs\vtigercrm\libraries\adodb\adodb-xmlschema.inc.php on line 160
Does anyone know what I've done wrong? I've downloaded and tried it several times, I've also changed the php.ini file according to the manual but doesn't seem to have an effect.
Upvotes: 0
Views: 4344
Reputation: 1922
This error may occurs in PHP 7 version. So proposed solution is below.
Please update that function with this one in file vtigercrm\libraries\adodb\adodb-xmlschema.inc.php on line 160
function Destroy() {
ini_set("magic_quotes_runtime", $this->mgq ); //Add this line
unset( $this );
}
Upvotes: 2
Reputation: 860
Open index.php
file in root and add below mentioned code at start of a file
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED & ~E_STRICT);
Open /libraries/adodb/adodb-xmlschema.inc.php
file and then
comment line 160
function destroy() {
//ini_set("magic_quotes_runtime", $this->mgq );
//unset( $this );
}
comment line 2214
function Destroy() {
//ini_set("magic_quotes_runtime", $this->mgq );
#set_magic_quotes_runtime( $this->mgq );
//unset( $this );
}
and then give 755 permission to /test folder
sudo chmod -R 755 test/
Upvotes: 0
Reputation: 1
This error occurs when vtiger 6.5 is installed on the PHP 7 installation. Comment the unset ($ this); in the function Destroy ()
Line 160 function destroy () { // unset ($ this); }
Line 2216 function destroy () { ini_set ("magic_quotes_runtime", $ this-> mgq); #set_magic_quotes_runtime ($ this-> mgq); //unset ($ this); }
Upvotes: 0
Reputation: 41
This issue seems to occur when we try to install vTiger6.5 in PHP 7. For me the vTiger6.5 got successfully installed after commenting the line number 160 and 2214.
Comment the Line number 160 and 2214 in the file vtigercrm\libraries\adodb\adodb-xmlschema.inc.php.
unset( $this ); /* comment this line no: 160 and 2214 */
Upvotes: 2
Reputation: 358
Based on my experience, changing PHP version to 5.6 (or 5.5 or 5.4) will solve your problem. Although Vtiger 6.5 is supposed to be compatible with php 7, in practice it is not.
Upvotes: 0