Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
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.
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 ;-)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.