Fatal error: Call to undefined function preg_match()
Recently, I had to install pecl_http on a freebsd server that ran php 5.2.x. When running
pecl install pecl_http
as suggested by php.net, the following error occured:
Fatal error: Call to undefined function preg_match() in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70
After making sure the pcre php extension was installed, I searched the internet for the issue. Finally found a relevant answer from blog@insidesystems.net
All I needed to do was remove -n from the pecl script. Worked like a charm.