How do I install gettext on mac?
I get this error on one of my php pages:
Fatal error: Call to undefined function bindtextdomain()
If reinstall php is acceptable, try to download and install the php version you want from here.
In my case, I used 7.0 version. Steps to reinstall:
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.0
The installed php will reside at /usr/local/php5-7.0.31-20180903-120321/lib (I'm not sure why the directory name is php5-7xxxx, but the installed php version is 7.0)
Edit apache2 config at /private/etc/apache2/httpd.conf (make a backup if necessary)
Replace LoadModule php7_module libexec/apache2/libphp7.so with LoadModule php7_module /usr/local/php5-7.0.31-20180903-120321/libphp7.so (remember to uncomment the "#" symbol), then save and exit.
Finally, run apachectl restart to restart your apache server.