At the moment scriptcase uses sqlite. This is all fine when there are only few developers. But with more developers working at the same time scriptcase starts to behave bad.
A solution would be to either set WAL mode or better yet make an option to store the data in mariadb (it is free!) or mysql this would not only make scripcase faster but also more stable I think.
So plz add that option…
Porting the sqlite is hardly needed, I would only need to copy the tables from sqlite to mysql. That is simple enough.
I think this is already possible. I’m using this optin from many years.( MySql )
It’s an in stall optin if i remember right.
Don’t know how to change… in the past ( rel 7 ) there is a small php code that permit to change the connection but in rel 8 i cant’ fint it.
Once installed I don’t know, but you can use MySQL for SC store his data instead SQLite in manual installation
We’ll check it out as this might be great news. Are there other instances out there which have 10 users working simultaneously with scriptcase without issues? We find locking php sessions causing the full system to freeze etc.
PD1: Still making some tests, i’m having problems opening APS, will try removing the projects and importing them from backup.
PD2: Made it work, needed to delete all projects after migration, maybe some issue in encodings, later got restored from previous backup (Options->Configuration->Backup and a later Restore) and is working ok.
I will try to make a php program to migrate it in a more transparent steps, should be done by Netmake but they are very busy
This steps are recommended for a migration on a server where reinstallation is impossible, but where possible I recommend a backup, manual reinstallation and restore all projects.
Well, after some headaches and tests i’ve migrated sqlite nm_scriptcase.db to MySQL database, I use GNU/Linux so can’t confirm this procedure for windows.
-
Install “sqlite3” and “sed” packages
-
Export scriptcase DB to an SQL file with:
sqlite3 nm_scriptcase.db .dump > scriptcase.sql -
Erase the 2 first and las line of scriptcase.sql
First lines are:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
Last line is:
COMMIT;
-
Replace all double quotes in INSERT INTO “xxx” VALUES to none with this command as INSERT INTO xxx VALUES:
sed -i -E “s/INTO “(.*)” VALUES/INTO \1 VALUES/g” scriptcase.sql -
This step is done by hand, sadly. All tables MUST use InnoDB engine, some indexes are too long and in MyISAM engine you’ll face this error:
#1071 - Specified key was too long; max key length is 1000 bytes
You must add “ENGINE=InnoDB” to CREATE statemens, as an example, this:
CREATE TABLE sc_tbprj (
Cod_Prj VARCHAR(120) DEFAULT ‘’ NOT NULL,
Descricao VARCHAR(64),
Data_Inc VARCHAR(8),
Hora_Inc VARCHAR(8),
Folders TEXT,
Publish TEXT,
Config TEXT,
Attr1 TEXT,
Attr2 TEXT,
Attr3 TEXT,
PRIMARY KEY (Cod_Prj)
) ;
Should end as:
) ENGINE=InnoDB;
-
You’re ready to import SQL file into mysql, if using PHPMyAdmin you should make a ZIP file.
-
Go to scriptcase root folder and rename “config_.php” to “config.php”
-
In your browser go to http://server/sc/config.php and in that screen choose MySQL PDO engine, server should be localhost (or whatever) and not /…//…//nm_scriptcase.db, put your username, password and table name, profile must leave empty, save it and ENJOY SCRIPTCASE WITH NO LOCK SESSIONS!!!
Enjoy it.
PD: I don’t even imagine why there is a netmake account in users table.
An maybe, you should try to set to “Yes” the “Use session in database” option in Options->Settings->System Settings, it will be using SQLite instead of files to support PHP sessions, shoud be a relief in performance anyway.
If you didn’t knew, PHP with many concurrent users starts locking PHP execution. PHP locks file sessions until it’s released, and just in that moment another PHP process can make use of session files, in a high traffic or many concurrent users they starts locking between them hogging the CPU.