Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

PHP error installing version 3.0.16

Erik Hammer   ( User )

Commented 1 year ago

I am trying to install the newest version 3.0.16 and keep getting this error:
"Error: Ask your hosting provider to use PHP 8.0.2 or higher for both HTTP and CLI."
I am installing on a server running Red Hat Enterprise Linux Server release 7.9 (Maipo) and the php version is 8.1.21 (I checked with phpinfo).
I can see there is a php-version compare in /bootstrap/autoload.php, but this has an other wording of the error message.
Anyone got a clue to what goes wrong?

Erik Hammer   ( User )

Commented 1 year ago

I have looked for other checks of the php-version but I can not find where it does not acknowledge php-version 8.1.21.
However in the logfile (placed in /storage/logs) I keep getting this error:

"
[Date and time] local.DEBUG: Console command:: 'php' 'artisan' help
[Date and time] local.DEBUG: Console output:: The command "'php' 'artisan' help" failed.
Exit Code: 1(General error)
Working directory: /var/www//akaunting
Output:
================
Error: Ask your hosting provider to use PHP 8.0.2 or higher for HTTP, CLI, and php command.
Current PHP version: 7.4.33
Error Output:
================
[Date and time] local.ERROR: syntax error, unexpected token "public" {"exception":"[object] (ParseError(code: 0): syntax error, unexpected token \"public\" at /var/www//akaunting/app/Utilities/Installer.php:135)
[stacktrace]
"

It seems to be the same error as mentioned in the article "PHP error on installation".
I tried to mark lines 123 through 125 as comments in installer.php and the installation worked fine.

Problem seems to be solved, but I am curious if the error has anything to do with the fact, that the server as default runs php-version 7.4 and the php PATH is changed in a .bash_profile file to php-version 8.1

Please login or register to leave a response.

Showing 1 to 2 of 2 discussions