pecl: command not found when trying to install PHP SQL Server driver
I need to be able to access MSSQL databases from PHP and I'm trying to activate the driver to do so, since mssql php natively was removed after PHP 5.6.
Here's what I tried:
sudo su
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
exit
sudo ACCEPT_EULA=Y yum install msodbcsql
sudo yum install unixODBC-devel
yum groupinstall "Development Tools"
sudo pecl install sqlsrv pdo_sqlsrv
sudo echo "extension= pdo_sqlsrv.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
sudo echo "extension= sqlsrv.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
I get the error message "pecl: command not found"
What can I do to get this installed?
It seems pecl
isn't installed.
On RHEL, you'd install it like this:
yum install php-pear