Sign in to follow this  
Followers 0

Update the UMI for php5.4


The Universal Mod installer will not function on php5.4 correctly, the usual symptoms are it falling over with invalid sql / syntax errors when attempting to install a modification with it.

 

The following changes will rectify this and have been tested with php5.4.3 with mysql 5.5.24. :)

 

Open /sources/components_acp/umi.php - Take a backup of this file before editing it!

1. Around line 350, find...

TYPE=MyISAM" ) );

Change to...
ENGINE=MyISAM" ) );


2. Around line 605, find...
// Remove the MySQL table types
$query = str_ireplace( 'TYPE=MyISAM', '', $query );
$query = str_ireplace( 'TYPE=INNODB', '', $query );
$query = str_ireplace( 'TYPE=HEAP'  , '', $query );

Change to...
// Remove the MySQL table types
$query = str_ireplace( 'ENGINE=MyISAM', '', $query );
$query = str_ireplace( 'ENGINE=INNODB', '', $query );
$query = str_ireplace( 'ENGINE=HEAP'  , '', $query );


3. Around line 1659, find...
$this->ipsclass->DB->query( $this->fix_create_table( "CREATE TABLE IF NOT EXISTS ".SQL_PREFIX.$v['name']['VALUE']." (".$v['data']['VALUE'].") TYPE=".$v['type']['VALUE'] ) );

Change to...
$this->ipsclass->DB->query( $this->fix_create_table( "CREATE TABLE IF NOT EXISTS ".SQL_PREFIX.$v['name']['VALUE']." (".$v['data']['VALUE'].") ENGINE=".$v['type']['VALUE'] ) );

 

Save / re-upload umi.php.


IllinoisDEV likes this


0 Comments

There are no comments to display.