LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 08-20-2008, 06:23 PM   #1
Ateo
Member
 
Registered: Sep 2004
Location: http://longbeach.ca.u$
Distribution: Ubuntu,Gentoo, OSX
Posts: 136

Rep: Reputation: 15
PHP 5.1.6 + tidy 1.2 module


I'm having some issues with php and the tidy module. I'm trying to figure out if this is a bug or not. I'm hoping someone else running 5.1.6 could help me verify this.

Now, we assume we've loaded tidy.so via php.ini (or php.d or whatever) so that php loads tidy when started. The bottom line, tidy is registered and tidy information appears in phpinfo. We assume all is good.

Here are my tests scripts.....

Code block one indicates that the tidy extension is loaded:
Code:
<?php

if (extension_loaded('tidy'))
{
	print('tidy loaded.');
	exit;
}
else
{
	print('tidy not installed...');
	exit;
}

?>
This executes fine and returns tidy loaded.

The 2nd code block fails.

Code:
<?

if (extension_loaded('tidy'))
{
	print('tidy loaded.');
	$tidy = new tidy;
	print('tidy object loaded.');
	exit;
}
else
{
	print('tidy not installed...');
	exit;
}

?>
Here, the return is tidy loaded but not tidy object loaded. And apache logs the following:

Code:
[Wed Aug 20 14:49:01 2008] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error:  Class 'tidy' \\
not found in /home/site/public_html/basic_tidy.php on line 20
Lastly, this is not a case where i can just upgrade to the 5.2 series (on this one server) due to one package running on it that breaks with 5.2. I have tidy running just fine with the 5.2 series... so I would if I could but I can't.

Server Software info:
Fedora Core 6
php-devel 5.1.6-3.7.fc6
php 5.1.6-3.7.fc6
libtidy-devel 0.99.0-14.20070615.el5
libtidy 0.99.0-14.20070615.el5

From here I first tried installing and using:
tidy 0.99.0-14.20070615.el5
php-tidy 5.1.6-4.fc6

After that kept failing, I removed tidy and php-tidy and installed tidy with PEAR ('pecl install tidy'). Both fail.

In any case, if anyone has some time, I'd appreciate input.

Thanks.
 
Old 08-22-2008, 02:21 PM   #2
Ateo
Member
 
Registered: Sep 2004
Location: http://longbeach.ca.u$
Distribution: Ubuntu,Gentoo, OSX
Posts: 136

Original Poster
Rep: Reputation: 15
Well, I solved this. I ended up forcing an upgrade to 5.2.6 on the server compiling from source. Took more time than I wanted but at least I got an upgrade out of it.
 
  


Reply

Tags
class, error, fatal, found, php, tidy


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Add tidy to php in RedHat Enterprise 5.1 ?? PrimeMogul Red Hat 4 05-16-2008 10:02 AM
LXer: Tidy URL Rewrites with PHP LXer Syndicated Linux News 0 02-21-2007 11:46 PM
DISCUSSION: Tidy Up With HTML Tidy jeremy LinuxAnswers Discussion 0 10-10-2005 08:25 PM
HTML Tidy and PHP 4 atom Programming 0 10-01-2004 11:06 AM
php static module & dynamic module install. eye Linux - Software 0 10-18-2003 01:16 PM


All times are GMT -5. The time now is 10:45 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration