Can't get Tidy to Work...

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't get Tidy to Work...

Postby mdaoust05 » 17. February 2008 21:17

I downloaded Xampp and am currently trying to get Tidy to work with PHP. Has anyone done this before, and if so, is it possible to point me in the right direction?
mdaoust05
 
Posts: 3
Joined: 17. February 2008 21:15

Postby Izzy » 18. February 2008 02:46

Is it possible for you to provide some more details about why it is not working, what you have tried already and what, if any, are the error messages you were presented with or error messages contained in the Apache server's error log file.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby mdaoust05 » 18. February 2008 15:33

Sure...sorry for not providing that sooner.

The error's I'm getting are making it appear as if it simply does not exist. For example, I am using the following test script from DevShed's tutorial on PHP Tidy:

Code: Select all
// example of 'tidy_repair_string()' function
ob_start();
?>
<html>
  <head>
   <title>This file will be parsed by Tidy</title>
  </head>
  <body>
   <p>This is an erroneous line
   <p>This is another erroneous line</i>
  </body>
</html>
<?php
$fileContents=ob_get_clean();
$tidy=tidy_repair_string($fileContents);
echo $tidy;


The error I get is:

Fatal error: Call to undefined function tidy_repair_string()

I'm running this on a regular windows machine.

Here is what I have done:

1. I have downloaded php_tidy.dll and placed it in the main php directory (c:\xampp\php). I have also tried it in c:\xampp\apache\bin (per someone's suggestion)

2. In php.ini I have uncommented extension=php_tidy.dll. When I run php -m I see tidy in the list.

3. I have left ; tidy.default_config = /usr/local/lib/php/default.tcfg commented since this is being run on a windows machine.

Outside of that I am pretty lost. I'm not a system admin (which is why I have chosen to go with XAMPP) but would really like to get this to work on my local machine. Any help you can provide would be very much appreciated.
mdaoust05
 
Posts: 3
Joined: 17. February 2008 21:15

Postby Wiedmann » 18. February 2008 15:43

I have downloaded php_tidy.dll

Which XAMPP version? IMHO this extension is allready included in XAMPP.

In php.ini I have uncommented extension=php_tidy.dll.

Which "php.ini"? (The normal "php.ini" is in "/xampp/apache/bin", see phpinfo or the XAMPP for Windows homepage)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby mdaoust05 » 18. February 2008 15:47

:oops: ahem....well, I feel like a dunce.

I was working on the php.ini file in the php folder, not in the apache/bin folder. I went in, uncommented the extension for php_tidy and everything is working fine.

Thanks a million for your help.
mdaoust05
 
Posts: 3
Joined: 17. February 2008 21:15


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 102 guests