Forum

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

New Discussion

PHP_BINARY or PHP_PATH

Pound   ( User )

Commented 4 years ago

Hi everyone,

First time for me on Akaunting and very exciting.

I try to install Akaunting (2.0.7) on Azure App Service (with PHP 7.4 64-bit settings). Unfortunately, I got this message when first run.

"The PHP CLI executable file is not working! Please, ask your hosting company to set PHP_BINARY or PHP_PATH environment variable correctly."

When extract value of these 2 variables, I got:

PHP_BINARY=D:\Program Files\PHP\v7.4\php-cgi.exe
PHP_PATH={null}

Anyone can help how to run Akaunting on Azure? :D

Cheers,
Pound ^^

Sabri Saleh   ( User )

Commented 4 years ago

i have got the same issue

Pound   ( User )

Commented 4 years ago

It's bug from getPhpBinary static function in Utilities\Console.php which always end with "php-cgi.exe" in return value not "php.exe" or "php".

I'm not sure how to report bug but confirm that it's bug and can reproduce in Azure App Service environment.

Pound

Denis Dulici   ( Admin )

Commented 4 years ago

Hello,

It's not a bug but what Laravel and Symfony use for the console:

https://github.com/laravel/framework/blob/7.x/src/Illuminate/Console/Application.php#L109

You can check the PHP configuration of your Azure instance and/or set the correct PHP as PHP_BINARY in .env file of Akaunting.

Regards

Max   ( User )

Commented 4 years ago

Hi,
I also have the same issue. I did not manage to fix it, I send the error to my hosting company asking for help. They replied "It could be related to that we do not permit suexec, and to pass PHP variables you have to create a wrapper for your scripts...As to what variables to pass, I would ask Akaunting them directly about that."

Any help appreciated.

Denis Dulici   ( Admin )

Commented 4 years ago

Hello Max,

They must be sure that PHP CLI executable file is defined/working and its version is 7.2.5 or higher.

You can also set the proper PHP CLI path and set it in the .env file of Akaunting like the following:

PHP_BINARY="/path/to/php"

Regards

Ridvan Sahin   ( User )

Commented 4 years ago

Hi all,
I have the same problem, i tried many things but i was not able to solve the problem

I typed in the .env File following PHP_BINARY entries:
/opt/plesk/php/7.4/etc
/opt/plesk/php/7.4/etc/php.ini
/etc/
/usr/bin/php

After this I got an error that this paths are not allowed at open_basedir.
I also typed these path to open_basedir, then I still went back to the first error.

"The PHP CLI executable file is not working! Please, ask your hosting company to set PHP_BINARY or PHP_PATH environment variable correctly."

I am Using CentOS7 on Plesk Obsidian, can someone helps me with this issue.

Best regards
Ridvan

Enderwolf   ( User )

Commented 4 years ago

Hi All,

Also here on a Windows 2012 r2, IIS 8 installation, I am getting the following error:
"The PHP CLI executable file is not working! Please, ask your hosting company to set PHP_BINARY or PHP_PATH environment variable correctly."

I have checked all PHP settings and verified the PATH settings.

Tested several PHP Versions: v7.3.17 and v7.4.5.
With both versions I have tried adding the following line to .env (respective to the version):
PHP_PATH='C:\Program Files\PHP\v7.3.17'
PHP_PATH='C:\Program Files\PHP\v7.4.5'

The php-cgi.exe executable is in the above mentioned directories, also the regular php.exe and php-win.exe is in this directory.

Kind regards,
EnderWolf

Caras   ( User )

Commented 4 years ago

hi enderwolf,
I have a same problem, but I cant solve it.
I am using appserv on windows 10. How can I setup PHP_BINARY or PHP_PATH?

Sabri Saleh   ( User )

Commented 4 years ago

Your software looks promising but We usually fails in installation stage, would you kindly make solution for such installation fatal errors! Make it easy setup as Wordpress with zero installation error please

Regards

Please login or register to leave a response.

Showing 1 to 10 of 20 discussions