Bug #69184 [NEW]: CLI-only MSSQL crash
From: victor_volpe at bol dot com dot br
Operating system: FreeBSD 10.1-RELEASE-p6
PHP version: 5.6.6
Package: MSSQL related
Bug Type: Bug
Bug description:CLI-only MSSQL crash
Description:
------------
Hi, I'm using FreeTDS 0.91.103_2,1 and the this script are running fine
in webserver but not in CLI. Maybe PHP are passing invalid pointers to
the dbopen() function of FreeTDS. I have several crontab jobs that
requires MSSQL connection so I need this bug fixed ASAP.
Ps.: No output in the FreeTDS debug file and the tsql (FreeTDS CLI) are
running fine too.
Thanks.
Test script:
---------------
<?php
if (mssql_connect("100.100.100.100", "sa", "thisissparta"))
print "Connection success\n";
else
print "Connection error\n";
?>
Actual result:
--------------
(gdb) run test.php
Starting program: /usr/bin/php test.php
[New LWP 100886]
[New Thread 808c06400 (LWP 100886/php)]
Program received signal SIGBUS, Bus error.
[Switching to Thread 808c06400 (LWP 100886/php)]
0x0000000801cc3f7a in dbopen () from /usr/local/lib/libsybdb.so.5
(gdb) bt
#0 0x0000000801cc3f7a in dbopen () from /usr/local/lib/libsybdb.so.5
#1 0x0000000801c9da97 in tdsdbopen () from
/usr/local/lib/libsybdb.so.5
#2 0x000000080635a1c1 in getpwent () from /lib/libc.so.7
#3 0x00000008063591b0 in getpwent_r () from /lib/libc.so.7
#4 0x000000080636ce2f in nsdispatch () from /lib/libc.so.7
#5 0x0000000806359c1e in getpwuid_r () from /lib/libc.so.7
#6 0x0000000801cd1978 in dbopen () from /usr/local/lib/libsybdb.so.5
#7 0x0000000801cc4cfd in dbopen () from /usr/local/lib/libsybdb.so.5
#8 0x0000000801cc3f85 in dbopen () from /usr/local/lib/libsybdb.so.5
#9 0x0000000801c9da97 in tdsdbopen () from
/usr/local/lib/libsybdb.so.5
#10 0x00000000006c77df in php_mssql_do_connect () at php_mssql.c:793
#11 0x00000000008ca887 in zend_do_fcall_common_helper_SPEC
(execute_data=0x808c42100) at zend_vm_execute.h:558
#12 0x0000000000889bf8 in execute_ex (execute_data=<value optimized
out>) at zend_vm_execute.h:363
#13 0x0000000000860da0 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at zend.c:1341
#14 0x0000000000804f8c in php_execute_script
(primary_file=0x7fffffffe868) at main.c:2578
#15 0x00000000008e6ccc in do_cli (argc=<value optimized out>,
argv=<value optimized out>) at php_cli.c:994
#16 0x00000000008e59ba in main (argc=<value optimized out>, argv=<value
optimized out>) at php_cli.c:1378
--
Edit bug report at https://bugs.php.net/bug.php?id=69184&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69184&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69184&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69184&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69184&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69184&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69184&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69184&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69184&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69184&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69184&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69184&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69184&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69184&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69184&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69184&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69184&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69184&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69184&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69184&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69184&r=mysqlcfg
Thread (3 messages)
- victor_volpe at bol dot com dot br