The script didn't work? It's independent of apache or other things as long as the DB information in the config.php file is correct, it should work ... it's just php talking to MySQL. So something is amiss there.
What does:
mysql> show engines;
show? If you see NO InnoDB then the rest of this will not work.
Other way IF InnoDB is shown in engines above:
Get an sql dump of current DB.
Edit sql dump with nano.
Search for "ENGINE" (case sensitive) to begin with to find that the engine is in that sql dump.
Then run a search and replace for 'ENGINE=whatever' replace with 'ENGINE=InnoDB' case sensitive AND must be accurate. Close gets you no cigar!
Replace ALL instances. That could be memory intensive depending on how large your SQL dump is. nano editing like this could push CPU to 100% at times. Might shut down apache for a while to get as much memory as possible to edit.
Save the sql file.
Drop the DB for the site.
Re-create an empty DB:
Login to mysql
from mysql> prompt ...
create database [nameofdb] character set utf8 collate utf8_unicode_ci;
\q to quit
Then import the edited sql file into the database.
'spirit of sharing', Ken