zikula / zikula-standard

Zikula Distribution metadata and built at CI server.
http://zikula.org/
7 stars 1 forks source link

Installation fails on MySQL #4

Open tebbenhof opened 12 years ago

tebbenhof commented 12 years ago

Just installed Zikula_Standard-1.3.4-1/1435 on PHP 5.3.5 / MySQL 5.1.63, using dbname local_zikula-13

I got an error that SHOW TABLES FROM local_zikula-13 LIKE '%' could not be executed on my database (MySQL on localhost). This was due to the backticks not being present in the query.

In src/install/lib.php line 210, I modified the code so it reads now:

    $dbnameConfig = $GLOBALS['ZConfig']['DBInfo']['databases']['default']['dbname'];
    $dbdriverConfig = $GLOBALS['ZConfig']['DBInfo']['databases']['default']['dbdriver'];
    $exec = ($dbdriverConfig == 'mysql' || $dbdriverConfig == 'mysqli') ?
            "SHOW TABLES FROM `$dbnameConfig` LIKE '%'" :
            "SHOW TABLES FROM $dbnameConfig LIKE '%'";
    $tables = DBUtil::executeSQL($exec);

Installation now succeeds.

ghost commented 12 years ago

Can you make a PR for core (and this repo since there is a temporary hacked lib.php).

tebbenhof commented 12 years ago

I just created my very first PR at https://github.com/zikula/core/pull/531 For this repo, do I need to create a second fork for Zikula-Standard, and re-do these steps again?

ghost commented 12 years ago

Yes please.