Posted: Thu Oct 12, 2023 20:02 Post subject: How to change default php from dd-wrt version to Entware's?
Hi,
I installed php8 from Entware along with a bunch of modules. But when I execute anything php-related, it looks like the built-in DD-WRT version is called and not the Entware-installed one ("php -ver" gives me the latter's version number, for example).
Since this binary resides in /usr/bin which is in the default $PATH, how could I make sure only the Entware versions of php are used? I did try setting the php-cgi path to the Entware directory, but that doesn't invoke the correct php itself.
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
Posted: Mon Oct 16, 2023 12:29 Post subject: Re: How to change default php from dd-wrt version to Entware
flyingfishfinger wrote:
Hi,
I installed php8 from Entware along with a bunch of modules. But when I execute anything php-related, it looks like the built-in DD-WRT version is called and not the Entware-installed one ("php -ver" gives me the latter's version number, for example).
Since this binary resides in /usr/bin which is in the default $PATH, how could I make sure only the Entware versions of php are used? I did try setting the php-cgi path to the Entware directory, but that doesn't invoke the correct php itself.
Posted: Fri Oct 20, 2023 6:41 Post subject: Re: How to change default php from dd-wrt version to Entware
flyingfishfinger wrote:
Hi,
I installed php8 from Entware along with a bunch of modules. But when I execute anything php-related, it looks like the built-in DD-WRT version is called and not the Entware-installed one ("php -ver" gives me the latter's version number, for example).
Since this binary resides in /usr/bin which is in the default $PATH, how could I make sure only the Entware versions of php are used? I did try setting the php-cgi path to the Entware directory, but that doesn't invoke the correct php itself.
Thanks,
R
- Which command do you use to execute anything php-related?
For Entware PHP8, the bin file is /opt/bin/php-cli or /opt/bin/php8-cli (there are other bin files in the same directory)
- If you prefer to use the bin name "php", you can symlink and append the path of Entware PHP8 to your PATH. Let us know if you need details.
- It may be easier if you can let us know what you're trying to do specifically.