get error on install [SOLUTION]

toma - July 12, 2007 - 11:32
Project:Flickr Rippr
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:toma
Status:patch (reviewed & tested by the community)
Description

Hi i try to activate the module

    * user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT' at line 6 query: CREATE TABLE flickrusers ( uid int(11) NOT NULL, flickrusername text NOT NULL, cachejpegs tinyint(1) NOT NULL default '0', PRIMARY KEY (uid) ) ENGINE=MyISAM DEFAULT in /home/web/site/includes/database.mysql.inc on line 172.
    * user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURRENT_TIMESTAMP, PRIMARY KEY (flickrphoto_i query: CREATE TABLE flickrphotos ( flickrphoto_id int(11) NOT NULL, nid int(11) NOT NULL, lastfetched timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY (flickrphoto_id), UNIQUE KEY flickrphoto_id (flickrphoto_id), UNIQUE KEY nid (nid) ) ENGINE=MyISAM DEFAULT in /home/web/site/includes/database.mysql.inc on line 172.
    * user warning: Table 'biladibe.flickrusers' doesn't exist query: SELECT u.name, u.uid, flickrusername from flickrusers f INNER JOIN users u ON f.uid = u.uid ORDER BY u.name in /home/web/site/includes/database.mysql.inc on line 172.

user warning: Table 'biladibe.flickrusers' doesn't exist query: SELECT u.name, u.uid, flickrusername from flickrusers f INNER JOIN users u ON f.uid = u.uid ORDER BY u.name in /home/web/site/includes/database.mysql.inc on line 172.

I am using mysql 4.0.24_Debian
PHP 4.3.10-21

Thanks

#1

Don Pepe - September 7, 2007 - 01:35
Title:get error on install» get error on install [SOLUTION]

Maybe is needed to rename some elements on table flickr_users:

Name of table:
old: flickr_users
new: flickrusers

Add a field named flickrusername

An alternative is run this SQL, to get a new and correct table:

CREATE TABLE IF NOT EXISTS `flickrusers` (
`uid` int(10) unsigned NOT NULL default '0',
`nsid` varchar(64) NOT NULL default '',
`identifier` varchar(64) NOT NULL default '',
`flickrusername` varchar(64) NOT NULL default '',
PRIMARY KEY (`uid`)
) TYPE=MyISAM;

Espero que te sirva, and sorry my english :D

José María

#2

Shiny - September 7, 2007 - 04:54
Status:active» patch (reviewed & tested by the community)

i've changed this in head - removed the "DEFAULT" bit.
I use postgresql, so tests of HEAD against mysql are greatly appreciated.

#3

roshjoseph - September 10, 2007 - 18:55

Hi, I got the following error after I enabled flickrrippr

user warning: Table 'drupaldb.flickrusers' doesn't exist query: SELECT u.name, u.uid, flickrusername from flickrusers f INNER JOIN users u ON f.uid = u.uid ORDER BY u.name in web\includes\database.mysql.inc on line 172.

I use Ver 5.x of Drupal, MySQL, php and Ver 2.x Apache server.

Any help will be greatly appreciated!

#4

krisvannest - December 6, 2007 - 15:09

Did you already have a previous version of flickrripper (before the HEAD patch above) installed on your site, or did you get the error from a new install w/ patch?

#5

winstonford - December 11, 2007 - 04:10

I got the same error. The table flickrusers didn't exist in my case because the creation of it errored out on install. Here's the sql command that error'd out:

CREATE TABLE flickrusers ( uid int(11) NOT NULL, flickrusername text NOT NULL, cachejpegs tinyint(1) NOT NULL default 0, flickrusername TEXT NOT NULL, PRIMARY KEY (uid) ) ENGINE=InnoDB

You can see that the column flickrusername is in there twice. I changed the second instance to flickrid:

CREATE TABLE flickrusers ( uid int(11) NOT NULL, flickrusername text NOT NULL, cachejpegs tinyint(1) NOT NULL default 0, flickrid TEXT NOT NULL, PRIMARY KEY (uid) ) ENGINE=InnoDB

I went into the drupal database in phpMyAdmin, pasted in the above sql, clicked GO, and the table was created successfully.

#6

dmuth - March 3, 2008 - 04:35

I got these errors as well, on the 5.x-0.1.x-dev release, dated 2008-Jan-04.

-- Doug

 
 

Drupal is a registered trademark of Dries Buytaert.