Hello!
I'm having this issue with imagecache which I've been unable to resolve so far. When I try to install it I get the following error...
* user warning: BLOB/TEXT column 'data' can't have a default value query: CREATE TABLE imagecache_action ( actionid INT UNSIGNED NOT NULL PRIMARY KEY, presetid INT UNSIGNED NOT NULL DEFAULT 0, weight INT NOT NULL DEFAULT 0, data TEXT NOT NULL DEFAULT '') /*!40100 DEFAULT CHARACTER SET utf8 */ in C:\Program Files\Apache2\htdocs\includes\database.mysql.inc on line 172.
* warning: Invalid argument supplied for foreach() in C:\Program Files\Apache2\htdocs\includes\common.inc on line 734.
* warning: strtr() [function.strtr]: The second argument is not an array. in C:\Program Files\Apache2\htdocs\includes\common.inc on line 749.
The "imagecache_preset" table installs just fine.....
I've tried to modify the imagecache.install in various ways as I thought the error was to be found there. And has actually been able to make it install properly. The only result being that it totally breaks as soon as I try to make a preset. I'm starting to believe I've got a problem with my setup rather....
running:
Apache 2.2.4
Mysql 5.0
PHP 5.2
Win XP
Any ideas
Nic
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagecache_install_data_default.patch | 681 bytes | recidive |
| #2 | imagecache.install_143082.patch | 672 bytes | drewish |
Comments
Comment #1
nikkelei commentedOh yes... What I did to make it install properly was changing the imagecache.install file from:
$ret2 = db_query('CREATE TABLE {imagecache_action} (
actionid INT UNSIGNED NOT NULL PRIMARY KEY,
presetid INT UNSIGNED NOT NULL DEFAULT 0,
weight INT NOT NULL DEFAULT 0,
data TEXT NOT NULL DEFAULT \'\')
into
$ret2 = db_query('CREATE TABLE {imagecache_action} (
actionid INT UNSIGNED NOT NULL PRIMARY KEY,
presetid INT UNSIGNED NOT NULL DEFAULT 0,
weight INT NOT NULL DEFAULT 0,
data VARCHAR(255) NOT NULL DEFAULT \'\')
however when I try to create presets I get all kinds of errors....
Comment #2
drewish commentedhere's a patch that fixes the .install file.
Comment #3
recidive commentedMySql 5 doc says "BLOB and TEXT columns cannot have DEFAULT values". But a bug was causing MySql to silently ignore DEFAULT values in these column types. I got imagecache installed properly and here is what I have currently in my database:
Here is a patch that remove DEFAULT value for 'data' column but keeps this column as NOT NULL.
Comment #4
drewish commentedi don't think the non null really matters one way or another.
Comment #5
nikkelei commentedOk!
Seems to fix it.....
Thanks!
Comment #6
recidive commented@nikkelei: did you test this? If so, could you mark this issue "ready to be committed"?
Comment #7
dopry commentedCommitted to DRUPAL-5.
Comment #8
(not verified) commented