LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   PHP 5.1.6 + tidy 1.2 module (http://www.linuxquestions.org/questions/linux-server-73/php-5-1-6-tidy-1-2-module-664173/)

Ateo 08-20-2008 05:23 PM

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.

Ateo 08-22-2008 01:21 PM

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.


All times are GMT -5. The time now is 06:57 PM.