7

I just attempted to load a new development page without having created the httpdconf entry, & got the PHPinfo page with the following in the header...

PHP Version 7.3.22-(to be removed in future macOS)

Does this mean Apple are intending to remove PHP from a future version of macOS? Or is it simply flagging that this version of PHP will be replaced?

2
  • 2
    They will just remove it when shipping macOS. In macOS 10.15, they removed Python, Perl, and Ruby. If you need it, you can just install it yourself as most users don't need those interpreters preinstalled.
    – dcangulo
    Commented Oct 28, 2020 at 8:07
  • 2
    Python, perl and ruby are still part of 10.15.
    – nohillside
    Commented Oct 28, 2020 at 8:30

3 Answers 3

4

php -v gives the following response:

WARNING: PHP is not recommended  
PHP is included in macOS for compatibility with legacy software.  
Future versions of macOS will not include PHP.

The release notes for Catalina contain the following remark:

https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes

Scripting Language Runtimes
Deprecations
Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. Future versions of macOS won’t include scripting language runtimes by default, and might require you to install additional packages. If your software depends on scripting languages, it’s recommended that you bundle the runtime within the app.

In short: macOS continues to include 'legacy' versions of things like Python, Ruby, Perl, and indeed PHP, so that existing code won't break, but Apple is leaving it to the user to install the versions that they want to use.

At the time of writing, 10.16 ('macOS 11') continues to include these languages.

4
  • 1
    Removing these things seems like a kick in the guts to developers using Mac. However the transition to Apple silicon means it will have to be a Mac specific compile. I guess Apple have decided to leave that to users/developers. It seems a sad decision.
    – Pedro
    Commented Nov 29, 2020 at 9:10
  • 1
    @Pedro Most developers I know always say "never use the system bundled versions". Personally, I like the continuity of knowing that something will run from Tiger to Big Sur. (I wonder whether the M1 Mac have ARM versions of python2....?)
    – benwiggy
    Commented Nov 30, 2020 at 10:04
  • 1
    Just checked: Apple have recompiled python2 for ARM in Big Sur! Deprecated my ass!
    – benwiggy
    Commented Nov 30, 2020 at 10:13
  • 1
    I'm a mere hobby developer & have used the bundled Apache & PHP all along. They provide all I need, it's simpler than installing my own, & the only hiccup is that macOS updates overwrite httpd.conf so I keep a backup copy.
    – Pedro
    Commented Nov 30, 2020 at 14:25
2

My understanding of “the plan” is for the OS to not come with PHP included. Apple did a similar transition - removing many open source tools and bundled code bases - from the Server.app

Many of the server services went to the OS. Now the OS will be slimmed in the same manner. You will still be able to install PHP as you please / whichever version, but you’ll have to choose whether it comes from the App Store or another vector.

Historically, these take a year or three to implement, but there’s nothing stopping Apple from pulling PHP from 11.0.1 or any other mid-year point release.

1
  • I used to use Server.app for all my web dev server stuff. Apple went further than you say & removed everything that makes it what I recognise as a server. What good was what remained, I don't know.
    – Pedro
    Commented Feb 6, 2021 at 5:36
1

I got really surprised when I first saw this message on Terminal today, but to be honest, as I developer I don't like neither recommend using built-in scripting language like PHP, Ruby or even Apache, I always do and recommend if you need those tools so build and compile it yourself based on your needs, for an example I never use built-in PHP and Ruby because macOs always come with an outdated version of it.

1
  • 1
    For many, bundled versions of these things are simple & sufficient.
    – Pedro
    Commented Feb 6, 2021 at 5:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .