PXE-Manager
PXE-Manager copied to clipboard
PHP Parse error: syntax error, Composer/IO/BaseIO.php on line 163
Hello, I'm giving this a try in an LXC container running ubuntu 22.04 headless
I mostly followed the instructions during install, skipped the firewall stuff as my network config is not passthrough (using dhcp proxy in the same broadcast as my "real" dhcp server) and I also used different settings for dnsmasq
I get a problem when I make it to "composer install", fails with the following error
"PHP Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /usr/share/php/Composer/IO/BaseIO.php on line 163"
Did some initial search found
This video, which claims it's a php version error
And this other issue, which also suggests it's a php version and maybe use --ignore-platform-reqs
php version reports
root@pxemanager:/var/www/pxe-manager# php --version PHP 7.4.30 (cli) (built: Aug 1 2022 15:06:35) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
Since the installation instruction call libapache2-mod-php7.4 git php7.4-sqlite3 by version number, I imagine there's something significant about php 7.4 ?
I tried running composer install --ignore-platform-reqs This did not change the error message
I'm not sure what to try next, I'll try upgrade or downgrading php maybe
I've noticed these lines, maybe adding the ppa:ondrej/apache2 repository and running upgrade will do something
CAVEATS:
- If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
- If you are using apache2, you are advised to add ppa:ondrej/apache2
- If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline or ppa:ondrej/nginx
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/