#39802 [Fbk->Csd]: PHP segfaults with odbc_connect()
| From: | webmaster at guestwho dot com | Date: | Mon, 11 Dec 2006 23:39:05 +0000 |
| Subject: | #39802 [Fbk->Csd]: PHP segfaults with odbc_connect() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106224@lists.php.net to get a copy of this message | ||
ID: 39802
User updated by: webmaster at guestwho dot com
Reported By: webmaster at guestwho dot com
-Status: Feedback
+Status: Closed
Bug Type: ODBC related
Operating System: FreeBSD 6.1-RELEASE
PHP Version: 5.2.0
New Comment:
You are right, I solved my issue by creating /usr/local/include/odbc.h
with the following:
#include <sql.h>
#include <sqlext.h>
#include <odbcinst.h>
This solved both my original problem and the problem with building the
latest cvs.
Note to others.. read the following instructions:
http://www.unixodbc.org/doc/php3.html
Thanks tony2001. Bug Closed.
Previous Comments:
------------------------------------------------------------------------
[2006-12-11 23:21:44] tony2001@php.net
>odbc.h: No such file or directory
Missing ODBC includes?
------------------------------------------------------------------------
[2006-12-11 23:19:57] webmaster at guestwho dot com
This looks like the source of my troubles, tho I'm not sure how to
rectify it:
In file included from
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:37:
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc_includes.h:184:18:
odbc.h: No such file or directory
------------------------------------------------------------------------
[2006-12-11 23:16:43] webmaster at guestwho dot com
I just posted the latest few lines.. the full ouput is over 700 lines,
so you may view it at: http://www.guestwho.com/php/makelog
------------------------------------------------------------------------
[2006-12-11 22:59:36] tony2001@php.net
Please make sure the sources are not broken in some weird way. The "rc"
variable is of type "RETCODE" which is used innumerable times before
that line.
Or maybe the error happens somewhere before that point, but you've
posted only the last lines of the output.
------------------------------------------------------------------------
[2006-12-11 22:48:15] webmaster at guestwho dot com
Attempting building the latest CVS, which fails as follows:
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c: In function
`zif_odbc_tableprivileges':
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3620: error:
syntax error before "rc"
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3642: error:
`rc' undeclared (first use in this function)
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3642: error:
structure has no member named `hdbc'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3642: error:
structure has no member named `stmt'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3643: error:
`SQL_INVALID_HANDLE' undeclared (first use in this function)
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3649: error:
`SQL_ERROR' undeclared (first use in this function)
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3650: error:
`SQL_NULL_HSTMT' undeclared (first use in this function)
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3655: warning:
implicit declaration of function `SQLTablePrivileges'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3655: error:
structure has no member named `stmt'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3656: error:
`SWORD' undeclared (first use in this function)
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3656: error:
`SQL_NTS' undeclared (first use in this function)
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3666: error:
structure has no member named `numparams'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3667: error:
structure has no member named `stmt'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3667: error:
structure has no member named `numcols'
/usr/local/src/php5.2-200612112130/ext/odbc/php_odbc.c:3669: error:
structure has no member named `numcols'
*** Error code 1
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39802
--
Edit this bug report at http://bugs.php.net/?id=39802&edit=1