Forum Moderators: bakedjake

Message Too Old, No Replies

Install tidy extension under Linux and php 4.3.8

         

ergophobe

9:23 pm on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I tried posting this in PHP [webmasterworld.com], but no help. Maybe someone here can help.

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 install

2. 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 install

3. 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

MattyMoose

9:36 pm on Aug 5, 2004 (gmt 0)

10+ Year Member




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

ergophobe

9:56 pm on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



They have other extensions running, so I wouldn't think that's the problem. Like I say, they are generally quite competent, but this one seems to have gotten the best of them.

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

MattyMoose

10:34 pm on Aug 5, 2004 (gmt 0)

10+ Year Member




[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]

That's what I'm thinking. ;)

[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.

ergophobe

10:55 pm on Aug 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think part of the problem is that the php 4.3.x implementation of tidy requires both the php extension and the tidy library, so it can't be fully compiled in. I'm guessing that they have successfully built in the tidy extension, but are somehow not getting it hooked up to the tidylib.

I'll see what they have to say about the extension_dir setting though.

Tom

ergophobe

3:50 pm on Aug 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I think that did it. I suggested they check the extensions_dir setting and next thing I know they got back to me saying all was working. Cool.