Davical problems - cannot write to database

I installed davical 1.1.1 on my PC which is running the web server. The installation all seemed to go well and I got to the point where I am able to open and log into the davical admin web page. I am able to create users and collections / calendars for the users.

My problem comes when I try get a client to sync with davical. I’m trying to get TB Lightning to sync my calendars but there seem to be a problem with it connecting to davical. If I create a an event in a calendar in Lightning and try sync the calendar nothing gets written back to davical.

I am assuming there is a permission problem with the postgres db but cannot see what it may be. I’ve been through the davical installation and setup instructionsmultiple times and can’t see anything that I haven’t done or tried.

Has anyone here managed to install davical and get it working that I can compare configuration files to?

Below are my configuration settings

      # Virtual Host DAViCal
        DocumentRoot /usr/share/davical/htdocs
        DirectoryIndex index.php index.html
        ServerName davical
        Alias /images/ /usr/share/davical/htdocs/images/
        <Directory /usr/share/davical/htdocs/>
            AllowOverride None
            Order allow,deny
            Allow from all
        AcceptPathInfo On
        #  You probably don't need to enable any of these sorts of       things other than in exceptional
        #  circumstances.  Apart from the include path (which DAViCal       will discover if it is anywhere
        #  'normal') they are the default in newer PHP versions. 
        # php_value include_path /usr/share/awl/inc
        # php_value magic_quotes_gpc 0
        # php_value register_globals 0
        # php_value error_reporting "E_ALL & ~E_NOTICE"
        # php_value default_charset "utf-8"
      local   davical         davical_app                                   trust
      local   davical         davical_dba                                   trust
      host   davical        davical_app                  trust

      //  $c->domain_name = "";
      //  $c->sysabbr     = 'DAViCal';
      //  $c->admin_email = '[EMAIL="admin@mydomain.com"]admin@mydomain.com[/EMAIL]';
      //  $c->system_name = "DAViCal Server";
      //  $c->enable_row_linking = true;
        $c->pg_connect] = 'dbname=davical port=5432       user=davical_app'; 

        open_basedir =         /usr/share/davical:/usr/share/awl/inc:/etc/davical_app
        include_path =         ".:/usr/share/php5:/usr/share/php5/PEAR:/usr/share/awl/inc"


    Output from postgres:
Postgres users:
      su - postgres -c psql postgres
      psql (9.1.6)
      Type "help" for help.
      postgres=# \du
                                    List of roles
        Role name  |                   Attributes                    |       Member of 
       davical_app |                                                 | {}
       davical_dba |                                                 | {}
       postgres     | Superuser, Create role, Create DB, Replication | {}


  Davical tables 
su - postgres
      postgres@linux-PC1:~> psql davical
      psql (9.1.6)
      Type "help" for help.
      davical=# \z
                                                          Access       privileges
       Schema |                 Name                 |   Type   |              Access privileges        | Column access privileges 
       public | access_ticket                        | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | addressbook_address_adr              | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | addressbook_address_email            | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | addressbook_address_tel              | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | addressbook_resource                 | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | awl_db_revision                      | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=r/davical_dba       | 
       public | caldav_data                          | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | calendar_alarm                       | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | calendar_attendee                    | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 
       public | calendar_item                        | table    |       davical_dba=arwdDxt/davical_dba+| 
              |                                      |          |       davical_app=arwd/davical_dba    | 

On 11/21/2012 06:06 PM, suse tpx60s wrote:
> I installed davical 1.1.1 on my PC which is running the web server.

is that the laptop or Atom running openSUSE 12.1, or the Asus running
openSUSE 11.4??

if the latter then the first thing you need to do is take care of the
problem faced by running a web server on an OS that is past its
end-or-life and no longer receiving security patches and updates, see
http://en.opensuse.org/Lifetime and either move up to one of
the currently supported versions (12.1 or 12.2) or move that machine
back into support via the Evergreen project, http://tinyurl.com/4aflkpy

sorry, i can’t help you with the davical problem, but to ensure you
don’t run into bigger problems (like being kracked) i’d suggest you tend
to the security fix first.


I use Thunderbird to connect to our Exchange server via Davmail, but don’t have experience with setting up or using a CalDAV server. However, I wonder if the problem is more related to the Thunderbird configuration? Is the calendaring set up properly? Have you had a look at the davical logs?

This is a thread concerning a Windows-user, but may still be applicable to your situation with Thunderbird perhaps

DAViCal general - Cannot write to caldav calendar from windows with thunderbird

You might need to get support from DAViCal


I’m sorry, I should have specified. It’s the Asus but I’ve just updated it too 12.2 with a clean install. Signature fixed.

Thanks deano. I’m certain that my TB calendar is set up correctly for two reasons. First, I am unable to upload a calendar ics file to the Davical from within the davical web admin page. If a TB setting was a problem then I should still be able to upload a calendar manually through admin. Secondly, I had Davical installed and working for two years before I updated the PC to 12.2 with a clean install, my TB calendar settings were preserved in my /home directory. It worked so well that once installed I forgot about it so don’t remember if I had any problems setting up before. Unfortunately, when I updated my PC to 12.2 I stupidly forget about backing up my Davical, Apache, and php settings and the postgres database. Lesson learned. Those items are now part of my backup.

I have sent a message to the davical mailing list but have had no reply.

I was hoping that someone here uses davical and would be able to assist. I’m pretty convinced that I have some sort of permission issue with the postgres db but don’t know how to check that. Does postgres log to a file? I’ll try look for some logs but haven’t seen any davical or postgres log files so far.

From what I understand from reading, it is possible to configure logs

Apache Config - DAViCal Wiki

I think you’d edit /etc/apache2/conf.d/davical.conf perhaps (I could be wrong). Hopefully, you can make sense of it. :slight_smile:

Thanks deano. The path is actually /etc/apache2/vhosts.d/davical.conf. Seeing the logs helped me identify the problem.

I removed the value for ‘open_basedir =’ in /etc/php5/apache2/php.ini. So…

open_basedir =         /usr/share/davical:/usr/share/awl/inc:/etc/davical_app


open_basedir = 

That seems to have fixed my problem. The only reason I put a value in was because all the installation documents said it needed to be set. I’m not entirely sure what that setting does or if it’s going to have some detrimental effect later but all my calendars and address books are now syncing between TB Lightning and my Android phone.

I may write a install doc for openSUSE as there were a few differences compared to what the davical install and configuration documents specified. Not to mention their documentation being confusing and disjointed.

Thanks again for your help.

Well done. Glad to have been of help with the logs suggestion. It can often help with the diagnostics.

I may write a install doc for openSUSE as there were a few differences compared to what the davical install and configuration documents specified. Not to mention their documentation being confusing and disjointed.

Thanks again for your help.

Good idea. I noticed the same while trawling for useful information. You’re now our forum expert on DAViCal :slight_smile:

I’d hardly call myself an expert. More like fumbled my way through :slight_smile: