Hello,
I'm try to install CMSMS 1.8.2 on server with php5.2 and everything that's needed to work is fulfilled. I'm stuck on step 5 because the script cannot create tables in my database. I tried a lot of stuff and I found a solution. In order to create a table on my host I have to use this syntax:
CREATE TABLE user.table_name ...
while CMSMS create it the normal way:
CREATE TABLE able_name ...
Could you tell me which files to change and where to put that addition to make the CMS work? I could add the user manually to stay hard-coded as I will always user the same username. Or, is there any other solution?
Thanks in advance,
DiH
mysql create table syntax needs a change
Re: mysql create table syntax needs a change
Proper way is to edit "/config.php" like this
$config['db_prefix'] = 'user.cms_';
Re: mysql create table syntax needs a change
Thank you for your response. But isn't config.php file empty before installation is complete?
Re: mysql create table syntax needs a change
I modified \install\lib\classes\CMSInstaller.class.php
line 237: $result = $db->Execute('CREATE TABLE user.' . $db_prefix . 'dummyinstall (i int)');
and
line 240: $result = $db->Execute('DROP TABLE user.' . $db_prefix . 'dummyinstall');
but it didn't work either.
line 237: $result = $db->Execute('CREATE TABLE user.' . $db_prefix . 'dummyinstall (i int)');
and
line 240: $result = $db->Execute('DROP TABLE user.' . $db_prefix . 'dummyinstall');
but it didn't work either.
Re: mysql create table syntax needs a change
There is a field "Table prefix" on 5th installation step. Change value to "user.cms_" and hopefully everything will be ok.
Re: mysql create table syntax needs a change
I did that, but the script did not let me use dot (.), so I changed the regex in CMSInstaller.class.php, on line 204 to:
I moved to created tables, but they all fail create...
Creating additional_users table... [failed]
...
Importing sample data...Invalid query: INSERT INTO user.cms_version VALUES (33);
I see no hope.
Code: Select all
&& !preg_match('/^[a-zA-Z0-9._]+$/', trim($_POST['prefix'])) )
Creating additional_users table... [failed]
...
Importing sample data...Invalid query: INSERT INTO user.cms_version VALUES (33);
I see no hope.
Last edited by DiH on Fri Nov 12, 2010 1:13 pm, edited 1 time in total.
Re: mysql create table syntax needs a change
test it
Code: Select all
&& !preg_match('/^[a-zA-Z0-9\._]+$/', trim($_POST['prefix'])) )