1

So, I finally decide it to switch from windows to Mac after 20 years, and I love it! I have so many questions... I've installed apache, php, mysql, imagemagick using homebrew and I have a couple of questions...

In httpd.conf, im loading the PHP module like so:

LoadModule php7_module /usr/local/opt/php@7.2/lib/httpd/modules/libphp7.so

My php.ini is here:

/usr/local/etc/php/7.2/php.ini

When I look at the phpinfo.php I see all these extensions (or modules) that are enabled:

enter image description here But, when I look at the php.ini file, I see that those extensions are disabled

;extension=bz2
;extension=curl
;extension=fileinfo
;extension=gd2
;extension=gettext

Don't get me wrong, everything works perfectly, but i'm one of those people that likes to understand how it works...

Any reasons why my extensions are disabled in php.ini and they still show up on phpinfo.php?

EDITED

enter image description here

8
  • 1
    Those are the compile options that php is able to handle. cURL support is enabled not the cURL module itself. If you want to see the loaded modules, go to the command line and type php -m – Allan Apr 6 '20 at 3:18
  • @Allan So, if I uncomment extension=curl in php.ini, for example, what does it do? I type php -m and I see a list and in the list I see curl (see picture in edited post). – Marco Apr 6 '20 at 15:33
  • Now that says cURL module is loaded. (You could also use php -m | grep curl. This means you're not editing the correct ini file and/or not restarting php after making the change. – Allan Apr 6 '20 at 15:42
  • @Allan That's why I've asked the question, because it's so strange. I did some research and found no other .ini file. On phpinfo.php, it's pointing to the correct ini file. So, I'm thinking that maybe some modules are loaded by default... – Marco Apr 6 '20 at 16:11
  • macOS ships with an out of date version of PHP. Did you try to upgrade it? Usually folks do this via Homebrew or MacPorts. If you did, then you have two different versions of php and a different ini file. – Allan Apr 6 '20 at 23:32
1

The enabled extensions are listed in a different section of phpinfo.

You must log in to answer this question.

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