Softaculous


Topic : Can not run php in terminal


Posted By: doxtor on June 21, 2018, 4:43 am
Hello team,

When I login in terminal, and run php there, it said that php: command not found.
While i'm sure, there's php installed, because I can open my website and webuzo panel.
How to enable php command in terminal?

Thank you,
Best regards

Posted By: webuzo_manager on June 21, 2018, 5:31 am | Post: 1
Hi doxtor,

Hmm, strange issue.

Might be the symlink that links to the custom PHP binary location in Webuzo is broken.

Can you check if you can run PHP in the terminal by giving the full path?

You can find the PHP binary at the following location:
/usr/local/apps/php{VERSION_NO}/bin/php

Edited by webuzo_manager : June 21, 2018, 5:32 am

Posted By: doxtor on June 22, 2018, 1:31 am | Post: 2
Hi nikhil.m,

Yes, it works with full path :-)

What problem is it? And how to repair it?
Thank you so much

Posted By: webuzo_manager on June 22, 2018, 8:05 am | Post: 3
Hi doxtor,

Glad to know that it helped.

>>What problem is it? And how to repair it?

It seems that the Symlink that links the /usr/bin/php to the custom Webuzo PHP binary might be broken.

You can repair it using the following command:

ln -sf /usr/local/apps/php{VERSION_NO}/bin/php  /usr/bin/php

After executing the above command running PHP scripts directly would work.

Eg:

php  /path/to/php/file

Posted By: doxtor on June 22, 2018, 9:48 am | Post: 4
Thank you so much nikhil.m
Now it's work :-)

Posted By: webuzo_manager on June 22, 2018, 12:31 pm | Post: 5
Hi doxtor,

Glad to know that your issue has been resolved.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.