Tux's lil' helper
Joined: 28 Apr 2003
|Posted: Thu Jan 18, 2018 12:14 am Post subject: Install and Configure DaviCal
|I just upgraded www-apps/davical to the new 1.1.7 today, and it broke things. In the process of fixing things, I cleaned up a bunch of other stuff that I stumbled into, but I wanted to report here for anyone having problems.
I wasn't sure what the problem was. Thunderbird reported error 80040111, which is apparently a login error of some sort.
I tried upgrading PHP from 5.6 to 7.2.1. Everything that I could find indicated that davical should be happy with both versions. That was correct. I had exactly the same problems with both. While 7.2.1 works fine after fixing other issues (see below), I'm confident that 5.6 also works just fine.
I checked to see if I needed to upgrade postgresql. I have both 9.6 and 10.1 installed, but I'm running 9.6. Everything indicated that this shouldn't be an issue, so I'm sticking with 9.6 after I confirmed from the command line that I could read entries from the database.
I ran the command to update the davical database:
That ran fine (also confirming that postgres is working correctly).
It boiled down to error messages in the web server log:
|[Wed Jan 17 18:43:51.582725 2018] [php7:warn] [pid 6564:tid 140717168518912] [client 10.1.1.118:49678] PHP Warning: require_once(Principal.php): failed to open stream: No such file or directory in /var/www/localhost-81/htdocs/always.php on line 284
[Wed Jan 17 18:43:51.582766 2018] [php7:error] [pid 6564:tid 140717168518912] [client 10.1.1.118:49678] PHP Fatal error: require_once(): Failed opening required 'Principal.php' (include_path='../inc:/usr/share/php/awl/inc:.:/usr/share/php7:/usr/share/php') in /var/www/localhost-81/htdocs/always.php on line 284
As you can see, I have a vhost set up on port 81 just for davical, and it's installed in /var/www/localhost-81/.
Getting this to work required two steps. The first is using webapp-config to install it. I used the 'vhost' USE flag when emerging davical, or I think it would have installed it automatically in the default /var/www/localhost/ directory.
|webapp-config -h localhost-81 -d . -I davical 1.1.7 |
I could go on with a long rant on how poorly documented webapp-config is, but I'll just explain my understanding of what the above syntax means:
|webapp-config -h [dirname under /var/www/] -d [dirname under htdocs] -I [package name] [version] |
So in my example, it's installing most stuff in /var/www/localhost-81/htdocs/. The '-d' is important because I don't want an extra '/davical/' in the calendar URL (which is why I used a vhost to put it on its own port).
But that didn't fix the problem. The file it's looking for is installed, but it couldn't find it:
The solution was to create some symlinks based on the path in the error message. This shouldn't be necessary, and it says to me that either there's a bug in an ebuild (my guess), or there's something configured wrong on my system (entirely possible):
ln -s davical/* .
So there we have it. A restart of Apache, here and there (when updating vhosts and PHP configurations), and it all works.
Hopefully this will help anyone else with similar issues. If someone understands the subtle details as to why I had to put in the manual symlinks, please explain.