Textile requires up-to-date library
| Project: | Textile |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | joshk |
| Status: | closed |
After their last upgrade, Dreamhost's PHP 5 and PHP 4 don't work well with Drupal. I've upgraded a site with 1600 nodes, but now I'm a bit lost. I'm trying to isolate the issues, and I've found that the module Textile was one the problems. (Drupal with no Textile module works with PHP 4, not yet with PHP 5...)
Some tests with a simple script from the documentation of TextilePHP.
% /usr/local/bin/php --version
PHP 4.4.7 (cgi) (built: May 9 2007 11:57:21)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
% /usr/local/bin/php test.php
zsh: segmentation fault (core dumped) /usr/local/bin/php test.php
% /usr/local/php5/bin/php --version
PHP 5.2.2 (cgi-fcgi) (built: May 9 2007 12:58:43)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
% /usr/local/php5/bin/php test.php
zsh: segmentation fault (core dumped) /usr/local/php5/bin/php test.php
I've written to their support, but they nicely told me that they "do not provide direct support for third-party software", but they've "actually seen several reports that Textile is broken with PHP 5.2.2 for our customers", and let them know "if this is indeed an issue with our particular install of PHP 5.2.2".
So, I'm climbing the ladder... Any ideas, help anyone?
Thanks

#1
ini_set('pcre.backtrack_limit', '10000');
#2
this did not work for me, any other suggestions?
#3
Doesn't work for me either.
#4
Also having this problem with PHP 5.2.2, still works fine with 4.4.4.
Any ideas? Not too familiar with PHP 5.
#5
See http://leonix.uni.cc/en/salvation-textile-drupal-module
#6
As I have said before, if someone wants to take maintainership of Textile and replace the backend or fix the backend, I will be happy to transfer it. I have not had time to work on it other than upgrading with each new version of Drupal. I no longer use Textile much myself, in favor of other filters (i.e. Texy), so I no longer have an inherent motivation to dedicate a lot of time to its care and upkeep.
#7
Is there any analysis of the deep issue here? I discovered this and debugged it in a standalone usage outside Drupal and discovered it was the Regexps in the main paragraph loop that were crashing. I don't see any reason why it would be bumping against the documented limitations of the PCRE library (especially on the size of texts I'm working with), so it's pretty disturbing. Certainly it's not clear what changes would even be possible to fix the problem (gut the regexps?) while maintaining the functionality. Does PHP core know about the problem and are they working on it? It's not the type of thing end-programmers should have to work around. Is it even reproducable outside of Dreamhost?
Anyway, I really appreciate the link to the other Textile implementation which I dropped in without a problem.
#8
I've just downloaded Entropy php5.2.2 package is I'm getting the same issue locally. I've also tried installing the patched textile from the link above but to no avail.
#9
I am also experiencing this locally. I don't know if it's a textile.php issue, or something specific to drupal though...
#10
Leon's method above works. Basically the textile.php file that the module ships with is two years old and has some bugs that are being revealed by recent versions of PHP.
I will roll up some patch instructions.
Also, as per other modules (e.g. tinyMCE) it's probably best if this module DOESN'T include the underlying textile class by default, but rather has the end-user download and install it separately. This keeps us clear of any licensing SNAFUs, and also makes sure that end-users are installing up to date code.
#11
Attached is a patch implementing Leon's solution outlined here:
http://leon.info.tm/en/salvation-textile-drupal-module
And adding instructions to the INSTALL and README files for people to download an up-to-date classTextile.php file. If this is applied, we can lose the DrupalTextile.inc file and textilephp directory.
#12
I understand the issues with licensing, but if that can be resolved could I put in a vote for *strongly* asking that the Textile library be included with the Drupal module:
* it is much much easier than having to dig around README files to figure out why it doesn't work
* the module will not arbitrarily break because of a change to the library. The library gets updated to version 3 and then no-one can create a fresh for 4 weeks until the Drupal module is properly updated.
#13
I'm not going to get into the debate over including external code. I won't be doing it.
However, I have included hooks that will set warnings (both on installation and on the status page) for admins that install the module without reading the documentation and following instructions.
As for future updates; in the event that there's a version three of textile, I strongly doubt that all traces of version 2.x will be removed from the internet. It's pretty easy to update the documentation with a more accurate link.
#14
I have made a new release 5.x-2.0 which solves these issues.
#15
Hi,
After reading the all story, I've downloaded and installed Textile Module ( 5.x-2.1, 2007-Jun-28). I'm a little confused because i get this error message:
"...classTextile library Not installed
The classTextile.php library is missing. Drupal cannot use textile markup without this library. Please check the textile module INSTALL documentation for information on how to download this..."
Any advices?
Regards,
Ricardo
#16
Yes, read the INSTALL file on how to obtain and install the library it mentions ... like the error says. :) The install procedure changed with this version.
#17
Hi,
Thank you for your time.
Regards,
Ricardo
#18
my hosting is upgraded to php 5.2.3 and now i'm having this problem again. any advices?
example: http://www.hecatomber.org
#19
ps. i disabled the textile module to make my site work.
#20
problem is temporarily solved by using the "[textile]" tags.
#21
Is there any fix or patch for drupal 4.7?
#22
I see you have to install textile as well as the module. Does this combination actually work with PHP5 or PHP4 and Drupal 5xx?
I vote for the integration of textile into Drupal 6. It's much better than various editors that make Drupal probably heavier -- not a bad thing only some hosts don't like it and users on dial-up don't either.
This Textile module is extremely useful but I had to remove it because it ran havock on our web site-- 500 and 404 errors. I haven't tried the new version I'm a bit wary :-\
#23
Works fine for me with Drupal 5.x and the textile module from thresholdstate.com. You might want to use the development version of classTextile.php, which can be found here: http://dev.textpattern.com/browser/development/4.0/textpattern/lib/class...
What various editors are you talking about? Do you mean HTML WYSIWIG editors? They do provide functionality that you don't have with textile.module, especially when it comes to image integration.
-- telcontar
#24
The updated link for that classTextile.php file is:
http://textpattern-cms.googlecode.com/svn/releases/4.0.6/source/textpatt...
They now host their code on Google. And for me, this fixed a problem with List items.
#25
Updated 5.x documentation as well as including in 6.0 release.