--- Log opened lun ago 08 00:00:15 2022 --- Log closed lun ago 08 10:11:38 2022 --- Log opened lun ago 08 11:11:48 2022 11:11 -!- Irssi: #friendica: Total of 9 nicks [0 ops, 0 halfops, 0 voices, 9 normal] 11:11 -!- Irssi: Join to #friendica was synced in 17 secs 15:59 < fikabot_> 💬 I created a detailed blog post on how to get interactive debugging of CLI and locally hosted Apache PHP websites to help make Friendica debugging easier. https://nequalsonelifestyle.com/2022/08/08/setting-up-apache-php-with-xdebug/ --- Log closed lun ago 08 17:57:02 2022 --- Log opened lun ago 08 17:57:13 2022 17:57 -!- Irssi: #friendica: Total of 11 nicks [0 ops, 0 halfops, 0 voices, 11 normal] 17:57 -!- Irssi: Join to #friendica was synced in 21 secs --- Log closed lun ago 08 20:04:34 2022 --- Log opened lun ago 08 20:04:43 2022 20:04 -!- Irssi: #friendica: Total of 9 nicks [0 ops, 0 halfops, 0 voices, 9 normal] 20:04 -!- Irssi: Join to #friendica was synced in 18 secs 20:05 < fikabot_> 💬 Hey Hank I was following your guide about "[Setting Up Friendica Daemon as a Systemd Service Tutorial](https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/)" and I think you're doing a great job at explaining how to do that - it's really easy to understand. However, I do get an error when I try to start the daemon as you can see here: 20:05 < fikabot_> 💬 20:05 < fikabot_> 💬 ``` 20:05 < fikabot_> 💬 root@tromdienste:/var/www/friendica# sudo -u www-data bin/daemon.php start 20:05 < fikabot_> 💬 Starting worker daemon. 20:05 < fikabot_> 💬 Child process started with pid 838. 20:05 < fikabot_> 💬 PHP Warning: file_put_contents(/run/friendica.pid): failed to open stream: Permission denied in /var/www/friendica/bin/daemon.php on line 165 20:05 < fikabot_> 💬 ``` 20:05 < fikabot_> 💬 the problem is in line 165 which is this here: 20:05 < fikabot_> 💬 ``` 20:06 < fikabot_> 💬 if (!$foreground) { 20:06 < fikabot_> 💬 151 echo "Starting worker daemon.\n"; 20:06 < fikabot_> 💬 152 20:06 < fikabot_> 💬 153 DBA::disconnect(); 20:06 < fikabot_> 💬 154 20:06 < fikabot_> 💬 155 // Fork a daemon process 20:06 < fikabot_> 💬 156 $pid = pcntl_fork(); 20:06 < fikabot_> 💬 157 if ($pid == -1) { 20:06 < fikabot_> 💬 158 echo "Daemon couldn't be forked.\n"; 20:06 < fikabot_> 💬 159 Logger::warning('Could not fork daemon'); 20:07 < fikabot_> 💬 160 exit(1); 20:07 < fikabot_> 💬 161 } elseif ($pid) { 20:07 < fikabot_> 💬 162 // The parent process continues here 20:07 < fikabot_> 💬 163 echo 'Child process started with pid ' . $pid . ".\n"; 20:07 < fikabot_> 💬 164 Logger::notice('Child process started', ['pid' => $pid]); 20:07 < fikabot_> 💬 165 file_put_contents($pidfile, $pid); 20:07 < fikabot_> 💬 166 exit(0); 20:07 < fikabot_> 💬 167 } 20:07 < fikabot_> 💬 168 20:08 < fikabot_> 💬 ``` 20:08 < fikabot_> 💬 Hey Hank I was following your guide about "[Setting Up Friendica Daemon as a Systemd Service Tutorial](https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/)" and I think you're doing a great job at explaining how to do that - it's really easy to understand. However, I do get an error when I try to start the daemon as you can see here: 20:08 < fikabot_> 💬 20:08 < fikabot_> 💬 ``` 20:08 < fikabot_> 💬 root@tromdienste:/var/www/friendica# sudo -u www-data bin/daemon.php start 20:08 < fikabot_> 💬 Starting worker daemon. 20:08 < fikabot_> 💬 Child process started with pid 838. 20:08 < fikabot_> 💬 PHP Warning: file_put_contents(/run/friendica.pid): failed to open stream: Permission denied in /var/www/friendica/bin/daemon.php on line 165 20:08 < fikabot_> 💬 ``` 20:08 < fikabot_> 💬 This is the local.config.php config file: 20:09 < fikabot_> 💬 ``` 20:09 < fikabot_> 💬 'config' => [ 20:09 < fikabot_> 💬 'admin_email' => 'aaron@tromdienste.de', 20:09 < fikabot_> 💬 'sitename' => 'Friendica Social Network', 20:09 < fikabot_> 💬 'register_policy' => \Friendica\Module\Register::OPEN, 20:09 < fikabot_> 💬 'register_text' => '', 20:09 < fikabot_> 💬 ], 20:09 < fikabot_> 💬 'system' => [ 20:09 < fikabot_> 💬 'pidfile' => '/run/friendica.pid', 20:09 < fikabot_> 💬 'default_timezone' => 'Europe/Berlin', 20:10 < fikabot_> 💬 'language' => 'de', 20:10 < fikabot_> 💬 ], 20:10 < fikabot_> 💬 ``` 20:10 < fikabot_> 💬 do you have an idea what might be wrong there? 20:12 < fikabot_> 💬 2 more things to mention: 20:12 < fikabot_> 💬 1. I'm running friendica on yunohost - makes it very easy to install and manage some self hosted services. 20:12 < fikabot_> 💬 2. when doing `systemd-tmpfiles --create --prefix /run/friendica` I got the following: 20:12 < fikabot_> 💬 ``` 20:12 < fikabot_> 💬 root@tromdienste:/etc/tmpfiles.d# systemd-tmpfiles --create --prefix /run/friendica 20:12 < fikabot_> 💬 [/usr/lib/tmpfiles.d/fail2ban-tmpfiles.conf:1] Line references path below legacy directory /var/run/, updating /var/run/fail2ban → /run/fail2ban; please update the tmpfiles.d/ drop-in file accordingly. 20:12 < fikabot_> 💬 ``` 20:12 < fikabot_> 💬 maybe that helps 21:23 < fikabot_> 💬 > <@aaron:matrix.trom.tf> Hey Hank I was following your guide about "[Setting Up Friendica Daemon as a Systemd Service Tutorial](https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/)" and I think you're doing a great job at explaining how to do that - it's really easy to understand. However, I do get an error when I try to start the daemon as you can see here: 21:23 < fikabot_> 💬 > 21:24 < fikabot_> 💬 > ``` 21:24 < fikabot_> 💬 > root@tromdienste:/var/www/friendica# sudo -u www-data bin/daemon.php start 21:24 < fikabot_> 💬 > Starting worker daemon. 21:24 < fikabot_> 💬 > Child process started with pid 838. 21:24 < fikabot_> 💬 > PHP Warning: file_put_contents(/run/friendica.pid): failed to open stream: Permission denied in /var/www/friendica/bin/daemon.php on line 165 21:24 < fikabot_> 💬 > ``` 21:24 < fikabot_> 💬 21:24 < fikabot_> 💬 Thanks man! Check the owner and permissions of the /var/www/friendica directory. 21:25 < fikabot_> 💬 I'm wondering if the ownership didn't get put to www-data:www-data or if the permissions flags are out of whack --- Log closed lun ago 08 21:31:22 2022 --- Log opened lun ago 08 21:31:35 2022 21:31 -!- Irssi: #friendica: Total of 9 nicks [0 ops, 0 halfops, 0 voices, 9 normal] 21:31 -!- Irssi: Join to #friendica was synced in 19 secs 21:43 < fikabot_> 💬 Actually the pidfile setting is probably the problem --- Log closed mar ago 09 00:00:17 2022