To install the PECL filter extension for PHP 5.x on CentOS or Red Hat Linux, you will need to have PHP and the php-pear
package installed on your system.
First, check if PHP is installed on your system by running the following command:
refer to:lautturi.comphp -v
If PHP is not installed, you can install it using the package manager. On CentOS, you can use yum
to install PHP:
sudo yum install php
On Red Hat Linux, you can use dnf
to install PHP:
sudo dnf install php
Next, install the php-pear
package:
sudo yum install php-pear
Once PHP and php-pear
are installed, you can use pecl
to install the PECL filter extension. Run the following command:
sudo pecl install filter
This will install the PECL filter extension.
Finally, enable the extension by adding the following line to your php.ini
configuration file:
extension=filter.so
Restart Apache to apply the changes:
sudo systemctl restart httpd
The PECL filter extension should now be installed and enabled on your system. You can verify that the extension is loaded by running the following command:
php -m | grep filter
This should output filter
if the extension is loaded.