- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Installation on a different schema
- ravgupta20
- Topic Author
- Offline
- New Member
Less
More
6 years 9 months ago - 6 years 9 months ago #155651
by ravgupta20
Installation on a different schema was created by ravgupta20
Hi,
I am trying to install LimeSurvey on PostgresSQL, on a different schema, called 'limesurvey', than the default 'public' schema.
I went into create-pgsql.sql file and set the search_path = limesurvey. This populates the 'limesurvey' schema on the database with all the tables correctly during installation.
The problem is when tries to create the admin log-in on the 'Addition Options' during installation. At first, it was creating a second lime_sessions table on the 'public' schema, with the table-based sessions activated. I changed the creation of config.php so that table-based session is uncommented when the installation is run.
So I changed the $autoCreateSessionTable to false, in the CDbHttpSession.php. This stopped creating the second lime_sessions table in the 'public' schema. However, now the queries that are run during installation cannot find 'lime_sessions' table. It's trying to look for it in the 'public' schema, instead of the 'limesurvey' schema where it actually is.
I also changed the DEFAULT_SCHEMA to 'limesurvey' in CPgsqlSchema.php and it still gives an error. It is trying to look for the lime_sessions table for LSYii_Application.php functions, and it can't find it.
Any ideas?
PS: I believe the problem might be that when it does a db connection ($db) it goes to the default 'public' schema, rather than the new 'limesurvey' schema. This is just my guess.
I am trying to install LimeSurvey on PostgresSQL, on a different schema, called 'limesurvey', than the default 'public' schema.
I went into create-pgsql.sql file and set the search_path = limesurvey. This populates the 'limesurvey' schema on the database with all the tables correctly during installation.
The problem is when tries to create the admin log-in on the 'Addition Options' during installation. At first, it was creating a second lime_sessions table on the 'public' schema, with the table-based sessions activated. I changed the creation of config.php so that table-based session is uncommented when the installation is run.
So I changed the $autoCreateSessionTable to false, in the CDbHttpSession.php. This stopped creating the second lime_sessions table in the 'public' schema. However, now the queries that are run during installation cannot find 'lime_sessions' table. It's trying to look for it in the 'public' schema, instead of the 'limesurvey' schema where it actually is.
I also changed the DEFAULT_SCHEMA to 'limesurvey' in CPgsqlSchema.php and it still gives an error. It is trying to look for the lime_sessions table for LSYii_Application.php functions, and it can't find it.
Any ideas?
PS: I believe the problem might be that when it does a db connection ($db) it goes to the default 'public' schema, rather than the new 'limesurvey' schema. This is just my guess.
Last edit: 6 years 9 months ago by ravgupta20.
The topic has been locked.
- giatro
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 1
6 years 9 months ago #155689
by giatro
Replied by giatro on topic Installation on a different schema
Hi, I resolved
On DB:
ALTER ROLE myuser IN DATABASE mydatabase SET search_path = mycustomschema;
On code:
replace 'public' with 'mycustomschema' on:
- limesurvey/installer/sql/create-pgsql.sql: row 4
- limesurvey/application/helpers/database_helper.php: row 181
- limesurvey/framework/db/schema/pgsql/CPgsqlSchema.php: row 20 [OPTIONAL?]
On DB:
ALTER ROLE myuser IN DATABASE mydatabase SET search_path = mycustomschema;
On code:
replace 'public' with 'mycustomschema' on:
- limesurvey/installer/sql/create-pgsql.sql: row 4
- limesurvey/application/helpers/database_helper.php: row 181
- limesurvey/framework/db/schema/pgsql/CPgsqlSchema.php: row 20 [OPTIONAL?]
The topic has been locked.
- matarancon
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 2
6 years 2 months ago #162283
by matarancon
Replied by matarancon on topic Installation on a different schema
Thanks!! I have these problem, I tink that I have tu replace these files and re-install applications. Isn´t it?
The topic has been locked.