Bug #174

Issue with table prefix over 12 chars long when installing

Added by Konstantin Leonov over 2 years ago. Updated over 1 year ago.

Status:Closed Start date:2009-09-02
Priority:Medium Due date:
Assignee:- % Done:

100%

Category:TangoCMS::Installation
Target version:2.3.3
PHP Version:

Description

When trying to install TCM 2.3.2, there is an error.
If you put too long DB tables prefix it will result in unability to install TCM after first fail.
Tested @ two different hosts with different OSes and php/mysql/webserver versions.

Concept:

----------------
Stage one.
----------------
I enter my password & username to access MySQL srvr. All input is correct.
I use prefix "abcdefghijkl_". (or longer than 12 chars)
Pressing "Next"

Result: Internal server error. (logs provided below)
---------------
Stage two.
---------------
I press "back" in Opera.
I use prefix "abcdef_" (or any shorter than 12 chars)
Pressing "Next"

Result: Internal server error.
---------------
Stage three.
---------------
I go look thru logs in shell
Both error logs are similar like if i posted > 12 chars twice but i didn't.

Shell log:

[web-adm@srvr22 /home/n00b1k/data/www/example.org/tcm-test/install]$ cd ../application/logs/
[web-adm@srvr22 /home/n00b1k/data/www/example.org/tcm-test/application/logs]$ ls
.htaccess           2009-09-02_zula.log zula-dump.1.log     zula-dump.2.log
[web-adm@srvr22 /home/n00b1k/data/www/example.org/tcm-test/application/logs]$ cat zula-dump.2.log 
Uncaught exception in "/home/n00b1k/data/www/example.org/tcm-test/application/libraries/Sql.php" on line 157 with code "ZULA-022" 

Time & Date: 2009-09-02T17:50:32+04:00
Exception Thrown: SQL_QueryFailed
Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'singledb.config' doesn't exist
Request Path: stage/three
Raw Request Path: stage/three

Stack Trace:
#0 /home/n00b1k/data/www/example.org/tcm-test/application/libraries/Config/Sql.php(48): Sql->query('SELECT * FROM {...', 2)
#1 /home/n00b1k/data/www/example.org/tcm-test/application/zula/bootstrap.php(44): Config_sql->load('config')
#2 /home/n00b1k/data/www/example.org/tcm-test/index.php(111): require('/home/n00b1k/da...')
#3 /home/n00b1k/data/www/example.org/tcm-test/install/index.php(27): require_once('/home/n00b1k/da...')
#4 {main}[web-adm@srvr22 /home/n00b1k/data/www/example.org/tcm-test/application/logs]$ cat zula-dump.1.log 
Uncaught exception in "/home/n00b1k/data/www/example.org/tcm-test/application/libraries/Sql.php" on line 157 with code "ZULA-022" 

Time & Date: 2009-09-02T17:49:07+04:00
Exception Thrown: SQL_QueryFailed
Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'singledb.config' doesn't exist
Request Path: stage/four
Raw Request Path: stage/four

Stack Trace:
#0 /home/n00b1k/data/www/example.org/tcm-test/application/libraries/Config/Sql.php(48): Sql->query('SELECT * FROM {...', 2)
#1 /home/n00b1k/data/www/example.org/tcm-test/application/zula/bootstrap.php(44): Config_sql->load('config')
#2 /home/n00b1k/data/www/example.org/tcm-test/index.php(111): require('/home/n00b1k/da...')
#3 /home/n00b1k/data/www/example.org/tcm-test/install/index.php(27): require_once('/home/n00b1k/da...')
#4 {main}
[web-adm@srvr22 /home/n00b1k/data/www/example.org/tcm-test/application/logs]$ cat 2009-09-02_zula.log 
[2009-09-02T17:35:12+04:00] [127.0.0.1 | uid unknown] [warning] -- (unknown:0) server does not have gettext extension loaded - unable to use gettext locale engine
[2009-09-02T17:35:16+04:00] [127.0.0.1 | uid unknown] [warning] -- (unknown:0) server does not have gettext extension loaded - unable to use gettext locale engine
[2009-09-02T17:48:40+04:00] [127.0.0.1 | uid unknown] [warning] -- (unknown:0) server does not have gettext extension loaded - unable to use gettext locale engine
[2009-09-02T17:48:41+04:00] [127.0.0.1 | uid 1] [warning] -- (Sql.php:111) Sql_base::set_prefix() invalid prefix length, must be less than 12 chars long
[2009-09-02T17:49:07+04:00] [127.0.0.1 | uid unknown] [warning] -- (unknown:0) server does not have gettext extension loaded - unable to use gettext locale engine
[2009-09-02T17:49:07+04:00] [127.0.0.1 | uid 1] [warning] -- (Sql.php:111) Sql_base::set_prefix() invalid prefix length, must be less than 12 chars long
[2009-09-02T17:49:07+04:00] [127.0.0.1 | uid 1] [warning] -- (Sql.php:111) Sql_base::set_prefix() invalid prefix length, must be less than 12 chars long
[2009-09-02T17:49:07+04:00] [127.0.0.1 | uid 1] [fatal] -- (Sql.php:157) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'singledb.config' doesn't exist
[2009-09-02T17:50:31+04:00] [127.0.0.1 | uid unknown] [warning] -- (unknown:0) server does not have gettext extension loaded - unable to use gettext locale engine
[2009-09-02T17:50:32+04:00] [127.0.0.1 | uid 1] [warning] -- (Sql.php:111) Sql_base::set_prefix() invalid prefix length, must be less than 12 chars long
[2009-09-02T17:50:32+04:00] [127.0.0.1 | uid 1] [warning] -- (Sql.php:111) Sql_base::set_prefix() invalid prefix length, must be less than 12 chars long
[2009-09-02T17:50:32+04:00] [127.0.0.1 | uid 1] [fatal] -- (Sql.php:157) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'singledb.config' doesn't exist

Screenshots are also available @ http://stat.web31337.org/etc/tcm/

History

Updated by Alex Cartwright over 2 years ago

  • Subject changed from Issue with MySQL tables prefix - incorrect storing of input to Issue with table prefix over 12 chars long when installing

Thanks for the report. 'Target version' btw is the version we aim to fix it in, so I've set this to 2.3.3 as 2.3.2 is already out.

Updated by Alex Cartwright over 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset r2595.

Also available in: Atom PDF