Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I installed it all and downloaded the latest executable tiny.exe, it's available in the right directory. However, when I go to the config page of HTMLtidy I get the following warning:
* warning: exec() [function.exec]: Unable to fork [C:/inetpub/Drupal/modules/htmltidy/bin/tidy.exe -v] in C:\inetpub\Drupal\modules\htmltidy\htmltidy.module on line 536.
* HTMLTidy executable is not available. Found a 'tidy' binary, but it didn't run right. C:/inetpub/Drupal/modules/htmltidy/bin/tidy.exe -v failed to respond correctly
When I run the given commandline in the shell, it returns HTML Tidy for Windows released on 15 August 2007
What else could I check?
Comment | File | Size | Author |
---|---|---|---|
#2 | htmltidy.module_2.patch | 1.57 KB | ms2011 |
Comments
Comment #1
fiishi CreditAttribution: fiishi commentedI had the same problem. My drupal path is under Program Files so there are spaces. Problem was fixed when I added quotes around the path.
In the function htmltidy_test, I changed this line:
to this:
Quotes are added after the call to escapeshellcmd because escapeshellcmd seems to strip out the quotes. There is probably a more elegant way of adding the quotes.
Comment #2
ms2011 CreditAttribution: ms2011 commentedSame problem here. Here was my way of adding quotes.
(see attached)
Comment #3
annegentle CreditAttribution: annegentle commentedI have this same problem on Windows. I’ve done the config steps and from a Windows CMD window I can run tidy -v from any directory and get:
HTML Tidy release date: 30th April 2000
See http://www.w3.org/People/Raggett for details
However, Drupal reports the following: HTMLTidy executable is not available. Found ‘tidy’ binary, but it didn’t run right. C:/Program Files/BitNami Drupal 6 Stack/apps/drupal/htdocs/sites/all/modules/import_html/coders_php_library/bin/tidy.exe -v failed to respond correctly
If I run the exact thing on the server, I get “‘C:/Program’ is not recognized as an internal or external command, operable program, or batch file.” I’m sure this error occurs due to the spaces in the path, but even when I placed the tidy.exe in C:\Tidy, and changed the path, I get the error: “HTMLTidy executable is not available. Couldn’t find tidy binary anywhere!”
Even if I move the tidy.exe to C:\tidy\ and change the Import_HTML settings to point to /tidy (the default is /usr/local/bin/tidy) to remove spaces in the path, I get the same error.
With a tidy release date of 2000, I'm suspecting that there are 2 tidy.exes on this machine and I need to find a newer one and get rid of the old. Any other suggestions are welcome. Thanks.
Comment #4
annegentle CreditAttribution: annegentle commentedTo answer my own question, my suspicions were correct. I needed to reinstall with no spaces in the path, plus get a new tidy.exe file that was a more recent build.
Comment #5
michaelfavia CreditAttribution: michaelfavia commented5.x is no longer maintained. please upgrade or submit a patch and ill be happy to roll it in.