Mailing List Archive

SQL Error when creating user
Hi,

I'm new to DavICal and want to setup the server for the first time. I am
able to log into the admin panel, but when I try to create a user, I get
this in apaches error.log:

[Tue Sep 07 14:09:53 2010] [error] [client 85.176.48.76] davical: LOG:
Browse:Principal:DoQuery: Query: QF: SELECT user_no, user_active,
created, modified, username, password, fullname, email, email_ok,
date_format_type, locale, principal_id, type_id, displayname,
default_privileges, is_principal, is_calendar, collection_id,
is_addressbook, dav_n, referer:
https://caldav.uncleowen.de/admin.php?action=edit&t=principal
[Tue Sep 07 14:09:53 2010] [error] [client 85.176.48.76] davical: LOG:
Browse:Principal:DoQuery: Query: QF: ame, resourcetypes, EXISTS( SELECT
1 FROM role_member WHERE role_no = 1 AND role_member.user_no =
dav_principal.user_no ) AS is_admin FROM dav_principal WHERE
principal_id= , referer:
https://caldav.uncleowen.de/admin.php?action=edit&t=principal
[Tue Sep 07 14:09:53 2010] [error] [client 85.176.48.76] davical: LOG:
Browse:Principal:DoQuery: Query: QF: ERROR: syntax error at end of input
LINE 1: ...r_no ) AS is_admin FROM dav_principal WHERE principal_id= ^,
referer: https://caldav.uncleowen.de/admin.php?action=edit&t=principal

ssl_access.log:

85.176.48.76 - uo [07/Sep/2010:14:09:53 +0000] "POST
/admin.php?action=edit&t=principal HTTP/1.1" 200 2818
"https://caldav.uncleowen.de/admin.php?action=edit&t=principal"
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100723
Ubuntu/10.04 (lucid) Firefox/3.6.8"

postgresql-8.3-main.log:

2010-09-07 14:09:53 UTC ERROR: syntax error at end of input at
character 416
2010-09-07 14:09:53 UTC STATEMENT: SELECT user_no, user_active,
created, modified, username, password, fullname, email, email_ok,
date_format_type, locale, principal_id, type_id, displayname,
default_privileges, is_principal, is_calendar, collection_id,
is_addressbook, dav_name, resourcetypes, EXISTS( SELECT 1 FROM
role_member WHERE role_no = 1 AND role_member.user_no =
dav_principal.user_no ) AS is_admin FROM dav_principal WHERE principal_id=

Any ideas, what might be causing this? If I'm counting correctly,
character 416 is 2 past the end of the statement.

The is davical-0.9.9 from http://debian.mcmillan.net.nz/debian/ running
on debian lenny.

Greetings

S?ren


Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
rscds-general mailing list
rscds-general at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rscds-general
SQL Error when creating user [ In reply to ]
On Tue, 2010-09-07 at 16:24 +0200, S?ren Glimm wrote:
> Hi,
>
> I'm new to DavICal and want to setup the server for the first time. I am
> able to log into the admin panel, but when I try to create a user, I get
> this in apaches error.log:

Hi S?ren,

The error occurs because it's trying to do a join against a non-existent
principal... because you're about to create them :-)

It's cosmetic, but it has been fixed in HEAD for some time.

Regards,
Andrew McMillan.
--
------------------------------------------------------------------------
http://andrew.mcmillan.net.nz/ Porirua, New Zealand
Twitter: _karora Phone: +64(272)DEBIAN
Ignorance is like cholera. It cannot be controlled by the individual
alone: it requires the organised efforts of society. -- Sir Muir Gray

------------------------------------------------------------------------




Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
rscds-general mailing list
rscds-general at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rscds-general
SQL Error when creating user [ In reply to ]
On 09/08/2010 06:38 AM, Andrew McMillan wrote:
> On Tue, 2010-09-07 at 16:24 +0200, S?ren Glimm wrote:
>> Hi,
>>
>> I'm new to DavICal and want to setup the server for the first time. I am
>> able to log into the admin panel, but when I try to create a user, I get
>> this in apaches error.log:
>
> Hi S?ren,
>
> The error occurs because it's trying to do a join against a non-existent
> principal... because you're about to create them :-)
>
> It's cosmetic, but it has been fixed in HEAD for some time.

Hi,

"cosmetic" kind of implies, that the user is created anyways, right?
Well, it's not :(

Would you recommend upgrading to HEAD?

Or: Can I create users manually using SQL? (How?)

Greetings

S?ren


Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
rscds-general mailing list
rscds-general at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rscds-general
SQL Error when creating user [ In reply to ]
On Wed, 2010-09-08 at 10:10 +0200, S?ren Glimm wrote:
> On 09/08/2010 06:38 AM, Andrew McMillan wrote:
> > On Tue, 2010-09-07 at 16:24 +0200, S?ren Glimm wrote:
> >> Hi,
> >>
> >> I'm new to DavICal and want to setup the server for the first time. I am
> >> able to log into the admin panel, but when I try to create a user, I get
> >> this in apaches error.log:
> >
> > Hi S?ren,
> >
> > The error occurs because it's trying to do a join against a non-existent
> > principal... because you're about to create them :-)
> >
> > It's cosmetic, but it has been fixed in HEAD for some time.
>
> Hi,
>
> "cosmetic" kind of implies, that the user is created anyways, right?
> Well, it's not :(
>
> Would you recommend upgrading to HEAD?
>
> Or: Can I create users manually using SQL? (How?)

Apparently PHP is crashing in some circumstances. Not for me though - I
haven't been able to duplicate your issue.

I should be able to work around it, however by adding an "if
( isset($id) && $id > 0" ) before the call to $editor->GetRecord() in
inc/ui/principal-edit.php

Cheers,
Andrew.

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
The longer the title, the less important the job.
------------------------------------------------------------------------
SQL Error when creating user [ In reply to ]
> Apparently PHP is crashing in some circumstances. Not for me though - I
> haven't been able to duplicate your issue.
>
> I should be able to work around it, however by adding an "if
> ( isset($id)&& $id> 0" ) before the call to $editor->GetRecord() in
> inc/ui/principal-edit.php

Thanks, now I can create users (not edit, though... same problem as
before - but I can workaround via delete and recreate)

Next problem though: Lightning can't access the calendar. All I get is
"The calendar is momentarily not available" with a yellow exclamation
mark next to it in the Calendar list. When trying to add an event i get
"MODIFICATION FAILED".

Nothing in error_log (except that there's no favicon...)

I've double checked that the password is correct.

Any ideas?

S?ren
SQL Error when creating user [ In reply to ]
On 9/11/2010 6:00 AM, S?ren Glimm wrote:
> Next problem though: Lightning can't access the calendar. All I get is
> "The calendar is momentarily not available" with a yellow exclamation
> mark next to it in the Calendar list. When trying to add an event i get
> "MODIFICATION FAILED".
>
> Nothing in error_log (except that there's no favicon...)
>
> I've double checked that the password is correct.
>
> Any ideas?
>
>
I get that sometimes. What I do is right click on the calendar name and
select Reload Remote Calendars. It seems like Lightning's connection is
getting screwed-up, and reloading the calendars re-initializes the
connection. (This is an observation - I don't know what's really going
on...)

//Jeff


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.morphoss.com/pipermail/davical-users/attachments/20100911/525a82f9/attachment.htm>
-------------- next part --------------
SQL Error when creating user [ In reply to ]
On Sat, 2010-09-11 at 15:00 +0200, S?ren Glimm wrote:
> > Apparently PHP is crashing in some circumstances. Not for me though - I
> > haven't been able to duplicate your issue.
> >
> > I should be able to work around it, however by adding an "if
> > ( isset($id)&& $id> 0" ) before the call to $editor->GetRecord() in
> > inc/ui/principal-edit.php
>
> Thanks, now I can create users (not edit, though... same problem as
> before - but I can workaround via delete and recreate)
>
> Next problem though: Lightning can't access the calendar. All I get is
> "The calendar is momentarily not available" with a yellow exclamation
> mark next to it in the Calendar list. When trying to add an event i get
> "MODIFICATION FAILED".
>
> Nothing in error_log (except that there's no favicon...)
>
> I've double checked that the password is correct.
>
> Any ideas?

Hi S?ren,

It would be really good to get an idea of what the real problem is...

Can you (temporarily) enable the following in your PHP to try and get it
to show the error message to you:

display_errors = On
display_startup_errors = On
output_buffering = Off
implicit_flush = On

I've had some success with those getting the errors displayed to me in
the past. The implicit_flush setting seems to be the magic, ensure EOL
flushes to your browser, but it totally kills performance.

I've also had problems recently with Suhosin being a little too
aggressive, so in current HEAD I've added a check for
'suhosin.strip.path' to ensure that is off. I doubt that is your issue,
since that applies to paths with " or > or suchlike in them (often a
good idea, but not needed in DAViCal I believe) but there might be some
other Suhosin setting that is being overzealous.

Cheers,
Andrew.

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
Beware of computerized fortune-tellers!
------------------------------------------------------------------------