CentOS/RHEL: How To Install PHP-tidy module

You may be need to install php-tidy module while using php on LAMP Env. How Do I install php-tidy module on Centos or RHEL operating system while setup Apache web server. How to install php-tidy?

You need to use “yum install” command to install php-tidy package as PHP extension.

​php-tidy is a binding for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipulate HTML documents, but also traverse the document tree.

CentOS install PHP-tidy module


Type the following command to install php-tidy module on your centos or rhel system:

yum install php-tidy

outputs:

[root@osetc]# yum install glances

Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * extras: mirrors.163.com

 * updates: mirrors.163.com

Setting up Install Process

No package glances available.

Error: Nothing to do

[root@devops Desktop]# yum install glances

Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * extras: mirrors.163.com

 * updates: mirrors.163.com

Setting up Install Process

No package glances available.

Error: Nothing to do

[root@devops Desktop]#

[root@devops Desktop]#

[root@devops Desktop]#

[root@devops Desktop]# yum install php-tidy

Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock

Loading mirror speeds from cached hostfile

 * base: mirrors.163.com

 * extras: mirrors.163.com

 * updates: mirrors.163.com

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package php-tidy.x86_64 0:5.3.3-40.el6_6 will be installed

--> Processing Dependency: php-common(x86-64) = 5.3.3-40.el6_6 for package: php-tidy-5.3.3-40.el6_6.x86_64

--> Processing Dependency: libtidy-0.99.so.0()(64bit) for package: php-tidy-5.3.3-40.el6_6.x86_64

--> Running transaction check

---> Package libtidy.x86_64 0:0.99.0-19.20070615.1.el6 will be installed

---> Package php-common.x86_64 0:5.3.3-40.el6_6 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

 Package         Arch        Version                         Repository    Size

================================================================================

Installing:

 php-tidy        x86_64      5.3.3-40.el6_6                  updates       39 k

Installing for dependencies:

 libtidy         x86_64      0.99.0-19.20070615.1.el6        base         127 k

 php-common      x86_64      5.3.3-40.el6_6                  updates      527 k

Transaction Summary

================================================================================

Install       3 Package(s)

Total download size: 693 k

Installed size: 3.3 M

Is this ok [y/N]: y

Downloading Packages:

(1/3): libtidy-0.99.0-19.20070615.1.el6.x86_64.rpm       | 127 kB     00:00    

(2/3): php-common-5.3.3-40.el6_6.x86_64.rpm              | 527 kB     00:01    

(3/3): php-tidy-5.3.3-40.el6_6.x86_64.rpm                |  39 kB     00:00    

--------------------------------------------------------------------------------

Total                                           108 kB/s | 693 kB     00:06    

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing : php-common-5.3.3-40.el6_6.x86_64                             1/3

  Installing : libtidy-0.99.0-19.20070615.1.el6.x86_64                      2/3

  Installing : php-tidy-5.3.3-40.el6_6.x86_64                               3/3

  Verifying  : libtidy-0.99.0-19.20070615.1.el6.x86_64                      1/3

  Verifying  : php-tidy-5.3.3-40.el6_6.x86_64                               2/3

  Verifying  : php-common-5.3.3-40.el6_6.x86_64                             3/3

Installed:

  php-tidy.x86_64 0:5.3.3-40.el6_6                                              

Dependency Installed:

  libtidy.x86_64 0:0.99.0-19.20070615.1.el6  php-common.x86_64 0:5.3.3-40.el6_6

Complete!

Restart Apache service

Type the following command:

service httpd restart

Check if tidy module is installed 

Type the following command:

php -i | grep -color tidy

outputs:

PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in Unknown on line 0

tidy

Extension Version => 2.0 ($Id: tidy.c 296107 2010-03-12 10:28:59Z jani $)

tidy.clean_output => no value => no value

tidy.default_config => no value => no value

 

You might also like:

Sidebar



back to top