I don't know if this helps... but when I comment out all of the print functions it seg faults at a totally different spot...
SCRIPT!!! <?PHP //DEFINE GLOBAL VARIABLES TO BE USED BY ALL DATABASE FUNCTIONS global $g_dbConn; function dbConnect($HostName, $UserName, $Password) { global $g_dbConn; if($HostName & $UserName & $Password) { //print($HostName); //print($UserName); //print($Password); $g_dbConn = mysql_connect($HostName, $UserName, $Password); if($g_dbConn) { //print("\n" . $g_dbConn); mysql_select_db("dba",$g_dbConn); //print("\npast select\n"); } } } function dbIsConnected() { if($GLOBALS["g_dbConn"]) { return true; } else { return false; } } //print("start\n"); dbConnect("localhost", "root", "CantSeeThis"); //print("finish\n"); ?> GDB RUN!!! (gdb) run dbConnect.php The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/bin/php dbConnect.php (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 1080622560 (LWP 29412)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1080622560 (LWP 29412)] 0x4207441c in _int_malloc () from /lib/tls/libc.so.6 (gdb) BACKTRACE (gdb) bt #0 0x4207441c in _int_malloc () from /lib/tls/libc.so.6 #1 0x4207378d in malloc () from /lib/tls/libc.so.6 #2 0x409caa4a in my_malloc () from /lib/libmysqlclient.so.12 #3 0x409db73a in vio_new () from /lib/libmysqlclient.so.12 #4 0x409c71bb in mysql_real_connect () from /lib/libmysqlclient.so.12 #5 0x40963161 in php_mysql_do_connect (ht=0, return_value=0x8221604, this_ptr=0x0, return_value_used=1, persistent=0) at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:662 #6 0x40963d9e in zif_mysql_connect (ht=1108554344, return_value=0x42133268, this_ptr=0x42133268, return_value_used=1108554344) at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:714 #7 0x0815355c in execute () #8 0x081532ce in execute () #9 0x0813a7c6 in zend_execute_scripts () #10 0x080705ca in php_execute_script () #11 0x0806d648 in main () #12 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6 (gdb) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php