PHP not changing version on virtualhost

NethServer Version: 7.9.2009
Module: Virtual_hosts or rh-php-73?

I’m trying to run the web installer for akaunting on a virtualhost on nethserver, and it come up with “Error: Ask your hosting provider to use PHP 7.3.0 or higher for both HTTP and CLI.” Its already set in the virtualhost settings to 7.3. I’ve changed it to other versions and back and nothing seems to fix it. It mentions setting the PHP_BINARY variable or PHP_PATH variable in a hidden .env file, but I’m not sure what that path would be with Nethserver, as there’s several locations of PHP binarys all over the place :confused:

I’ll either get this working through docker on a reverse proxy or the old fashioned way here fingers crossed!

My free accounting software with Waveapps is shutting down, so I need to get this one up and running so I can do invoices on site on a pretty interface :slight_smile:

Looking forward to your advice on the matter.

can you explain what the “web installer” is?

Asking as on NS we run rh-php73 in software collection.
This means the systems default PHP version is not the same as the PHP version of the virtual-host.

Just to help to demonstrate the above run on the command line:

scl enable rh-php73 bash

php --version

PHP 7.3.20 (cli) (built: Dec 1 2020 12:22:19) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.20, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.20, Copyright (c) 1999-2018, by Zend Technologies

exit

php --version

PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

EDIT: WARNING

Never !! replace the default systems php with packages from 3th party repositories. Even if a howto on the www suggest to do so. It will break your system!

As a test, change to the directory represented by that virtualhost, and create a file called test.php. Its contents should be:

<? phpinfo(); ?>

…and then browse to http://thatvirtualhost/test.php. See what PHP version it’s reporting.

1 Like

Did that, yep you’re right it is reporting 7.3 as the php version. I guess I’ll hit up Akauntings blogs and see if they know why it does not work. Curiously the older copy of their Akaunting package worked fine, it offered an upgrade so I clicked it within the app and that’s when this all stopped working.

The web installer is simply the wizard that comes up once you load the files on the vhost. It assists with setting up the mysql database and personal settings. It’s also the thing that’s giving me the error complaining about the PHP version. But as I’ve realised it’s must be a bug with Akaunting’s new version of the software, not the vhost php version.

Thanks

possibly that akaunting does a php -v in the cli to determine if you have the expected version