How To Use Trunk Version?

Development-related discussion, including bundled plugins
xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: How To Use Trunk Version?

Postby xtaz » 18 Apr 2013, 16:29

fox wrote:Btw you can enable experimental PDO support if you define _ENABLE_PDO in config.php.


Just did so. Seems to work so far. Will let you know if it does anything weird!

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: How To Use Trunk Version?

Postby Athanasius » 18 Apr 2013, 19:15

For what it's worth I run Debian stable (so 'squeeze' currently, all up to date), which has:

Code: Select all

ii  mysql-client-5.1                     5.1.66-0+squeeze1             
ii  mysql-common                         5.1.66-0+squeeze1                   
ii  mysql-server-5.1                     5.1.66-0+squeeze1             
ii  mysql-server-core-5.1                5.1.66-0+squeeze1             
ii  php5-mysql                           5.3.3-7+squeeze15             

downforce
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 04 Nov 2008, 01:10

Re: How To Use Trunk Version?

Postby downforce » 18 Apr 2013, 19:30

For reference, I run percona-server-5.5 and I had to add DB_PORT (actually I re-ran the installer cos I was too lazy to debug properly).

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How To Use Trunk Version?

Postby sleeper_service » 19 Apr 2013, 02:36

same thing happened to me after a git pull..

Code: Select all

[email protected]:~var/apache2/2.2/htdocs/ttrss$ update.php --update-schema
PHP Warning:  mysqli_connect() expects parameter 5 to be long, string given in
/var/apache2/2.2/htdocs/ttrss/classes/db/mysqli.php on line 6
PHP Stack trace:
PHP   1. {main}() /var/apache2/2.2/htdocs/ttrss/update.php:0
PHP   2. init_plugins() /var/apache2/2.2/htdocs/ttrss/update.php:21
PHP   3. PluginHost::getInstance() /var/apache2/2.2/htdocs/ttrss/include/functi
ons.php:3346
PHP   4. PluginHost->__construct() /var/apache2/2.2/htdocs/ttrss/classes/plugin
host.php:52
PHP   5. Db::get() /var/apache2/2.2/htdocs/ttrss/classes/pluginhost.php:40
PHP   6. Db->__construct() /var/apache2/2.2/htdocs/ttrss/classes/db.php:47
PHP   7. Db_Mysqli->connect() /var/apache2/2.2/htdocs/ttrss/classes/db.php:32
PHP   8. mysqli_connect() /var/apache2/2.2/htdocs/ttrss/classes/db/mysqli.php:6
PHP Warning:  mysqli_error() expects exactly 1 parameter, 0 given in /var/apach
e2/2.2/htdocs/ttrss/classes/db/mysqli.php on line 13
PHP Stack trace:
PHP   1. {main}() /var/apache2/2.2/htdocs/ttrss/update.php:0
PHP   2. init_plugins() /var/apache2/2.2/htdocs/ttrss/update.php:21
PHP   3. PluginHost::getInstance() /var/apache2/2.2/htdocs/ttrss/include/functi
ons.php:3346
PHP   4. PluginHost->__construct() /var/apache2/2.2/htdocs/ttrss/classes/plugin
host.php:52
PHP   5. Db::get() /var/apache2/2.2/htdocs/ttrss/classes/pluginhost.php:40
PHP   6. Db->__construct() /var/apache2/2.2/htdocs/ttrss/classes/db.php:47
PHP   7. Db_Mysqli->connect() /var/apache2/2.2/htdocs/ttrss/classes/db.php:32
PHP   8. mysqli_error() /var/apache2/2.2/htdocs/ttrss/classes/db/mysqli.php:13
Unable to connect to database (as ttrssuser to woden, database ttrss):         
[email protected]:~var/apache2/2.2/htdocs/ttrss$ vi config.php

Code: Select all

[email protected]:~var/apache2/2.2/htdocs/ttrss$ php --version                     
PHP 5.3.14 (cli) (built: Aug 30 2012 01:52:21)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: How To Use Trunk Version?

Postby xtaz » 27 Apr 2013, 21:46

xtaz wrote:
fox wrote:Btw you can enable experimental PDO support if you define _ENABLE_PDO in config.php.


Just did so. Seems to work so far. Will let you know if it does anything weird!


Thought I'd give you some feedback. Been running this for just over a week now and not noticed anything unusual so looks like it works quite well.

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: How To Use Trunk Version?

Postby gbcox » 06 Jun 2013, 23:15

I created a quick script to automatically do the git pull... saves a couple of keystrokes...
http://tso.bzb.us/2013/06/update-script ... rsion.html

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How To Use Trunk Version?

Postby sleeper_service » 07 Jun 2013, 02:50

gbcox wrote:I created a quick script to automatically do the git pull... saves a couple of keystrokes...
http://tso.bzb.us/2013/06/update-script ... rsion.html


I see a couple problems with this script that you may want to address.

if fox updates the database schema, your ttrss will be broken.

if fox updates the config.php-dist file, your ttrss will be broken.

the first can be taken care of with an ./update.php --update-schema

and the second by a little judicious use of diff and patch

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: How To Use Trunk Version?

Postby gbcox » 07 Jun 2013, 03:25

sleeper_service wrote:if fox updates the database schema, your ttrss will be broken.
if fox updates the config.php-dist file, your ttrss will be broken.


Thanks for the feedback however those issues are already handed by ttrss... if the database schema is updated there are already checks in place
to detect and handle. Same thing with config.php...

My thought was to have those issues handled in the same way as when you would go though the update script for a new release. This script just
makes sure that the necessary services are recycled properly and file ownership is setup correctly after a git update. That way, all the required processes
can see the new version and do what they are suppose to do. I've been running this daily for several weeks (and even though a schema and config.php change) and
it works like a charm. No issues whatsoever.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How To Use Trunk Version?

Postby sleeper_service » 07 Jun 2013, 05:24

gbcox wrote:
sleeper_service wrote:if fox updates the database schema, your ttrss will be broken.
if fox updates the config.php-dist file, your ttrss will be broken.


Thanks for the feedback however those issues are already handed by ttrss... if the database schema is updated there are already checks in place
to detect and handle. Same thing with config.php...

My thought was to have those issues handled in the same way as when you would go though the update script for a new release. This script just
makes sure that the necessary services are recycled properly and file ownership is setup correctly after a git update. That way, all the required processes
can see the new version and do what they are suppose to do. I've been running this daily for several weeks (and even though a schema and config.php change) and
it works like a charm. No issues whatsoever.


well, if by 'detects and handles' you mean 'fails to start until you update the schema and edit the config file', then, yeah, sure.

but, I thought you were trying to automate things... and since you can automate updating the schema, I thought you might be interested...

if anybody *else* is interested, let me know, I'll be happy to share :)

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: How To Use Trunk Version?

Postby gbcox » 07 Jun 2013, 06:51

Yeah, personally I prefer to do schema and config.php updates outside of a script like this. Those are items I think better left as they are - and I'm satisfied with the way they are currently handled. If I change my mind though, I'll post an update.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How To Use Trunk Version?

Postby sleeper_service » 07 Jun 2013, 07:14

gbcox wrote:Yeah, personally I prefer to do schema and config.php updates outside of a script like this. Those are items I think better left as they are - and I'm satisfied with the way they are currently handled. If I change my mind though, I'll post an update.


I'm curious as to what *not* doing an automatic schema update gains you?

gbcox
Bear Rating Master
Bear Rating Master
Posts: 149
Joined: 25 Apr 2013, 04:52

Re: How To Use Trunk Version?

Postby gbcox » 07 Jun 2013, 08:04

Doing it manually affords the opportunity to do a backup before if desired. In any event whenever I deal with databases I tend to exercise extra caution.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How To Use Trunk Version?

Postby sleeper_service » 07 Jun 2013, 08:55

gbcox wrote:Doing it manually affords the opportunity to do a backup before if desired. In any event whenever I deal with databases I tend to exercise extra caution.


I wouldn't trust that fox guy not to screw up my database either.

shoudn't be difficult to parse the git pull results, or do a diff first, and see if there's a schema update, and do your backup that way.

wait, you're not doing regular backups *anyway*? ;)

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: How To Use Trunk Version?

Postby Athanasius » 07 Jun 2013, 13:44

gbcox wrote:Doing it manually affords the opportunity to do a backup before if desired. In any event whenever I deal with databases I tend to exercise extra caution.

I note that running 'update.php --update-schema' when an update proves necessary now prompts you to backup your database and "Type 'yes' to continue.".

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: How To Use Trunk Version?

Postby sleeper_service » 07 Jun 2013, 22:31

Athanasius wrote:
gbcox wrote:Doing it manually affords the opportunity to do a backup before if desired. In any event whenever I deal with databases I tend to exercise extra caution.

I note that running 'update.php --update-schema' when an update proves necessary now prompts you to backup your database and "Type 'yes' to continue.".

it's been that way for as long as I can remember, which, admittedly, is only the month and a half or so since I discovered TTRSS.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests