Couple of 0.2.0 installation errors

0 views
Skip to first unread message

Matt Robinson

unread,
Apr 17, 2008, 12:24:33 PM4/17/08
to Steer CMS Developers
Hi guys(&gals),

Three things I ran into when setting up the 0.2.0 svn tag:

1. mySQL failed to create the steercms_property table because one of
the keys was too long (the index of model, model_id, and name
apparently goes over the default 1000 byte limit. Not exactly sure
how, since 50+50+255 < 1000, but hey, I'm just saying what I'm
seeing :)

2. plugins/steerCMSSearchPlugin/lib/support/stopwords.en.php uses a
PHP short_tag, which is disabled on our server, so the "propel-load-
data backend" displays the contents of this file a few dozen times
instead of parsing it.

3. config/config.php has (and more or less needs) a hardcoded path, so
I think it's a good idea to mention that it needs updating in the
installation document at http://www.steercms-project.org/installation
- of course, if you have symfony installed and know svn, you probably
know this already, so it might not be worthwhile

The "propel-load-data backend" step works fine after that.

Cheers,

-- Matt

Piers Warmers

unread,
Apr 17, 2008, 8:00:08 PM4/17/08
to steercms-...@googlegroups.com
Hi Matt,

Thanks for sending those details through:

> 1. mySQL failed to create the steercms_property table because one of

> the keys was too long......


I'm a bit perplexed at this issue. I've only had a brief moment to
look into it, but nothing is leaping out at me. I presume you just
removed the index declaration from the schema.yml file and preceded?
I'll keep looking and see what I can find.

> 2. plugins/steerCMSSearchPlugin/lib/support/stopwords.en.php


Whoops, that has now been corrected in the trunk:

http://www.steercms-project.org/trac/steercms/changeset/974

> config/config.php has (and more or less needs) a hardcoded path, so
> I think it's a good idea to mention that it needs updating in the

Good point, I've updated the installation notes to include a reference
to that.

- Piers

Matt Robinson

unread,
Apr 18, 2008, 5:56:59 AM4/18/08
to Steer CMS Developers
On Apr 18, 1:00 am, Piers Warmers <pi...@wranglers.com.au> wrote:
> > 1. mySQL failed to create the steercms_property table because one of
> > the keys was too long......
>
> I'm a bit perplexed at this issue. I've only had a brief moment to
> look into it, but nothing is leaping out at me. I presume you just
> removed the index declaration from the schema.yml file and preceded?
> I'll keep looking and see what I can find.

That's right. I removed the 'name' column from the following index
definition:
model: [model, model_id, name]

FWIW, it confused the hell out of me too - I had to experiment with
the
generated SQL to be absolutely sure that it was specifically that
definition that caused it. The culprit is that I created the database
with a default character set of 'utf8', and mysql sets aside up to 3
bytes per character in a varchar, so since model, model_id are both
varchar(50) and name is varchar(255), you end up with a combined
maximum
key-length of 1065. The mysql manual says:

> Prefix lengths are storage engine-dependent (for example, a prefix can
> be up to 1000 bytes long for MyISAM tables, 767 bytes for InnoDB tables).
> Note that prefix limits are measured in bytes, whereas the prefix length
> in CREATE INDEX statements is interpreted as number of characters for
> non-binary data types (CHAR, VARCHAR, TEXT). Take this into account when
> specifying a prefix length for a column that uses a multi-byte character
> set. For example, utf8 columns require up to three index bytes per
> character.

So, possible solutions:
1. Making model_id an integer would take 150 chars off the maximum
key
length, but I don't know enough about steerCMS to know whether
there's
a reason it's a varchar.
2. Setting a single-byte character set for the columns if you know
they'll never need non-ascii characters
3. Only index the first N characters of the name column. Generally
speaking unless the values put into the name column have very
similar
beginnings, you won't need to index the whole column.
4. Tell me off for using utf8 ;)

nian

unread,
Apr 23, 2008, 7:37:40 AM4/23/08
to Steer CMS Developers
There are a few more instances of PHP short tags use that is causing
some problems. Here is a quick list of what I've found so far, as of
revision 983:

plugins/steerCMSFoundationPlugin/templates/themes/steerCMSSimple/
backend/layout.php:28
plugins/steerCMSFoundationPlugin/web/install/install.php:1
plugins/steerCMSContentPlugin/modules/steerCMSContentAdmin/templates/
navigationOrderSuccess.php:40
plugins/steerCMSContentPlugin/modules/steerCMSContentAdmin/templates/
navigationOrderSuccess.php:49
plugins/steerCMSContentPlugin/modules/steerCMSContentAdmin/templates/
navigationOrderSuccess.php:60
plugins/steerCMSContentPlugin/modules/steerCMSContentAdmin/templates/
navigationOrderSuccess.php:69

... of these, the template for navigationOrderSuccess.php is
particularly troublesome. Hope this helps!
Reply all
Reply to author
Forward
0 new messages