PHP80
JEFFRY KILLEN
jekillen at prodigy.net
Sat May 7 14:43:57 UTC 2022
> On May 7, 2022, at 1:11 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On May 5, 2022, at 11:14 PM, JEFFRY KILLEN wrote:
>
>> I installed php80 and ran php -v in the terminal.
>> Command not found was the response.
>>
>> I looks like there was no command line version of
>> php with Monterey as well as no module. But it is not
>> clear where the php executable would be stored.
>>
>> For that matter where would ports put the php executable
>> it installs?
>>
>> I do have MAMP installed on this system and it does work.
>> But I would prefer that the server with php would run on port
>> 80 for localhost.
>>
>> I do not know what Apple really has a problem with:
>> They could offer updates to php as well as other resources.
>> The rational I have seen is that the builting php is not up to
>> date from system to system. But why would they wait for a
>> completely new system to update php?
>
> As Craig said, `port contents php80` shows you what the port installed. Specifically, the CLI PHP executable is called php80. If you want it to be available as "php", run `sudo port select php php80` which will create the appropriate symlinks for you. `sudo port select php none` will remove the symlinks.
>
> You're welcome to use php80 or any older versions; I try to keep older versions of PHP usable in MacPorts for those who need them. However, php81 is the current stable version, so consider using that.
>
> "MAMP" stands for "macOS, Apache, MySQL or MariaDB, and PHP" but I assume you meant you installed those outside of MacPorts. If so, you probably only need one set of those things, so either the ones you installed outside of MacPorts or the ones you install with MacPorts should suffice and you could remove the others.
>
> Apple has announced that scripting languages are being removed from macOS. Apple already removed php in macOS 12.0 and python 2.7 in macOS 12.3 and perhaps they will remove other scripting languages in a future version of macOS. Therefore you'll probably want to stop relying on scripting languages that Apple ships and use either MacPorts or another method to install up-to-date versions.
>
I installed MAMP prior to installing MacPorts. So I assume the MAMP and MacPorts are separate.
Thank you for the response and info
JK
More information about the macports-users
mailing list