The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing htmltidy

Discussion in 'General Discussion' started by FragMented, Apr 16, 2005.

  1. FragMented

    FragMented Registered

    Joined:
    Mar 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys,

    I have php 5.0.4 installed on my server. I have the need to use htmltidy (http://au2.php.net/manual/en/ref.tidy.php).

    I was wondering - what would be the best way to install it?

    /scripts/easyapache does not have an option under the PHP Module to install tidy.

    "pear -v install tidy" says it installs successfully, but PHP still won't execute tidy functions.


    If anyone can help me, it would be greatly appreciated.


    Heres the log for the pear install:

    root@hosting [/usr]# pear install tidy
    downloading tidy-1.1.tgz ...
    Starting to download tidy-1.1.tgz (9,128 bytes)
    .....done: 9,128 bytes
    3 source files, building
    running: phpize
    Configuring for:
    PHP Api Version: 20031224
    Zend Module Api No: 20041030
    Zend Extension Api No: 220040412
    Tidy library installation dir? [autodetect] :
    building in /var/tmp/pear-build-root/tidy-1.1
    running: /tmp/tmpbo96Wv/tidy-1.1/configure --with-tidy
    creating cache ./config.cache
    checking host system type... i686-pc-linux-gnu
    checking for gcc... gcc
    checking whether the C compiler (gcc ) works... yes
    checking whether the C compiler (gcc ) is a cross-compiler... no
    checking whether we are using GNU C... yes
    checking whether gcc accepts -g... yes
    checking whether gcc and cc understand -c and -o together... yes
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking for PHP prefix... /usr/local
    checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
    checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20041030
    checking for re2c... exit 0;
    checking for gawk... gawk
    checking for TIDY support... yes, shared
    checking for Cygwin environment... no
    checking for mingw32 environment... no
    checking how to run the C preprocessor... gcc -E
    checking build system type... i686-pc-linux-gnu
    checking for ld used by GCC... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking for a sed that does not truncate output... /bin/sed
    checking whether ln -s works... yes
    checking how to recognise dependent libraries... pass_all
    checking for object suffix... o
    checking for executable suffix... no
    checking command to parse /usr/bin/nm -B output... ok
    checking for dlfcn.h... yes
    checking for ranlib... ranlib
    checking for strip... strip
    checking for objdir... .libs
    checking for gcc option to produce PIC... -fPIC
    checking if gcc PIC flag -fPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.lo... yes
    checking if gcc supports -fno-rtti -fno-exceptions... yes
    checking whether the linker (/usr/bin/ld) supports shared libraries... yes
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking whether -lc should be explicitly linked in... no
    creating libtool
    updating cache ./config.cache
    creating ./config.status
    creating config.h
    running: make
    /bin/sh /var/tmp/pear-build-root/tidy-1.1/libtool --mode=compile gcc -I. -I/tmp/tmpbo96Wv/tidy-1.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/tidy-1.1/include -I/var/tmp/pear-build-root/tidy-1.1/main -I/tmp/tmpbo96Wv/tidy-1.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpbo96Wv/tidy-1.1/tidy.c -o tidy.lo
    gcc -I. -I/tmp/tmpbo96Wv/tidy-1.1 -DPHP_ATOM_INC -I/var/tmp/pear-build-root/tidy-1.1/include -I/var/tmp/pear-build-root/tidy-1.1/main -I/tmp/tmpbo96Wv/tidy-1.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -DHAVE_CONFIG_H -g -O2 -c /tmp/tmpbo96Wv/tidy-1.1/tidy.c -fPIC -DPIC -o tidy.lo
    /bin/sh /var/tmp/pear-build-root/tidy-1.1/libtool --mode=link gcc -DPHP_ATOM_INC -I/var/tmp/pear-build-root/tidy-1.1/include -I/var/tmp/pear-build-root/tidy-1.1/main -I/tmp/tmpbo96Wv/tidy-1.1 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -DHAVE_CONFIG_H -g -O2 -o tidy.la -export-dynamic -avoid-version -prefer-pic -module -rpath /var/tmp/pear-build-root/tidy-1.1/modules tidy.lo -ltidy
    mkdir .libs
    rm -fr .libs/tidy.la .libs/tidy.* .libs/tidy.*
    (cd . && ln -s tidy.lo tidy.o)
    gcc -shared tidy.lo /usr/lib/libtidy.so -Wl,-soname -Wl,tidy.so -o .libs/tidy.so
    creating tidy.la
    (cd .libs && rm -f tidy.la && ln -s ../tidy.la tidy.la)
    /bin/sh /var/tmp/pear-build-root/tidy-1.1/libtool --mode=install cp ./tidy.la /var/tmp/pear-build-root/tidy-1.1/modules
    cp ./.libs/tidy.so /var/tmp/pear-build-root/tidy-1.1/modules/tidy.so
    cp ./.libs/tidy.lai /var/tmp/pear-build-root/tidy-1.1/modules/tidy.la
    PATH="$PATH:/sbin" ldconfig -n /var/tmp/pear-build-root/tidy-1.1/modules
    ----------------------------------------------------------------------
    Libraries have been installed in:
    /var/tmp/pear-build-root/tidy-1.1/modules

    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
    - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
    - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
    - have your system administrator add LIBDIR to `/etc/ld.so.conf'

    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------

    Build complete.
    (It is safe to ignore warnings about tempnam and tmpnam).

    tidy.so copied to /tmp/tmpbo96Wv/tidy-1.1/tidy.so

    Build process completed successfully
    Installing 'tidy.so' at ext_dir (/usr/local/lib/php/extensions/no-debug-non-zts-20020429/tidy.so)
    install ok: tidy 1.1
    root@hosting [/usr]# service httpd restart
    /etc/init.d/httpd restart: httpd restarted
    root@hosting [/usr]#
     
  2. FragMented

    FragMented Registered

    Joined:
    Mar 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Nevermind - I got it installed.
     
  3. mgdoyle

    mgdoyle Member
    PartnerNOC

    Joined:
    Apr 24, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    What was the fix to get it working?
     
Loading...

Share This Page