How to install AgenDAV dev version ?

1,070 views
Skip to first unread message

Samir Saidani

unread,
Oct 19, 2012, 12:11:07 PM10/19/12
to agend...@googlegroups.com
Hi,
I'm trying since yesterday to install the agenDAV git version (devel branch), but running into lot of
troubles.

What I've done is : 
Installing composer following the micro guide published in this group
Enabling all log errors : unfortunately, only DEBUG errors are show in the log-`date` file, but nothing
about INTERNALS, AUTHOK, etc... Which makes very difficult to understand what's happening.

I've tried to understand why internals error are not logged in, but without any success.
I've set up a davical server, adding this line to be sure that only basic authentification is done :
$c->authenticate_hook['server_auth_type'] = array('Basic');

When I'm trying to log in into agendav with correct user/password, it seems to enter for a second, and killing
the session, returning to the login panel.

I've tried also the master branch, without any success (same problem for logging errors, so no way 
to understand what's wrong).

So AgenDAV seems to be a great tool, but it's really a pain to install this stuff !

Any help would be appreciated;

Thanks
Sam

Samir Saidani

unread,
Oct 19, 2012, 7:38:53 PM10/19/12
to agend...@googlegroups.com
Ok, I've finally managed to get it working : it was really hard to find the problem...
I was testing for hours, and it seems that I needed to delete all the cookies (chrome parameters) for my
domain name, and now I've managed to enter in the interface... Meanwhile I've installed a bunch of agendav 
versions to track down this problem.
Seems for me that I've only DEBUG statement in my agendav log, don't know why there is not INTERNALS, and
so one... 
Hope it could help someone else !

Samir Saidani

unread,
Oct 19, 2012, 10:26:25 PM10/19/12
to agend...@googlegroups.com

Going on digging into the code, I've managed to enable some internal debugging... Uncomment in CalDAVClient.php
//TODO debug
      log_message('INTERNALS', 'REQh: ' . var_export($info['request_header'], TRUE));
      log_message('INTERNALS', 'REQb: ' . var_export($this->body, TRUE));
      log_message('INTERNALS', 'RPLh: ' . var_export($this->httpResponseHeaders, TRUE));
      log_message('INTERNALS', 'RPLb: ' . var_export($this->httpResponseBody, TRUE));

I've noticed that I've only one OPTIONS request, and that's all. Then AgenDAV pop up an error 'Error loading calendar list', but according
to the log, everything's fine when connecting to the davical server. A bug in the latest version in update_calendar_list ?


Jorge López Pérez

unread,
Oct 20, 2012, 2:03:09 PM10/20/12
to agend...@googlegroups.com
Hi Samir,

El 20/10/12 04:26, Samir Saidani escribió:

> I've noticed that I've only one OPTIONS request, and that's all. Then
> AgenDAV pop up an error 'Error loading calendar list', but according
> to the log, everything's fine when connecting to the davical server. A
> bug in the latest version in update_calendar_list ?

What does configtest.php say?

Can you describe your current environment, please? Sending your
configuration files would help too. Remember to remove passwords from
them :-)

Regards!

--
Jorge López Pérez
http://adobo.org
Jabber: jor...@jabberes.org

Samir Saidani

unread,
Oct 22, 2012, 2:48:30 PM10/22/12
to agend...@googlegroups.com

> I've noticed that I've only one OPTIONS request, and that's all. Then 
> AgenDAV pop up an error 'Error loading calendar list', but according
> to the log, everything's fine when connecting to the davical server. A
> bug in the latest version in update_calendar_list ?

What does configtest.php say?

Everything green.
 
Can you describe your current environment, please? Sending your
configuration files would help too. Remember to remove passwords from
them :-)

Debian Squeeze, php 5.3.3-7, davical 0.9.9.3, postgres 8.4.13

The error show when logging in agendav : Error reading calendar list
I have created a test user with two calendar, cal1 and cal2, they are empty.

Debugging shows :

INTERNALS - 2012-10-22 20:41:12 --> REQh: 'OPTIONS /caldav.php/test/ HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0
User-Agent: AgenDAV v1.3.0-dev
Host: caldav.xxxxx.xx
Accept: */*
Content-type: text/plain

'
INTERNALS - 2012-10-22 20:41:12 --> REQb: ''
INTERNALS - 2012-10-22 20:41:12 --> RPLh: 'HTTP/1.1 200 OK
Date: Mon, 22 Oct 2012 18:41:12 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.3.3-7+squeeze14
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, calendar-proxy, bind, addressbook
Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKCOL, MKCALENDAR, PROPPATCH
X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
Content-Length: 0
Vary: Accept-Encoding
Content-Type: text/plain; charset="utf-8"

'
INTERNALS - 2012-10-22 20:41:12 --> RPLb: false
INTERNALS - 2012-10-22 20:41:12 --> Resp: 'HTTP/1.1 200 OK
Date: Mon, 22 Oct 2012 18:41:12 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.3.3-7+squeeze14
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, calendar-proxy, bind, addressbook
Allow: OPTIONS, PROPFIND, REPORT, DELETE, LOCK, UNLOCK, MOVE, GET, PUT, HEAD, MKCOL, MKCALENDAR, PROPPATCH
X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
Content-Length: 0
Vary: Accept-Encoding
Content-Type: text/plain; charset="utf-8"

When clicking on a date :

ERROR - 2012-10-22 20:43:56 --> Severity: Notice  --> iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8' is not allowed 
/home/xxxx/data/agendav_dev3/web/lib/caldav-client/AWLUtilities.php 481

INTERNALS - 2012-10-22 20:43:56 --> REQh: 'PROPFIND /caldav.php/test/ HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0
User-Agent: AgenDAV v1.3.0-dev
Host: caldav.xxxxx.xx
Accept: */*
Depth: 1
Content-type: text/xml
Content-Length: 305

'
INTERNALS - 2012-10-22 20:43:56 --> REQb: '<?xml version="1.0" encoding="utf-8" ?>
<propfind xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:C1="http://calendarserver.org/ns/" xmlns:A="http://apple.com/ns/ical/">
 <prop>
  <resourcetype/>
  <displayname/>
  <C1:getctag/>
  <A:calendar-color/>
  <A:calendar-order/>
 </prop>
</propfind>
'
INTERNALS - 2012-10-22 20:43:56 --> RPLh: 'HTTP/1.1 207 Multi-Status
Date: Mon, 22 Oct 2012 18:43:56 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.3.3-7+squeeze14
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, calendar-proxy, bind, addressbook
ETag: "4546b1bb784b7f0086cacaa07fc69c85"
X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
Content-Length: 3000
Vary: Accept-Encoding
Content-Type: text/xml; charset="utf-8"

'
INTERNALS - 2012-10-22 20:43:56 --> RPLb: '<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="http://calendarserver.org/ns/" xmlns:A="http://apple.com/ns/ical/" xmlns:C1="urn:ietf:params:xml:ns:caldav">
 <response>

 <propstat>
   <prop>
    <resourcetype>
     <collection/>
     <principal/>
    </resourcetype>
    <displayname>test</displayname>
    <C:getctag>"3e3506d60fc5a59327bf998b5c3210ff"</C:getctag>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
  <propstat>
   <prop>
    <A:calendar-color/>
    <A:calendar-order/>
   </prop>
   <status>HTTP/1.1 404 Not Found</status>
  </propstat>
 </response>
 <response>
  <href>/caldav.php/test/calendar/</href>
  <propstat>
   <prop>
    <resourcetype>
     <collection/>
     <C1:calendar/>
    </resourcetype>
    <displayname/>

 <C:getctag>"aecfd06139fa12b0a075b17e2664b222"</C:getctag>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
  <propstat>
   <prop>
    <A:calendar-color/>
    <A:calendar-order/>
   </prop>
   <status>HTTP/1.1 404 Not Found</status>
  </propstat>
 </response>
 <response>
  <href>/caldav.php/test/cal1/</href>
  <propstat>
   <prop>
    <resourcetype>
     <collection/>
     <C1:calendar/>
    </resourcetype>
    <displayname>Calendrier</displayname>
    <C:getctag>""</C:getctag>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
  <propstat>
   <prop>
    <A:calendar-color/>
    <A:calendar-order/>
   </prop>
   <status>HTTP/1.1 404 Not Found</status>
  </propstat>
 </response>
 <response>
  <href>/caldav.php/test/cal2/</href>
  <propstat>
   <prop>
    <resourcetype>
     <collection/>
     <C1:calendar/>
    </resourcetype>
    <displayname>Calendrier bis</displayname>
    <C:getctag>""</C:getctag>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
  <propstat>
   <prop>
    <A:calendar-color/>
    <A:calendar-order/>

   </prop>
   <status>HTTP/1.1 404 Not Found</status>
  </propstat>
 </response>
 <response>
  <href>/caldav.php/test/calendar-proxy-read/</href>
  <propstat>
   <prop>
    <resourcetype>
     <collection/>
     <C:calendar-proxy-read/>
    </resourcetype>
    <displayname>/test/calendar-proxy-read/</displayname>
    <C:getctag>"757d964ae8296173965eb7a4772086fa"</C:getctag>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
  <propstat>
   <prop>
    <A:calendar-color/>
    <A:calendar-order/>
   </prop>
   <status>HTTP/1.1 404 Not Found</status>
  </propstat>
 </response>
 <response>
  <href>/caldav.php/test/calendar-proxy-write/</href>
  <propstat>
   <prop>
    <resourcetype>
     <collection/>
     <C:calendar-proxy-write/>
    </resourcetype>
    <displayname>/test/calendar-proxy-write/</displayname>
    <C:getctag>"4421a7e046445093a5a5ab2fe9cf8f2d"</C:getctag>
   </prop>
   <status>HTTP/1.1 200 OK</status>
  </propstat>
  <propstat>
   <prop>
    <A:calendar-color/>
    <A:calendar-order/>
   </prop>
   <status>HTTP/1.1 404 Not Found</status>
  </propstat>
 </response>
</multistatus>
'

ERROR - 2012-10-22 20:43:56 --> Severity: Warning  --> pg_query(): Query failed: ERROR:  relation "prefs" does not exist
LINE 2: FROM "prefs"
             ^ /home/xxxxxxx/data/agendav_dev3/web/system/database/drivers/postgre/postgre_driver.php 176
ERROR - 2012-10-22 20:43:56 --> Query error: ERROR:  relation "prefs" does not exist
LINE 2: FROM "prefs"
             ^
ERROR - 2012-10-22 20:43:56 --> Severity: Warning  --> Cannot modify header information - headers already sent by (output started at /home/xxxxx/data/agendav_dev3/web/system/core/Exceptions.php:185) /home/saidani/data/agendav_dev3/web/system/core/Common.php 442

Hope it helps !

Samir

Jorge López Pérez

unread,
Oct 23, 2012, 5:48:15 AM10/23/12
to agend...@googlegroups.com
Hi Samir,

El 22/10/12 20:48, Samir Saidani escribió:

> ERROR - 2012-10-22 20:43:56 --> Severity: Warning --> pg_query(): Query
> failed: ERROR: relation "prefs" does not exist
> LINE 2: FROM "prefs"
> ^
> /home/xxxxxxx/data/agendav_dev3/web/system/database/drivers/postgre/postgre_driver.php
> 176
> ERROR - 2012-10-22 20:43:56 --> Query error: ERROR: relation "prefs"
> does not exist
> LINE 2: FROM "prefs"

That's it! Did you create the database schema? You also have to apply
latest DB upgrades.

You can read about this process at
http://agendav.org/doc/1.2.6.2/admin/installation.html#database-and-tables .

Regards.

--
Jorge López Pérez
http://adobo.org
jabber: jor...@jabberes.org

Samir Saidani

unread,
Oct 25, 2012, 2:18:39 PM10/25/12
to agend...@googlegroups.com
Hi

I've got this error :

./bin/agendavcli dbupdate
PHP Warning:  require_once(../vendor/autoload.php): failed to open stream: No such file or directory in /home/xxxxx/data/agendav_dev3/web/public/index.php on line 4
PHP Fatal error:  require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/saidani/data/agendav_dev3/web/public/index.php on line 4

But web/vendor/autoload.php is there

Note that I've git clone the latest repository, and follow the "< pgsql.schema" stated in the documentation, so I guess that I've got already
the latest db schema ?

Adrien Malgoyre

unread,
Oct 26, 2012, 6:01:00 AM10/26/12
to agend...@googlegroups.com
Hi Samir, Hi Jorge.

I was starting to write a GIT issue about the same observation.

I can confirm the error with the at least last 4 GIT commits.

Using Mysql and Debian squeeze with standard debian repos for PHP, APACHE, MySQL...

Regards,

Adrien

Jorge López Pérez

unread,
Oct 26, 2012, 6:24:26 AM10/26/12
to agend...@googlegroups.com
Hi,

El 26/10/12 12:01, Adrien Malgoyre escribió:

> I was starting to write a GIT issue about the same observation.

Perhaps you didn't run './composer.phar install', did you?

If you did, I would suggest running './composer.phar update', maybe you
don't have all dependencies downloaded or your autoload.php is
corrupt/incomplete.

Samir, Adrien, please, let me know if any of the above suggestions
solves your issue.
Message has been deleted

Samir Saidani

unread,
Oct 26, 2012, 8:33:49 AM10/26/12
to agend...@googlegroups.com

If you did, I would suggest running './composer.phar update', maybe you 
don't have all dependencies downloaded or your autoload.php is 
corrupt/incomplete.

It tells me that composer is already up to date.

When I try in the public directory : /usr/bin/php index.php cli dbupdate
I've got this :
 
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index: REMOTE_ADDR</p>
<p>Filename: core/Input.php</p>
<p>Line Number: 351</p>

</div><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Warning</p>
<p>Message:  Cannot modify header information - headers already sent by (output started at /home/x/data/agendav_dev3_testing/web/system/core/Exceptions.php:185)</p>
<p>Filename: libraries/Session.php</p>
<p>Line Number: 552</p>

</div>Updating database schema...
Enlarging ip_address field to support IPv6...
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Warning</p>
<p>Message:  Cannot modify header information - headers already sent by (output started at /home/x/data/agendav_dev3_testing/web/system/core/Exceptions.php:185)</p>
<p>Filename: core/Common.php</p>
<p>Line Number: 446</p>

</div><html>
<head>
<title>Database Error</title>
<style type="text/css">

body {
background-color: #fff;
margin: 40px;
font-family: Lucida Grande, Verdana, Sans-serif;
font-size: 12px;
color: #000;
}

#content  {
border: #999 1px solid;
background-color: #fff;
padding: 20px 20px 12px 20px;
}

h1 {
font-weight: normal;
font-size: 14px;
color: #990000;
margin: 0 0 4px 0;
}
</style>
</head>
<body>
<div id="content">
<h1>A Database Error Occurred</h1>
<p>Error Number: </p><p>ERROR:  syntax error at or near "CHANGE"
LINE 1: ALTER TABLE "sessions" CHANGE Array  NOT NULL
                               ^</p><p>ALTER TABLE "sessions" CHANGE Array  NOT NULL</p><p>Filename: /home/x/data/agendav_dev3_testing/web/application/migrations/004_ipv6.php</p><p>Line Number: 13</p> </div>
</body>


Don't know if it could be relevant for you.

Anyway, it's easy for you to reproduce the error : just git clone the repository, and run dbupdate after proper install.

I tried then to git checkout 1.2.6.2 and 1.2.5, I didn't manage to make it working, even if I drop the database and recreate one
after each checkout. I must miss something since it seems people here manage to get it working some way.


Thanks !
Samir

Jorge López Pérez

unread,
Oct 26, 2012, 5:34:01 PM10/26/12
to agend...@googlegroups.com
Hi Samir,

El 26/10/12 14:32, Samir Saidani escribió:

> It tells me that composer is already up to date.

I just found out what is happening! Seems that the path to autoload.php
is not valid when calling agendavcli. Calling 'php index.php cli' worked
because autoload.php path is relative to web/public directory.

I'm so sorry for not testing this before. I'll try to find a solution
for this ASAP.

> When I try in the public directory : /usr/bin/php index.php cli dbupdate
> I've got this :
> [...]
> <h4>A PHP Error was encountered</h4>
>
>
> <p>Severity: Notice</p>
>
> <p>Message: Undefined index: REMOTE_ADDR</p>

Do you have a php-cli executable? Can you try the same command using
php-cli instead of php?

Regards!

--
Jorge López Pérez
http://adobo.org
Jabber: jor...@jabberes.org

Jorge López Pérez

unread,
Nov 1, 2012, 3:25:55 PM11/1/12
to agend...@googlegroups.com
Hi Samir,

I have just fixed CLI mode on latest develop commit.

There were two problems:

* A path problem (Composer autoload.php was not reachable)
* A CodeIgniter bug introduced on latest release, which caused some
warnings and errors (https://github.com/EllisLab/CodeIgniter/issues/1890)

Hope it works now as expected!

Thank you again for reporting this.

Regards.

El 26/10/12 14:33, Samir Saidani escribió:
--
Jorge López Pérez
http://adobo.org
Jabber: jor...@jabberes.org

Samir Saidani

unread,
Nov 1, 2012, 3:44:59 PM11/1/12
to agend...@googlegroups.com
Hi,

After a git pull, still same error with bin/agendavcli dbupdate. Now even
 "/usr/bin/php5 index.php cli dbupdate" doesn't work : it gives me

PHP Warning:  require_once(../vendor/autoload.php): failed to open stream: No such file or directory in /home/saidani/data/agendav_dev4/web/public/index.php on line 4
PHP Fatal error:  require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/saidani/data/agendav_dev4/web/public/index.php on line 4

Thanks for working on this !
Samir

Jorge López Pérez

unread,
Nov 1, 2012, 3:51:26 PM11/1/12
to agend...@googlegroups.com
Hi Samir,

El 01/11/12 20:44, Samir Saidani escribió:

> After a git pull, still same error with bin/agendavcli dbupdate. Now even
> "/usr/bin/php5 index.php cli dbupdate" doesn't work : it gives me

I fixed agendavcli (called from bin/ directory) and REMOTE_ADDR error
message, but your problem has still to do with Composer.

Can you make sure you have a web/vendor/ directory? Mine looks like this:

--8<--
~/agendav (develop ✔) ᐅ pwd
/home/jorge/agendav
~/agendav (develop ✔) ᐅ ls web/vendor
autoload.php composer pimple
-->8--

Regards.

Adrien Malgoyre

unread,
Nov 2, 2012, 9:40:10 AM11/2/12
to agend...@googlegroups.com
Hi Jorge, Hi samir

This is right for me since your last commit. My shared calendars are not displayed but it must be my fault.

I re-checked dependances before, all was OK.

root@debian:/var/www/agendav/web# ./composer.phar update
Loading composer repositories with package information
Updating dependencies
Nothing to install or update
Generating autoload files

root@debian:/var/www/agendav/bin# ./agendavcli dbupdate
Updating database schema...
Succeed! Your database is updated

root@debian:/var/www/agendav/web/public# /usr/bin/php5 index.php cli dbupdate
Updating database schema...
Succeed! Your database is updated




--
Adrien 


Jorge López Pérez

unread,
Nov 6, 2012, 2:03:18 AM11/6/12
to agend...@googlegroups.com
Hi Adrien,

El 02/11/12 14:40, Adrien Malgoyre escribió:

> This is right for me since your last commit. My shared calendars are not
> displayed but it must be my fault.

Shared calendars are not working on current develop branch. I'm
rewriting lots of parts of AgenDAV, and shared calendars is still a work
in progress.

Regards.

PS: Your message was tagged as SPAM by Google, so it was in 'pending'
state :-(
--
Jorge López Pérez
http://adobo.org
jabber: jor...@jabberes.org
Reply all
Reply to author
Forward
0 new messages