Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Problems with Update

Got problems with your B2 or B3? Share and get helped!
matse
Posts: 48
Joined: 12 Aug 2008, 15:55

Re: Problems with Update

Post 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
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Problems with Update

Post 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 |
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
matse
Posts: 48
Joined: 12 Aug 2008, 15:55

Re: Problems with Update

Post by matse »

No, it's 50 w/o quotes. Such an error would have been discovered by anyone, no?
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Problems with Update

Post 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?
Cheeseboy
Posts: 789
Joined: 08 Apr 2007, 12:16

Re: Problems with Update

Post 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 |
+---------+------+------------------------------------------------+
matse
Posts: 48
Joined: 12 Aug 2008, 15:55

Re: Problems with Update

Post 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
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Problems with Update

Post 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
matse
Posts: 48
Joined: 12 Aug 2008, 15:55

Re: Problems with Update

Post by matse »

I checked the file /etc/album/debian-db.php and it has variables that have no values, including $dbname, is this correct?
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Problems with Update

Post 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
matse
Posts: 48
Joined: 12 Aug 2008, 15:55

Re: Problems with Update

Post by matse »

Thanks a bunch. I fiddled with the files, and it the album seems to work now!
Post Reply