php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3331 PHP crashes when using mysql_connect
Submitted: 2000-01-27 13:10 UTC Modified: 2002-10-01 14:07 UTC
From: axelm+php at nona dot net Assigned:
Status: Wont fix Package: Reproducible Crash
PHP Version: 3.0.14 OS: Solaris 2.6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: axelm+php at nona dot net
New email:
PHP Version: OS:

 

 [2000-01-27 13:10 UTC] axelm+php at nona dot net
PHP has been compiled as CGI using the follwing configure options:

./configure  --enable-force-cgi-redirect --with-gd --with-ttf --with-mysql --disable-display-source --with-config-file-path=/etc --with-ldap

when running it against a script containing only this line:

<? include "categories.inc"; ?> 

and "categories.inc" starting with:

<TD>
<?   $dbhost="XXXXXX";
   $dbname="XXXX";
   $dbuser="XXXXX";
   $dbpwd="XXXXX";
   print "$REMOTE_USER";
   $mysql=mysql_connect($dbhost, $dbuser, $dbpwd);
   mysql_select_db($dbname, $mysql); 

...

php segfaults:

gdb reports:

(gdb) bt
#0  0xef506784 in _free_unlocked ()
#1  0xef50673c in free ()
#2  0xef719968 in my_no_flags_free ()
#3  0xef7170b4 in mysql_close ()
#4  0xef716e4c in mysql_real_connect ()
#5  0xef716388 in mysql_connect ()
#6  0x6fc30 in php3_mysql_do_connect (ht=0x15f0f8, return_value=0x100938,
    list=0x111870, plist=0x111fbc, persistent=0) at functions/mysql.c:576
#7  0x6fe20 in php3_mysql_connect (ht=0x15f0f8, return_value=0x100938,
    list=0x111870, plist=0x111fbc) at functions/mysql.c:621
#8  0x28fec in cs_functioncall_post_variable_passing (
    function_name=0xefffebf8, phpchar=0xefffeba4)
    at control_structures_inline.h:929
#9  0x2cb00 in phpparse () at language-parser.y:528
#10 0x35ae8 in php3_parse (yyin=0x111e78) at main.c:1538
#11 0x36854 in main (argc=2, argv=0xeffffb8c) at main.c:1829   

my php3.ini contains:

short_open_tag          =       On
asp_tags                =       Off
precision               =       14
y2k_compliance          =       Off
safe_mode               =       On
safe_mode_exec_dir      =       /bin
highlight.string        =       #DD0000
highlight.comment       =       #FF8000
highlight.keyword       =       #007700
highlight.bg            =       #FFFFFF
highlight.default       =       #0000BB
highlight.html          =       #000000
max_execution_time      =       30
memory_limit            =       25000000
error_reporting         =       7
display_errors          =       On
log_errors              =       On
track_errors            =       Off    
warn_plus_overloading   =       Off
magic_quotes_gpc        =       On
magic_quotes_runtime    =       Off
track_vars              =       On
upload_tmp_dir          =       /tmp
upload_max_filesize     =       2097152    


when running php againts the categories.inc file alone, gdb reports:

Program received signal SIGSEGV, Segmentation fault.
0xef506784 in _free_unlocked ()
(gdb) bt
#0  0xef506784 in _free_unlocked ()
#1  0xef50673c in free ()
#2  0xef719968 in my_no_flags_free ()
#3  0xef7170b4 in mysql_close ()
#4  0xef716e4c in mysql_real_connect ()
#5  0xef716388 in mysql_connect ()
#6  0x6fc30 in php3_mysql_do_connect (ht=0x15f0f8, return_value=0x100938,
    list=0x111870, plist=0x111fbc, persistent=0) at functions/mysql.c:576
#7  0x6fe20 in php3_mysql_connect (ht=0x15f0f8, return_value=0x100938,
    list=0x111870, plist=0x111fbc) at functions/mysql.c:621
#8  0x28fec in cs_functioncall_post_variable_passing (
    function_name=0xefffebf8, phpchar=0xefffeba4)
    at control_structures_inline.h:929
#9  0x2cb00 in phpparse () at language-parser.y:528
#10 0x35ae8 in php3_parse (yyin=0x111e78) at main.c:1538
#11 0x36854 in main (argc=2, argv=0xeffffb8c) at main.c:1829           


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 14:07 UTC] hholzgra@php.net
We are sorry, but can not support PHP 3 related problems anymore.
Momentum is gathering for PHP 5, and we think supporting PHP 3 will
lead to a waste of resources which we want to put into getting PHP 5
ready. Ofcourse PHP 4 will will continue to be supported for the
forseeable future.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 17:01:26 2024 UTC