Forum Moderators: bakedjake
My hosting service is trying to get the php tidy extension running on a Linux machine, but they aren't able to do it (yes, these are generally very competent people). I have done the install on Windows no problem, but for the time being I'm not able to resurrect my Linux desktop, so I can't test the Linux install (and my linux knowledge is poor anyway, so I'm not sure I'd get anywhere). They basically have given up after four recompiles of PHP without success and said that if I find something new to try, they'll try it.
They have thus far tried to PEAR install and the manual install as detailed in the user-contributed notes on the php.net page for the tidy extension [php.net] in the user-contributed notes. These are:
1. Get libtidy source from [tidy.sourceforge.net...] Run the following commands to unpack and install:tar -zvxf tidy_src.tgz
cd tidy/build/gmake
make all
make install2. Download Tidy as Pecl extension directly from [pecl.php.net...] Run the following commands to unpack and install:
tar -zvxf tidy-****.tar
cd tidy-****
phpize
./configure && make && make install3. Add extension=tidy.so to your php.ini file and restart Apache.
Any idea what might be missing?
Might they need to do something with ldconfig to make the library available?
Also, is there anyway I can test whether or not a given library is available? I'm not sure whether their install fails where they are trying to install tidylib or when they try to recompile php with the tidy extension.
Tom
3. Add extension=tidy.so to your php.ini file and restart Apache.
So far, the only thing I can see that may possibly cause a problem is the extension=tidy.so. The reason I mention that is because you have to tell php in php.ini what the extension directory is, where all the modules are.
For FreeBSD it tends to be:
extension_dir = /usr/local/lib/php/20020429/, but php by default uses extension_dir = ./, which is only the directory where apache is started from. I'm not sure if it's the same for your hosts's case (running linux), but it's worth a shot to mention it to them, and change, or add the path to point to the tidy.so module.
HTH,
-MM
They do have extension_dir set to ./ though, so maybe that's it.
[edit]BTW, isn't the ./ going to be the directory that php starts from, not Apache?[/edit]
[second edit]I guess if it's running as an Apache module it comes down to the same thing though, doesn't it[/second edit]
Tom
[second edit]I guess if it's running as an Apache module it comes down to the same thing though, doesn't it[/second edit]
[edit]
They have other extensions running, so I wouldn't think that's the problem.
Possibly... It may be that they've included the other extensions in at build-time, so there are no modules to load... We build ours outright with all of our options built-in, so that it doesn't need to load any modules, but any additional ones we might need, instead of rebuilding PHP, we'll add it to the extensions.
I'll see what they have to say about the extension_dir setting though.
Tom