Page 2 of 2

Re: Problems with Update

Posted: 16 Apr 2011, 17:21
by matse
That log is empty. the config file says errors go to syslog. I have checked it. Nothing in there that seems to be related. Checked processes, and there seems to be a mysql and a mysql_safe running concurrently.

Mats

Re: Problems with Update

Posted: 16 Apr 2011, 17:23
by Cheeseboy
This string is 53 characters long (51 without quotes):
'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 V'

The user_agent column is defined as varchar(50):

Code: Select all

mysql> show create table sessions
    -> ;
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table    | Create Table                                                                                                                                                                                                                                                                                                             |
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| sessions | CREATE TABLE `sessions` (
  `session_id` varchar(40) NOT NULL DEFAULT '0',
  `ip_address` varchar(16) NOT NULL DEFAULT '0',
  `user_agent` varchar(50) NOT NULL,
  `last_activity` int(10) unsigned NOT NULL DEFAULT '0',
  `user_data` text NOT NULL,
  PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Re: Problems with Update

Posted: 16 Apr 2011, 17:35
by matse
No, it's 50 w/o quotes. Such an error would have been discovered by anyone, no?

Re: Problems with Update

Posted: 16 Apr 2011, 17:46
by Cheeseboy
Hmm, you are right, sorry...

And also:

Code: Select all

mysql> INSERT INTO `sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('7e7cbc6c0a6b5a7246326ef09be8bf8d', '10.0.0.5', 'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.7.62 V', 1302982686)
    -> ;
Query OK, 1 row affected, 1 warning (0.09 sec)
So why is it rolled back in your case?

Re: Problems with Update

Posted: 16 Apr 2011, 17:47
by Cheeseboy
Could it be this:

Code: Select all

mysql> show warnings
    -> ;
+---------+------+------------------------------------------------+
| Level   | Code | Message                                        |
+---------+------+------------------------------------------------+
| Warning | 1364 | Field 'user_data' doesn't have a default value |
+---------+------+------------------------------------------------+

Re: Problems with Update

Posted: 17 Apr 2011, 02:05
by matse
Not sure. Maybe the database inserts an empty string instead of NULL in this case.

The error message:

Code: Select all

Error Number: 1046
No database selected
suggests that no database is selected. In other dbms one must execute a statement like:

Code: Select all

use 'mydbname'
Is the application assuming that the album database (which seems to exist) is the default database selected?

Mats

Re: Problems with Update

Posted: 17 Apr 2011, 06:18
by Ubi
mysql does not have a default db (in contast to pgsql). It sounds rather like a config error where the DB definition is not entered or not properly interpreted by the script

Re: Problems with Update

Posted: 18 Apr 2011, 17:03
by matse
I checked the file /etc/album/debian-db.php and it has variables that have no values, including $dbname, is this correct?

Re: Problems with Update

Posted: 19 Apr 2011, 08:28
by Ubi
no
for me its

Code: Select all

##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/bubba-album.conf
## by /usr/sbin/dbconfig-generate-include
## Tue, 22 Feb 2011 20:11:16 +0100
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='album';
$dbpass='sDdvfL2nPbh6';
$basepath='';
$dbname='album';
$dbserver='';
$dbport='';
$dbtype='mysql';

maybe you should execute that /usr/sbin/dbconfig-generate-include command or look into /etc/dbconfig-common/bubba-album.conf

Re: Problems with Update

Posted: 19 Apr 2011, 17:10
by matse
Thanks a bunch. I fiddled with the files, and it the album seems to work now!