I am facing the issue while setup the Akaunting application. I cloned this repo from GITHUB source
1: https://github.com/akaunting/akaunting. I followed all the steps and fulfilled all requirements, but when I serve this project it can show me this error on the screen (Error: Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI.). My Php version is 7.4.10. Please help me out on how to fix this issue?
Question posted in PHP Versions
You can find a list of all versions here.
You can find a list of all versions here.
4
Answers
I had a similar issue. I got is resolved by doing the following.
You need to check the PHP version globally and in the project directory.
This error appears when there is a difference in PHP Version of these folders. In my case reinstalling the composer did the trick.
So there may be many, many reasons for this issue, hopefully one answer will resolve it for you. In my case, I had to do 2 things:
So for part 2:
would become:
Like this you should skip to the wizard and select the language setting.
I hope this helped!!
Cheers.
The reason why for this error is because Akaunting is using command line (CLi)
php
to get your installed php version instead of universal accepted method of getting php version through built inphpinfo()
.Because it’s using CLi
php
it might not work properly with xampp or any other php hosting server that did not configure the right path tophp
binary in the environment variablesTo fix this in windows, locate
php.exe
most probably in [pathTo]xamppphpphp.exe and add them into your windows environment variables .Launch cmd and execute this
To fix this in Linux, locate
php
binary path, most probably at in [path]/bin folder`.Launch Shell/bash
restart your web server to refresh the new environment PATH