allebb / pirrot

A radio repeater controller (supporting both simplex and duplex operation modes) for the RaspberryPi.
https://pirrot.hallinet.com
57 stars 13 forks source link

PHP Errors when starting Pirrot service #42

Closed lama9800 closed 2 years ago

lama9800 commented 2 years ago

Hi

I have tryed checking the status of the Pirrot service after install and found the folling error.

● pirrot.service - LSB: The Pirrot Repeater Daemon Loaded: loaded (/etc/init.d/pirrot; generated) Active: active (exited) since Mon 2021-12-20 10:53:01 GMT; 1 day 20h ago Docs: man:systemd-sysv-generator(8) Process: 364 ExecStart=/etc/init.d/pirrot start (code=exited, status=0/SUCCESS) CPU: 55ms

Dec 20 10:53:01 raspberrypi systemd[1]: Starting LSB: The Pirrot Repeater Daemon... Dec 20 10:53:01 raspberrypi pirrot[364]: Starting Pirrot... Dec 20 10:53:01 raspberrypi pirrot[364]: done! Dec 20 10:53:01 raspberrypi systemd[1]: Started LSB: The Pirrot Repeater Daemon. Dec 20 10:53:01 raspberrypi pirrot[414]: /usr/bin/env: ‘php’ Dec 20 10:53:01 raspberrypi pirrot[415]: /usr/bin/env: ‘php’: No such file or directory Dec 20 10:53:01 raspberrypi pirrot[414]: : No such file or directory

I then istalled PHP 8.1 as per this website https://pimylifeup.com/raspberry-pi-latest-php/

then i got this when checking the service after installling PHP

● pirrot.service - LSB: The Pirrot Repeater Daemon Loaded: loaded (/etc/init.d/pirrot; generated) Active: active (exited) since Wed 2021-12-22 07:47:14 GMT; 1s ago Docs: man:systemd-sysv-generator(8) Process: 26196 ExecStart=/etc/init.d/pirrot start (code=exited, status=0/SUCCESS) CPU: 249ms

Dec 22 07:47:14 raspberrypi pirrot[26197]: PHP Warning: require_once(/opt/pirrot/vendor/autoload.php): Failed to open stream: No such file or directory in /opt/pirrot/pirrot on line 18 Dec 22 07:47:14 raspberrypi pirrot[26198]: PHP Warning: require_once(/opt/pirrot/vendor/autoload.php): Failed to open stream: No such file or directory in /opt/pirrot/pirrot on line 18 Dec 22 07:47:14 raspberrypi pirrot[26198]: PHP Fatal error: Uncaught Error: Failed opening required '/opt/pirrot/vendor/autoload.php' (include_path='.:/usr/share/php') in /opt/pirrot/pirrot:18 Dec 22 07:47:14 raspberrypi pirrot[26198]: Stack trace: Dec 22 07:47:14 raspberrypi pirrot[26198]: #0 {main} Dec 22 07:47:14 raspberrypi pirrot[26198]: thrown in /opt/pirrot/pirrot on line 18 Dec 22 07:47:14 raspberrypi pirrot[26197]: PHP Fatal error: Uncaught Error: Failed opening required '/opt/pirrot/vendor/autoload.php' (include_path='.:/usr/share/php') in /opt/pirrot/pirrot:18 Dec 22 07:47:14 raspberrypi pirrot[26197]: Stack trace: Dec 22 07:47:14 raspberrypi pirrot[26197]: #0 {main} Dec 22 07:47:14 raspberrypi pirrot[26197]: thrown in /opt/pirrot/pirrot on line 18

i am running a fresh version of Raspbian 11 bullseye on a Pi 3B+

let me know if you need anymore info.

allebb commented 2 years ago

Hi lama9800,

How did you originally install Pirrot and did it work prior to you manually upgrading to PHP 8.1?

By default, the Pirrot installer will install everything you need - the dependencies etc and one crucial part (which seems to have possibly been missed from your error messages given that the Composer generated "autoload.php" file cannot be found - this is generated when Composer Install is run) is that the Composer package manager is used to pull in all of the PHP package dependencies.

PHP 8.1 hasn't been out all that long and so, at this point, I've not had a chance to upgrade the dependencies but I aim to do so early January time (just super busy on some other projects at the moment).

You may be able to resolve this issue simply by re-running the specific installer commands that would normally install these Composer packages which would be as follows:

sudo composer install -q --working-dir /opt/pirrot --no-dev --no-interaction sudo composer install -q --working-dir /opt/pirrot/web --no-dev --no-interaction

At this point, either attempt to restart the Pirrot daemon or simply reboot your Raspberry Pi to test :)

Please let me know how you get on :+1

Cheers, Bobby

On Wed, 22 Dec 2021 at 08:02, lama9800 @.***> wrote:

Hi

I have tryed checking the status of the Pirrot service after install and found the folling error.

● pirrot.service - LSB: The Pirrot Repeater Daemon Loaded: loaded (/etc/init.d/pirrot; generated) Active: active (exited) since Mon 2021-12-20 10:53:01 GMT; 1 day 20h ago Docs: man:systemd-sysv-generator(8) Process: 364 ExecStart=/etc/init.d/pirrot start (code=exited, status=0/SUCCESS) CPU: 55ms

Dec 20 10:53:01 raspberrypi systemd[1]: Starting LSB: The Pirrot Repeater Daemon... Dec 20 10:53:01 raspberrypi pirrot[364]: Starting Pirrot... Dec 20 10:53:01 raspberrypi pirrot[364]: done! Dec 20 10:53:01 raspberrypi systemd[1]: Started LSB: The Pirrot Repeater Daemon. Dec 20 10:53:01 raspberrypi pirrot[414]: /usr/bin/env: ‘php’ Dec 20 10:53:01 raspberrypi pirrot[415]: /usr/bin/env: ‘php’: No such file or directory Dec 20 10:53:01 raspberrypi pirrot[414]: : No such file or directory

I then istalled PHP 8.1 as per this website https://pimylifeup.com/raspberry-pi-latest-php/

then i got this when checking the service after installling PHP

● pirrot.service - LSB: The Pirrot Repeater Daemon Loaded: loaded (/etc/init.d/pirrot; generated) Active: active (exited) since Wed 2021-12-22 07:47:14 GMT; 1s ago Docs: man:systemd-sysv-generator(8) Process: 26196 ExecStart=/etc/init.d/pirrot start (code=exited, status=0/SUCCESS) CPU: 249ms

Dec 22 07:47:14 raspberrypi pirrot[26197]: PHP Warning: require_once(/opt/pirrot/vendor/autoload.php): Failed to open stream: No such file or directory in /opt/pirrot/pirrot on line 18 Dec 22 07:47:14 raspberrypi pirrot[26198]: PHP Warning: require_once(/opt/pirrot/vendor/autoload.php): Failed to open stream: No such file or directory in /opt/pirrot/pirrot on line 18 Dec 22 07:47:14 raspberrypi pirrot[26198]: PHP Fatal error: Uncaught Error: Failed opening required '/opt/pirrot/vendor/autoload.php' (include_path='.:/usr/share/php') in /opt/pirrot/pirrot:18 Dec 22 07:47:14 raspberrypi pirrot[26198]: Stack trace: Dec 22 07:47:14 raspberrypi pirrot[26198]: #0 {main} Dec 22 07:47:14 raspberrypi pirrot[26198]: thrown in /opt/pirrot/pirrot on line 18 Dec 22 07:47:14 raspberrypi pirrot[26197]: PHP Fatal error: Uncaught Error: Failed opening required '/opt/pirrot/vendor/autoload.php' (include_path='.:/usr/share/php') in /opt/pirrot/pirrot:18 Dec 22 07:47:14 raspberrypi pirrot[26197]: Stack trace: Dec 22 07:47:14 raspberrypi pirrot[26197]: #0 {main} Dec 22 07:47:14 raspberrypi pirrot[26197]: thrown in /opt/pirrot/pirrot on line 18

i am running a fresh version of Raspbian 11 bullseye on a Pi 3B+

let me know if you need anymore info.

— Reply to this email directly, view it on GitHub https://github.com/allebb/pirrot/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3NDDCHSXP2G4B2RXEIL3USGAYZANCNFSM5KR6FI3Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

lama9800 commented 2 years ago

Hi Bobby

Thanks for responding back so quickly 😃.

"How did you originally install Pirrot and did it work prior to you manually upgrading to PHP 8.1?"

I used the Git for the install and unfortunately it did not work. it was still showing up with PHP/Composer errors even with the web page disabled.

It did end up working (or at least with starting with no errors) in V1.0.6 which i was using just to troubleshoot. I decided to try and upgrade to V2.0.0 so i can get the web interface and the following errors showed up when installing. Install.txt

I have then tried what you sugested to do after the install and i got the folloing errors: pi@raspberrypi:~ $ sudo composer install -q --working-dir /opt/pirrot --no-dev --no-interaction Your lock file does not contain a compatible set of packages. Please run composer update. pi@raspberrypi:~ $ sudo composer install -q --working-dir /opt/pirrot/web --no-dev --no-interaction Your lock file does not contain a compatible set of packages. Please run composer update.

I then tried running composer update and got the following errors: composer.txt

Any sugestions?

allebb commented 2 years ago

Looking at your error message (the text file), it seems like you're missing a couple of PHP packages which is preventing Composer from installing the dependencies, you should install them as follows (and then try the "composer install" command again):

sudo apt install php8.1-curl php8.1-sqlite3

Hopefully this should get you up and running again :D

On Thu, 23 Dec 2021 at 03:40, lama9800 @.***> wrote:

Hi Bobby

Thanks for responding back so quickly 😃.

"How did you originally install Pirrot and did it work prior to you manually upgrading to PHP 8.1?"

I used the Git for the install and unfortunately it did not work. it was still showing up with PHP/Composer errors even with the web page disabled.

It did end up working (or at least with starting with no errors) in V1.0.6 which i was using just to troubleshoot. I decided to try and upgrade to V2.0.0 so i can get the web interface and the following errors showed up when installing. Install.txt https://github.com/allebb/pirrot/files/7766449/Install.txt

I have then tried what you sugested to do after the install and i got the folloing errors: @.:~ $ sudo composer install -q --working-dir /opt/pirrot --no-dev --no-interaction Your lock file does not contain a compatible set of packages. Please run composer update. @.:~ $ sudo composer install -q --working-dir /opt/pirrot/web --no-dev --no-interaction Your lock file does not contain a compatible set of packages. Please run composer update.

I then tried running composer update and got the following errors: composer.txt https://github.com/allebb/pirrot/files/7766468/composer.txt

Any sugestions?

— Reply to this email directly, view it on GitHub https://github.com/allebb/pirrot/issues/42#issuecomment-1000020370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAF3NDFSDATHAR5POTNVUBDUSKK3XANCNFSM5KR6FI3Q . You are receiving this because you commented.Message ID: @.***>

allebb commented 2 years ago

Pirrot version 3.0.0 has been released this morning with full support for Raspbian Bullseye and uses the latest PHP 8.1 version 👍

lama9800 commented 2 years ago

@allebb Sorry for the late response. I ended up installing it on Buster Lite. And its all working now. I might try and install it on Bullseye soon. Thanks again for your help.

allebb commented 2 years ago

No problem Buddy 👍

Sent from my iPhone

On 23 Jan 2022, at 10:39, lama9800 @.***> wrote:

 @allebb Sorry for the late response. I ended up installing it on Buster Lite. And its all working now. I might try and install it on Bullseye soon. Thanks again for your help.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.