[Web-cyradm] add domain errors - not sure where to start - [SOLVED]

Bob Apthorpe apthorpe+cyradm at cynistar.net
Fri Nov 5 09:06:37 CET 2004


Elvis wrote:

 > Elvis wrote:
 >
 >> Hello all
 >> My Setup:
 >> Fedora Core 2
 >> Postfix-2.0.18-4
 >> Cyrus-imapd-2.2.3-11
 >>
 >> I have followed the howto on 
http://www.web-cyradm.org/documentation/Postfix-cyrus-postgreSQL-web-cyradm.pdf 
for installing with postgres, it all seemed to go fine and I can log in 
to the web interface with the admin user, but when I try to add a domain 
I get the following error:
 >>
 >> object(db_error)(8) {
 >>  ["error_message_prefix"]=>
 >>  string(0) ""
 >>  ["mode"]=>
 >>  int(1)
 >>  ["level"]=>
 >>  int(1024)
 >>  ["code"]=>
 >>  int(-11)
 >>  ["message"]=>
 >>  string(24) "DB Error: invalid number"
 >>  ["userinfo"]=>
 >>  string(232) "INSERT INTO domain (domain_name, prefix, maxaccounts, 
quota, transport,freenames,freeaddress) VALUES 
('<MYDOMAIN-CHANGED>.com', '<MYDOMAIN-CHANGED>.com', '', '500000', 
'cyrus', 'NO', 'NO') [nativecode=ERROR:  invalid input syntax for 
integer: ""]"
 >>  ["backtrace"]=>
 >>  array(8) {
 >>    [0]=>
 >>    array(6) {
 >>      ["file"]=>
 >>      string(22) "/usr/share/pear/DB.php"
 >>      ["line"]=>
 >>      int(748)
 >>      ["function"]=>
 >>      string(10) "pear_error"
 >>      ["class"]=>
 >>      string(8) "db_error"
 >>      ["type"]=>
 >>      string(2) "->"
 >>      ["args"]=>
 >>      array(5) {
 >>        [0]=>
 >>        string(24) "DB Error: invalid number"
 >>        [1]=>
 >>        int(-11)
 >>        [2]=>
 >>        int(1)
 >>        [3]=>
 >>        int(1024)
 >>        [4]=>
 >>        string(232) "INSERT INTO domain (domain_name, prefix, 
maxaccounts, quota, transport,freenames,freeaddress) VALUES 
('<MYDOMAIN-CHANGED>.com', '<MYDOMAIN-CHANGED>.com', '', '500000', 
'cyrus', 'NO', 'NO') [nativecode=ERROR:  invalid input syntax for 
integer: ""]"
 >>      }
 >>    }
 >>
 >> I have no idea where to start, could someone please try to point me 
in the right direction?
 >>
 >> Thanks!
 >>
 > It turns out that maximum mailboxes is mandatory, I just put 5000 in 
and it worked. Im not 100% that this was the cause of the error, but I 
can reproduce it.
 > Thanks,


That's definitely the issue - you need to specify the maximum number of 
mailboxes:

Reformatting:
 >>  string(232) "INSERT INTO domain (domain_name, prefix, maxaccounts,
 >> quota, transport,freenames,freeaddress) VALUES
 >> ('<MYDOMAIN-CHANGED>.com', '<MYDOMAIN-CHANGED>.com', '', '500000',
 >> 'cyrus', 'NO', 'NO') [nativecode=ERROR:  invalid input syntax for
 >> integer: ""]"

INSERT INTO domain
(domain_name, prefix, maxaccounts,
quota, transport, freenames, freeaddress)
VALUES
('<MYDOMAIN-CHANGED>.com', '<MYDOMAIN-CHANGED>.com', '', <<< CHOKE <<<
'500000', 'cyrus', 'NO', 'NO')

This needs to check user input more thoroughly... :/

-- Bob



More information about the Web-cyradm mailing list