Date: Sat, 3 Feb 2007 20:41:56 -0600 From: Terry Todd <tlt@badger.tltodd.com> To: freebsd-questions@freebsd.org Subject: phpMyAdmin httpd segmentation fault Message-ID: <20070203204156.A4743@badger.tltodd.com>
next in thread | raw e-mail | index | archive | help
I installed FreeBSD 6.2-RELEASE, php-5.1.6_3, php5-extensions-1.0, mysql-5.0.27 and apache_1.3.37_1. php -i now works Ok after I moved recode.so to the top of the list of extensions in extensions.ini. It took a while to figure that one out. Before that php -i would seg fault and core dump. It took some google searching and using gdb on the core file to fix it. A test web page for phpinfo works fine too. Mysql works OK from the command line. However I can't get phpMyAdmin to work. It seg faults in reading /usr/local/www/phpMyAdmin/libraries/url_generating.lib.php There is no core dump produced. I ran ktrace httpd -X Then when I try to open the phpMyAdmin/index.php page in a browser httpd seg faults. Here is the tail of kdump from the ktrace.out from the above ktrace. .... 1372 httpd CALL gettimeofday(0xbfbf7158,0) 1372 httpd RET gettimeofday 0 1372 httpd CALL lstat(0xbfbf75b0,0xbfbf70f0) 1372 httpd NAMI "/usr" 1372 httpd RET lstat 0 1372 httpd CALL lstat(0xbfbf75b0,0xbfbf70f0) 1372 httpd NAMI "/usr/local" 1372 httpd RET lstat 0 1372 httpd CALL lstat(0xbfbf75b0,0xbfbf70f0) 1372 httpd NAMI "/usr/local/www" 1372 httpd RET lstat 0 1372 httpd CALL lstat(0xbfbf75b0,0xbfbf70f0) 1372 httpd NAMI "/usr/local/www/phpMyAdmin" 1372 httpd RET lstat 0 1372 httpd CALL lstat(0xbfbf75b0,0xbfbf70f0) 1372 httpd NAMI "/usr/local/www/phpMyAdmin/libraries" 1372 httpd RET lstat 0 1372 httpd CALL lstat(0xbfbf75b0,0xbfbf70f0) 1372 httpd NAMI "/usr/local/www/phpMyAdmin/libraries/url_generating.lib.php" 1372 httpd RET lstat 0 1372 httpd CALL open(0x845eda8,0,0x1b6) 1372 httpd NAMI "/usr/local/www/phpMyAdmin/libraries/url_generating.lib.php" 1372 httpd RET open 4 1372 httpd CALL fstat(0x4,0x8102748) 1372 httpd RET fstat 0 1372 httpd CALL lseek(0x4,0,0,0,0x1) 1372 httpd RET lseek 0 1372 httpd CALL read(0x4,0x82e3028,0x2000) 1372 httpd GIO fd 4 read 4096 bytes "<?php /* $Id: url_generating.lib.php,v 2.12.2.1 2006/09/26 19:23:24 lem9 Exp $ */ // vim: expandtab sw=4 ts=4 sts=4: /** * URL/hidden inputs generating. */ /** * Generates text with hidden inputs. * * @see PMA_generate_common_url() * @param string optional database name * @param string optional table name * @param int indenting level * * @return string string with input fields * * @global string the current language * @global string the current conversion charset * @global string the current connection collation * @global string the current server * @global array the configuration array * @global boolean whether recoding is allowed or not * * * @access public * * @author nijel */ function PMA_generate_common_hidden_inputs($db = '', $table = '', $indent = 0, $skip = array()) { if (is_array($db)) { $params =& $db; $_indent = empty($table) ? $indent : $table; $_skip = empty($indent) ? $skip : $indent; $indent =& $_indent; $skip =& $_skip; } else { $params = array(); if (isset($db) && strlen($db)) { $params['db'] = $db; } if (isset($table) && strlen($table)) { $params['table'] = $table; } } if (! empty($GLOBALS['server']) && $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']) { $params['server'] = $GLOBALS['server']; } if (empty($_COOKIE['pma_lang']) && ! empty($GLOBALS['lang'])) { $params['lang'] = $GLOBALS['lang']; } if (empty($_COOKIE['pma_charset']) && ! empty($GLOBALS['convcharset'])) { $params['convcharset'] = $GLOBALS['convcharset']; } if (empty($_COOKIE['pma_collation_connection']) && ! empty($GLOBALS['collation_connection'])) { $params['collation_connection'] = $GLOBALS['collation_connection']; } $params['token'] = $_SESSION[' PMA_token ']; if (! is_array($skip)) { if (isset($params[$skip])) { unset($params[$skip]); } } else { foreach ($skip as $skipping) { if (isset($params[$skipping])) { unset($params[$skipping]); } } } $spaces = str_repeat(' ', $indent); $return = ''; foreach ($params as $key => $val) { $return .= $spaces . '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars(\ $val) . '" />' . "\\n"; } return $return; } /** * Generates text with URL parameters. * * <code> * // note the ? * echo 'script.php?' . PMA_generate_common_url('mysql', 'rights'); * // produces with cookies enabled: * // script.php?db=mysql&table=rights * // with cookies disabled: * // script.php?server=1&lang=en-utf-8&db=mysql&table=rights * * $params['myparam'] = 'myvalue'; * $params['db'] = 'mysql'; * $params['table'] = 'rights'; * // note the missing ? * echo 'script.php' . PMA_generate_common_url($params); * // produces with cookies enabled: * // script.php?myparam=myvalue&db=mysql&table=rights * // with cookies disabled: * // script.php?server=1&lang=en-utf-8&myparam=myvalue&db=mysql&table=rights * * // note the missing ? * echo 'script.php' . PMA_generate_common_url(); * // produces with cookies enabled: * // script.php * // with cookies disabled: * // script.php?server=1&lang=en-utf-8 * </code> * * @param mixed assoc. array with url params or optional string with database name * if first param is an array there is also an ? prefixed to the url * @param string optional table name only if first param is array * @param string character to use instead of '&' for deviding * multiple URL parameters from each other * * @return string string with URL parameters * * @global string the current language * @global string the current conversion charset * @global string the current connection collation * @global string the current server * @global arra" 1372 httpd RET read 6467/0x1943 1372 httpd CALL read(0x4,0x82e3028,0x2000) 1372 httpd GIO fd 4 read 0 bytes "" 1372 httpd RET read 0 1372 httpd CALL read(0x4,0x82e3028,0x2000) 1372 httpd GIO fd 4 read 0 bytes "" 1372 httpd RET read 0 1372 httpd CALL close(0x4) 1372 httpd RET close 0 1372 httpd PSIG SIGSEGV SIG_DFL I moved url_generating.lib.php to url_generating.lib.php.sav and copied url_generating.lib.php.sav to a new url_generating.lib.php. Same thing happens. I tried the latest phpMyAdmin-2.9.2 and it does the exact same thing. It always seg faults in the exact same place in the exact same way. /var/log/messages file gets: Feb 3 16:07:38 testbox kernel: pid 8512 (httpd), uid 80: exited on signal 11 /var/log/httpd-errors gets: [Sat Feb 3 16:07:39 2007] [notice] child pid 8512 exit signal Segmentation fault (11) I am out of ideas on what to try next. Anyone else have any suggestions? TIA, Terry Todd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070203204156.A4743>