Background:
My s9y installation is currently on GoDaddy. I'm moving it to a different server because their SQL database system has become unreliable (SQL timeouts for no discernible reason).
The old (GoDaddy) server used mysql.
The new server uses sqlite.
I've already exported the database into an sqlite3 db file.
Does someone have a sample serendipity_config_local.inc.php so I know what values to put in it for the new sqlite db files?
Oh: I'm running 1.7.8, not 2.x. (I like how stable 1.7.8 is. I'll migrate to 2.x after it has a few months without updates/fixes.)
Need sample sqlite config file
Re: Need sample sqlite config file
Can't help with sqlite unfortunately, but regular updates and fixes are not a sign of an “unstable” software. They are a sign that the software is actively maintained.nealk wrote:I'm running 1.7.8, not 2.x. (I like how stable 1.7.8 is. I'll migrate to 2.x after it has a few months without updates/fixes.)
2.x was released 2 1/2 months ago, and most of the fixes in 2.0.1 were kind of minor (technically even the security fix). Yes, it's still being worked on, but it's not like it's unusable.
YL
Re: Need sample sqlite config file
Thanks YL.yellowled wrote:Can't help with sqlite unfortunately, but regular updates and fixes are not a sign of an “unstable” software. They are a sign that the software is actively maintained.nealk wrote:I'm running 1.7.8, not 2.x. (I like how stable 1.7.8 is. I'll migrate to 2.x after it has a few months without updates/fixes.)
2.x was released 2 1/2 months ago, and most of the fixes in 2.0.1 were kind of minor (technically even the security fix). Yes, it's still being worked on, but it's not like it's unusable.
YL
I certainly didn't mean to slam 2.x. I almost never take anything that is less than 4 months stable for a production server. And I only patch when (1) there is a known security risk, and (2) the patch has been deployed enough to be called stable. I like 1.7.8 because it is very stable.
Anyway, any help on the sqlite config would be appreciated.
Re: Need sample sqlite config file
Hi
Here is mine:
Here is mine:
Code: Select all
onli@boatfly:~$ cat /var/www/serendipity_config_local.inc.php
<?php
/*
Serendipity configuration file
Written on Thu, 05 Mar 2015 16:07:47 +0100
*/
$serendipity['versionInstalled'] = '2.1-alpha1';
$serendipity['dbName'] = 'serendipity_21a28e3cd5e2d8d30dd860337ea8cc52';
$serendipity['dbPrefix'] = 'serendipity_';
$serendipity['dbHost'] = 'localhost';
$serendipity['dbUser'] = 'onli';
$serendipity['dbPass'] = '';
$serendipity['dbType'] = 'pdo-sqlite';
$serendipity['dbPersistent'] = false;
$serendipity['dbCharset'] = 'latin1';
// End of Serendipity configuration file
// You can place your own special variables after here:
?>
Re: Need sample sqlite config file
Perfectly acceptable. So, it's a Debian server?nealk wrote:I almost never take anything that is less than 4 months stable for a production server. And I only patch when (1) there is a known security risk, and (2) the patch has been deployed enough to be called stable.
It just seems as if we encounter a lot of people in the forums lately that still use 1.6.x or even 1.5.x, and that's not really an option these days.
YL
Re: Need sample sqlite config file
Thanks onli!
I did some tweaking and learned:
1. Sqlite does not require username or password. (Makes sense since you have the file.)
2. $serendipity['dbName'] is the path to the DB file. You can even set this to something like "../../databases/mydb" for accessing mydb.db outside of the web directory. (No need for .htaccess to prevent access when it isn't in the directory!)
3. $serendipity['dbType'] = 'pdo-sqlite'; is the correct key to accessing this. On Ubuntu, you will need 'apt-get install php5-sqlite' and restart the web server.
4. $serendipity['dbType'] = 'sqlite'; does not work as of PHP 5.5. Specifically, sqlite_open() no longer exists. (It was deprecated for sqlite3_open, and in PHP 5.5, they removed it.)
5. I didn't realize that the relative path to all files is stored in the DB! This really should be moved into serendipity_config_local.inc.php. I had to update this value when I moved my server.
sqlite> update s_config set value='/home/new_home/www/blog/' where name='serendipityPath';
Also, I made the baseURL hostname independent (makes the code work for HTTP or HTTPS, and for any of the hostname aliases that I use):
update s_config set value='/blog/' where name='baseURL';
New DB and ported install works great!
I did some tweaking and learned:
1. Sqlite does not require username or password. (Makes sense since you have the file.)
2. $serendipity['dbName'] is the path to the DB file. You can even set this to something like "../../databases/mydb" for accessing mydb.db outside of the web directory. (No need for .htaccess to prevent access when it isn't in the directory!)
3. $serendipity['dbType'] = 'pdo-sqlite'; is the correct key to accessing this. On Ubuntu, you will need 'apt-get install php5-sqlite' and restart the web server.
4. $serendipity['dbType'] = 'sqlite'; does not work as of PHP 5.5. Specifically, sqlite_open() no longer exists. (It was deprecated for sqlite3_open, and in PHP 5.5, they removed it.)
5. I didn't realize that the relative path to all files is stored in the DB! This really should be moved into serendipity_config_local.inc.php. I had to update this value when I moved my server.
sqlite> update s_config set value='/home/new_home/www/blog/' where name='serendipityPath';
Also, I made the baseURL hostname independent (makes the code work for HTTP or HTTPS, and for any of the hostname aliases that I use):
update s_config set value='/blog/' where name='baseURL';
New DB and ported install works great!
Re: Need sample sqlite config file
Thanks for documenting your steps.
Just as a note: We have an option to autodetect the baseURL, that should take care of HTTP/HTTPS as well.nealk wrote:Also, I made the baseURL hostname independent (makes the code work for HTTP or HTTPS, and for any of the hostname aliases that I use):
update s_config set value='/blog/' where name='baseURL';