• Hey – there seems to be quite a number of posts about this online, but none of them with a solution. Has anyone got any advice for a newbie here on how to use this awesome looking plug-in?

    After activating the plug-in, all I get is: NextGEN Gallery : Tables could not created, please check your database settings at the top, and my gallery wont work.

    I’m using WordPress version 3.0.1, and NextGEN 1.5.5. Any help would be much appreciated.
    Thank you
    – Iestyn

    https://www.ads-software.com/extend/plugins/nextgen-gallery/

Viewing 15 replies - 1 through 15 (of 41 total)
  • Thread Starter IestynR

    (@iestynr)

    Anyone got anything on this? ANy help would be super awesome.

    Experiencing the same issue.

    I’m using WordPress version 3.0.1, and NextGEN 1.6.0

    Couldn’t find any solid answer to this so far ??

    Any thoughts would be appreciated
    Thanks,
    Darius.

    To be exact, I have downloaded and installed nextgen-gallery 1.6.2 on my first wordpress installation on this machine, and it worked fine.

    Tried to install the plugin on my second wp website on the same machine. After activating I get the following message:

    “Please update the database of NextGEN Gallery. Click here to proceed.”

    “NextGEN Gallery : Tables could not created, please check your database settings”

    when I click on the link I get the below message:

    “The script detect that you upgrade from a older version. Your database tables for NextGEN Gallery is out-of-date, and must be upgraded before you can continue. If you would like to downgrade later, please make first a complete backup of your database and the images.

    The upgrade process may take a while, so please be patient.

    Start upgrade now…

    When click on “Start upgrade now…” it goes to next error message as below:

    Could not find NextGEN Gallery database tables, upgrade failed !

    Upgrade finished…

    I am hosting both versions locally (local.site.v1 $ local.site.v2)
    they have separate databases (wordpres £ mysiteV4)
    table_prefix for wordpres database is wp_
    table_prefix for mysiteV4 database is wpV4_

    ————- ————- ————- ————-

    So far….

    I have deactivated the plugin on both sites and activated it on the second one only; didn’t work!

    Tried also deleting and manually recreating the database tables as some suggested in following threads:

    https://www.ads-software.com/support/topic/nextgen-gallery-tables-could-not-created-please-check-your-database-settings-3?replies=9

    https://www.ads-software.com/support/topic/nextgen-gallery-tables-could-not-created-please-check-your-database-settings-1?replies=10

    also tried changing the database charset to latin1 and utf8 and back with no joy.

    …and next I will probably plan banging my head against a solid wall :/

    thoughts would still be highly appreciated…

    test if it only works for the prefix “wp_” normally I used the correct code, but this could be oone idea (maybe)

    Thanks for the reply Alex,

    Here is what I did based on your suggestion:

    • Deactivated the plugin on both sites.
    • Manually created 3 database tables, with wp_ prefix based on the code in install.php for version 1.6.2 as follow:
      CREATE TABLE wp_ngg_gallery (
              gid BIGINT(20) NOT NULL AUTO_INCREMENT ,
              name VARCHAR(255) NOT NULL ,
              path MEDIUMTEXT NULL ,
              title MEDIUMTEXT NULL ,
              galdesc MEDIUMTEXT NULL ,
              pageid BIGINT(20) DEFAULT '0' NOT NULL ,
              previewpic BIGINT(20) DEFAULT '0' NOT NULL ,
              author BIGINT(20) DEFAULT '0' NOT NULL  ,
              PRIMARY KEY gid (gid)
              );
      
      CREATE TABLE wp_ngg_album (
              id BIGINT(20) NOT NULL AUTO_INCREMENT ,
              name VARCHAR(255) NOT NULL ,
              previewpic BIGINT(20) DEFAULT '0' NOT NULL ,
              albumdesc MEDIUMTEXT NULL ,
              sortorder LONGTEXT NOT NULL,
              pageid BIGINT(20) DEFAULT '0' NOT NULL,
              PRIMARY KEY id (id)
              );
      
      CREATE TABLE wp_ngg_pictures (
              pid BIGINT(20) NOT NULL AUTO_INCREMENT ,
              post_id BIGINT(20) DEFAULT '0' NOT NULL ,
              galleryid BIGINT(20) DEFAULT '0' NOT NULL ,
              filename VARCHAR(255) NOT NULL ,
              description MEDIUMTEXT NULL ,
              alttext MEDIUMTEXT NULL ,
              imagedate DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
              exclude TINYINT NULL DEFAULT '0' ,
              sortorder BIGINT(20) DEFAULT '0' NOT NULL ,
              meta_data LONGTEXT,
              PRIMARY KEY pid (pid),
              KEY post_id (post_id)
              );
    • after tables were successfully created, activated the plugin on my local.site.v2 but still experiencing the exact same issue.
    • Next, i tried to find the code that leads to “Please update the database of NextGEN Gallery… ” error.
    • Found the code in install.php as follow and commented it out (out of curiosity ??
      // check one table again, to be sure
          if($wpdb->get_var("show tables like '$nggpictures'")!= $nggpictures) {
              update_option( "ngg_init_check", __('NextGEN Gallery : Tables could not created, please check your database settings',"nggallery") );
              return;
          }
    • …And the plugin works! ??
    • I deleted the new tables with wp_ prefix, and the plugin still works!
    • Alex, thanks for the reply and most importantly thanks for writing such wonderful plugin.

      I am new to weordpress and php and I am already enjoying it very much ??

    Thread Starter IestynR

    (@iestynr)

    Dang, this looks very complicated. Do you think you’ve got time to create a wee breakdown of everything you did Darius?

    IestynR, in my case none of the above worked unfortunately, except the hacky bit.

    I would suggest try commenting out the below code in nextgen-gallery instal.php and see if it works for you too.

    // check one table again, to be sure
        if($wpdb->get_var("show tables like '$nggpictures'")!= $nggpictures) {
            update_option( "ngg_init_check", __('NextGEN Gallery : Tables could not created, please check your database settings',"nggallery") );
            return;
        }

    You can find this code in:

    wp-content / plugins / nextgen-gallery / admin / install.php

    I am sure this is not the best way to tackle this issue and hopefully alexrabe or another expert would come up with a proper solution.

    Best,
    Darius.

    please note that such a workaround would causes problems for future versions

    I offer to look into this issue if someone setup a testblog and contact me by mail

    commenting the suggested part dos’nt work for me. ??
    Using WP 3.01. and Next-Gen 1.6.2

    I think the problem has to do with case-sensitive comparison using “!=”. My suggested “fix” would be:

    //if($wpdb->get_var("show tables like '$nggpictures'")!= $nggpictures) {
    	if(strcasecmp($wpdb->get_var("show tables like '$nggpictures'"),$nggpictures)!=0) {

    Didn’t understand the fix, what do you get in phpmyadmin if you request via SQL :

    SHOW TABLES LIKE 'wp_ngg_pictures'

    I′m using a custom prefix “am” in wp tables (i’m running multiple blogs with custom prefixes). For me, the query returns “am_ngg_pictures”, but variable $nggpictures contains “AM_ngg_pictures” and that′s the reason why the original comparison was failling. I don′t know if it’s really a “fix”, but it’s working for me at the moment. Tell me if you want me to try something else or if you need more details about my wp configuration.

    This means you define in the wp-config.php :

    $table_prefix = 'AM_';

    instead

    $table_prefix = 'am_';

    Yes, it’s defined in uppercase.

Viewing 15 replies - 1 through 15 (of 41 total)
  • The topic ‘NextGEN Gallery : Tables could not created, please check your database settings’ is closed to new replies.