php-switcher error on Ubuntu 16.04LTS with i-MSCP 1.3.0

  • @thoand

    I'll surely provide a patch anyway because the library has been updated lately in Debian Stretch (testing) too ;)

    See http://metadata.ftp-master.deb…html5_5.2.0-1.1_changelog


  • @thoand

    Ok, in the latest versions of tidy developement library, they have renamed headers...

    They have renamed buffio.h to tidybuffio.h
    They have renamed platform.h to tidyplatform.h

    So, I'll provide a patch for the PHP tidy extension. I need to patch the config.m4 and tidy.c files to include the correct header...

    1. #ifdef NXW__TIDY_BUFFIO_H_PATH
    2. #include NXW_TIDY_BUFFIO_H_PATH
    3. #else
    4. #include <buffio.h>
    5. #endif



  • Hi @Nuxwin,

    thank you. I figured out, why I ran into this problem. I first tried a switch of the PHP Version using an PPA. In this PPA wasn't only PHP 5.6. I than removed the ppa, but the newer packages remained. I now added the PPA again and then removed it with ppa-purge. By this way all Packages got downgraded to the official versions.


  • Ok, I endup with the following patch which works:

    1. Description: tiny buffio.h renamed to tinybuffio.hAuthor: Laurent Declercq <[email protected]>---This patch header follows DEP-3: a/ext/tidy/config.m4+++ b/ext/tidy/[email protected]@ -27,6 +27,12 @@ if test "$PHP_TIDY" != "no"; then AC_MSG_ERROR(Cannot find libtidy) fi+ if test -r "$TIDY_INCDIR/tidybuffio.h"; then+ PHP_TIDY_BUFFIO_H_PATH="$TIDY_INCDIR/tidybuffio.h"+ else+ PHP_TIDY_BUFFIO_H_PATH="$TIDY_INCDIR/buffio.h"+ fi+ TIDY_LIBDIR=$TIDY_DIR/$PHP_LIBDIR PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD)@@ -37,8 +43,20 @@ if test "$PHP_TIDY" != "no"; then AC_DEFINE(HAVE_TIDYOPTGETDOC,1,[ ]) ],[],[])+ AC_MSG_CHECKING([if your cpp allows macro usage in include lines])+ AC_TRY_COMPILE([+#define FOO <$PHP_TIDY_BUFFIO_H_PATH>+#include FOO+ ], [], [+ AC_MSG_RESULT([yes])+ PHP_DEFINE([PHP_TIDY_BUFFIO_H_PATH], [<$PHP_TIDY_BUFFIO_H_PATH>],[ext/tidy])+ AC_DEFINE_UNQUOTED([PHP_TIDY_BUFFIO_H_PATH], [<$PHP_TIDY_BUFFIO_H_PATH>], [Path to buffio.h])+ ], [+ AC_MSG_RESULT([no])+ ]) PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared) PHP_SUBST(TIDY_SHARED_LIBADD)+ PHP_INSTALL_HEADERS([ext/tidy/]) AC_DEFINE(HAVE_TIDY,1,[ ]) fi--- a/ext/tidy/tidy.c+++ b/ext/tidy/[email protected]@ -31,7 +31,12 @@ #include "ext/standard/info.h" #include "tidy.h"-#include "buffio.h"++#ifdef PHP_TIDY_BUFFIO_H_PATH+#include PHP_TIDY_BUFFIO_H_PATH+#else+#include <buffio.h>+#endif /* compatibility with older versions of libtidy */ #ifndef TIDY_CALL

    I need to create that patch for all PHP versions... Here, the patch has been created for PHP 5.6. I've installed the libtidy-dev package from the PPA (as you have done) and all is working fine now with it. Ondřej Surý also provides a patch in his PHP packages for Ubuntu but he only change the filename buffio.h to tinybuffio.h in the tiny.c file. We cannot do the same thing because we must support both, the new and old library versions.


  • badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Patch fowarded to upstream. See