LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2016, 11:00 AM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Rep: Reputation: Disabled
Upgrade tidy package on Centos6


I am trying to use tidy with PHP, but am having problems because I think the tidy package is 9 years old. Can it be upgraded? Thank you

Code:
[root@devserver ~]# yum list tidy
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * epel: mirrors.kernel.org
 * extras: mirrors.usc.edu
 * ius: mirrors.kernel.org
 * updates: centos.host-engine.com
1689 packages excluded due to repository priority protections
Installed Packages
tidy.x86_64                                                                0.99.0-19.20070615.1.el6                                                                @base
[root@devserver ~]# yum list libtidy
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * epel: mirrors.kernel.org
 * extras: mirrors.usc.edu
 * ius: mirrors.kernel.org
 * updates: centos.host-engine.com
1689 packages excluded due to repository priority protections
Installed Packages
libtidy.x86_64                                                              0.99.0-19.20070615.1.el6                                                               @base
Available Packages
libtidy.i686                                                                0.99.0-19.20070615.1.el6                                                               base
[root@devserver ~]# yum list php55u-tidy
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: centos.sonn.com
 * epel: mirrors.kernel.org
 * extras: mirrors.usc.edu
 * ius: mirrors.kernel.org
 * updates: centos.host-engine.com
1689 packages excluded due to repository priority protections
Installed Packages
php55u-tidy.x86_64                                                               5.5.37-1.ius.centos6                                                               @ius
[root@devserver ~]#
 
Old 07-17-2016, 12:04 PM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi there,

I'm not a tidy user, so am guessing a little, but from within PHP I think you're using the version of tidy that was built with PHP, and not the tidy/libtidy RPMs. PHP 5.5.37 is current, so I can't imagine that containing tidy v0.99. You can see the version that is in use in phpinfo(), or from the command line with:

Code:
php -i|grep -i tidy
I hope this helps ;-)
 
Old 07-17-2016, 12:12 PM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Thanks cliffordw,

I don't think I have a current version of libtidy after running "yum list libtidy", and think I might have to either compile my own or use the rpm off of https://github.com/htacg/tidy-html5/releases/tag/5.0.0.
 
Old 07-18-2016, 08:43 AM   #4
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi again,

On my machine, PHP is using a statically linked version of libtidy, and not the one in the libtidy rpm. That means they're different versions. Have you checked whether this is the case for you too?

You can see the version that PHP is using by running
Code:
php -i|grep -i tidy
as mentioned before. You can also confirm whether PHP is using /usr/lib64/libtidy.so by running
Code:
ldd /usr/bin/php|grep tidy
.

What problems are you experiencing - why do you believe it is the version of tidy that is causing the problem?
 
Old 07-22-2016, 11:44 PM   #5
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cliffordw View Post
Hi again,

On my machine, PHP is using a statically linked version of libtidy, and not the one in the libtidy rpm. That means they're different versions. Have you checked whether this is the case for you too?

You can see the version that PHP is using by running
Code:
php -i|grep -i tidy
as mentioned before. You can also confirm whether PHP is using /usr/lib64/libtidy.so by running
Code:
ldd /usr/bin/php|grep tidy
.

What problems are you experiencing - why do you believe it is the version of tidy that is causing the problem?
Hi Cliffords, Sorry for my tardiness. The reason I think it is the version of tidy that is causing the problem is that I am trying to tidy up some HTML5 and it didn't even exist in 2007. Please see the responses to your two recommendations. Thank you

Code:
[Michael@devserver drupal_dashboard]$ php -i|grep -i tidy
/etc/php.d/20-tidy.ini,
tidy
Tidy support => enabled
libTidy Release => 14 June 2007
tidy.clean_output => no value => no value
tidy.default_config => no value => no value
[Michael@devserver drupal_dashboard]$ ldd /usr/bin/php|grep tidy
[Michael@devserver drupal_dashboard]$


[root@devserver ~]#  yum list installed | grep tidy
libtidy.x86_64                        0.99.0-19.20070615.1.el6          @base
libtidy-devel.x86_64                  0.99.0-19.20070615.1.el6          @base
php55u-tidy.x86_64                    5.5.37-1.ius.centos6              @ius
tidy.x86_64                           0.99.0-19.20070615.1.el6          @base
[root@devserver ~]#

Last edited by NotionCommotion; 07-22-2016 at 11:49 PM.
 
Old 07-25-2016, 10:56 AM   #6
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
OK, it does look like PHP was compiled with that old version of tidy, which seems to be the latest version available in any Centos repo I know of.

I'm afraid the only way I know of upgrading would be to recompile both tidy and php-tidy. Alternately try this on another distro with more up to date software ;-)
 
Old 07-25-2016, 12:42 PM   #7
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Oh well... Thank you Clifford for your help!
 
Old 07-25-2016, 12:53 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
You could always give htmLawed a whirl (http://www.bioinformatics.org/phplab...ties/htmLawed/).
 
Old 07-25-2016, 12:59 PM   #9
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Hi Hydrurga. Definitely a possibility. Looks like it works with HTML5. Have you ever used it? Do you like it? Thanks
 
Old 07-25-2016, 01:41 PM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by NotionCommotion View Post
Hi Hydrurga. Definitely a possibility. Looks like it works with HTML5. Have you ever used it? Do you like it? Thanks
I'm afraid I haven't tried it, NC. I just thought: well if you can't use Tidy, is there anything else you might be able to use? I found htmlLawed on a web search and quickly checked that it was remotely feasible as an option before suggesting it.

If you do try it out, please let us know how you get on.
 
Old 07-25-2016, 06:16 PM   #11
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 789

Original Poster
Rep: Reputation: Disabled
Thanks hydrurga, If I look into it, I will post a critique. For the short term, however, I will probably stick with my old version of Tidy. A kludge workaround is to omit the doctype using "omit", and manually adding the HTML doctype.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adcli rpm package not available for centos6 from epel-release repository rahul.buragohain Linux - Software 8 05-23-2016 11:00 AM
how upgrade OEL6.1 to Centos6.7 seighalani Linux - Software 2 12-14-2015 05:09 PM
How to upgrade kernel in rhel6/centos6 with internet. manually download and upgrade. Gil@LQ Linux - Kernel 3 03-12-2012 05:07 PM
DISCUSSION: Tidy Up With HTML Tidy jeremy LinuxAnswers Discussion 0 10-10-2005 07:25 PM
Does apt-get install <package> upgrade the package if it is already installed? davidas Debian 4 04-05-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration