$mysqlOk = true; $content .= '<li class="atm-pic-ok">MySQL connection and version OK (' . $version . ')</li>'; } } } //MBSTRING if (!function_exists('mb_substr') || !function_exists('mb_convert_encoding')) { $content .= '<li class="atm-pic-cancel">Error, Multibyte String (mbsring) extension not installed (only needed if UTF-8 encoding is used)</li>'; } else { $content .= '<li class="atm-pic-ok">Multibyte String (mbsring) extension OK</li>'; } //XAPIAN if (class_exists('CMS_module_ase')) { $xapianVersion = ''; if (function_exists('xapian_version_string')) { $xapianVersion = xapian_version_string(); } elseif (class_exists('Xapian')) { $xapianVersion = Xapian::version_string(); } else { $content .= '<li class="atm-pic-cancel">Error, Xapian extension not installed (only needed if ASE module is installed)</li>'; } if ($xapianVersion) { if (version_compare($xapianVersion, '1.0.2') === -1) { $content .= '<li class="atm-pic-cancel">Error, Xapian version (' . $xapianVersion . ') not match (1.0.2 minimum)</li>'; } else { $content .= '<li class="atm-pic-ok">Xapian extension OK (' . $xapianVersion . ')</li>'; } } } //Files writing $randomFile = PATH_REALROOT_FS . '/test_' . md5(mt_rand() . microtime()) . '.tmp';
* published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 * USA */ # Test the version number reporting functions give plausible results. $v = xapian_major_version() . '.' . xapian_minor_version() . '.' . xapian_revision(); $v2 = xapian_version_string(); if ($v != $v2) { print "Unexpected version output ({$v} != {$v2})\n"; exit(1); } $db = inmemory_open(); $db2 = inmemory_open(); function my_errhandler($type, $str) { global $last_exception; if ($type == E_WARNING) { $last_exception = $str; } } $old_errhandler = set_error_handler("my_errhandler"); # Check PHP4 handling of Xapian::DocNotFoundError