RE: [PHP4BETA] Errors compiling Apache 1.3.9 / PHP4 CVS version
| From: | Brian Leyton | Date: | Tue, 28 Dec 1999 22:00:58 +0000 |
| Subject: | RE: [PHP4BETA] Errors compiling Apache 1.3.9 / PHP4 CVS version | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-8626@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Sascha Schumann [mailto:sascha@schumann.cx]
> Sent: Tuesday, December 28, 1999 1:27 PM
> To: Brian Leyton
> Cc: Php4beta
> Subject: Re: [PHP4BETA] Errors compiling Apache 1.3.9 / PHP4 CVS version
>
>
> On Tue, Dec 28, 1999 at 01:00:00PM -0800, Brian Leyton wrote:
> > Ok, here's what I get:
> >
> > (ld): resolve
> > ld: 0711-224 WARNING: Duplicate symbol: sapi_module
> > ld: 0711-228 WARNING: Duplicate symbols were found while
> resolving symbols.
> > The following duplicates were found:
> > Symbol Source-File(Object) OR
> Import-File{Shared-object}
> > -------------------------
> -------------------------------------------------
> > sapi_module
> mod_php4.c(modules/php4/libphp4.a[mod_php4.o])
> > ** Duplicate ** SAPI.c(modules/php4/libphp4.a[SAPI.o])
> > ** Duplicate ** SAPI.c(modules/php4/libmodphp4.a[SAPI.o])
>
> Ok, the attached patch fixes that. SAPI.c should use the
> respective module's sapi_module.
>
> > ld: 0711-317 ERROR: Undefined symbol: .SQL_SUCCEEDED
> > .SQL_SUCCEEDED [58] ER PR
> > php_odbc.c(modules/php4/libphp4.a[php_o
> > dbc.o])
> > 00000cfc .text R_RBR [785]
>
> It looks like SQL_SUCCEEDED is a macro which isn't defined
> properly. Check your ODBC header files for a similarly named
> macro. Additionally, you might want to check libiodbc for a
> similarly named symbol.
Looks like SQL_SUCCEEDED was added in version 1.15 of php_odbc.c. Here's
the email from the archives that shows what he did (SQL_SUCCEEDED is way at
the end). Not being much of a C programmer, I'm a bit out of my league
here - I think I see what he's trying to do, but I don't know enough to know
if he's doing it right. I did grep libiodbc & found symbols named
SQL_SUCCESS and SQL_SUCCESS_WITH_INFO. Do you think that he meant to use
one of those?:
lurcher Thu Dec 9 04:59:17 1999 EDT
Modified files:
/php4 NEWS
/php4/ext/odbc php_odbc.c
Log:
Report all ODBC error's not just the top of the stack
Index: php4/NEWS
diff -u php4/NEWS:1.69 php4/NEWS:1.70
--- php4/NEWS:1.69 Wed Dec 8 21:08:10 1999
+++ php4/NEWS Thu Dec 9 04:59:16 1999
@@ -2,6 +2,7 @@
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||
?? ?? ????, Version 4.0 Beta 4
+- Report all ODBC error's not just the one on the top of the stack
(lurcher)
- OCI8 now returns NULL values in LONG columns correct. (Thies)
- Added support for a C-like assert() function. (Thies)
- Added CyberCash support. (Evan)
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.14 php4/ext/odbc/php_odbc.c:1.15
--- php4/ext/odbc/php_odbc.c:1.14 Sat Dec 4 14:15:57 1999
+++ php4/ext/odbc/php_odbc.c Thu Dec 9 04:59:17 1999
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.14 1999/12/04 19:15:57 sas Exp $ */
+/* $Id: php_odbc.c,v 1.15 1999/12/09 09:59:17 lurcher Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
@@ -461,17 +461,20 @@
SDWORD error; /* Not used */
char errormsg[255];
SWORD errormsgsize; /* Not used */
+ SQLRETURN ret;
ODBCLS_FETCH();
-
- SQLError(henv, conn, stmt, state,
- &error, errormsg, sizeof(errormsg)-1, &errormsgsize);
- if (func) {
- php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
+
+ do {
+ SQLError(henv, conn, stmt, state,
+ &error, errormsg, sizeof(errormsg)-1, &errormsgsize);
+ if (func) {
+ php_error(E_WARNING, "SQL error: %s, SQL state %s in %s",
errormsg, state, func);
- } else {
- php_error(E_WARNING, "SQL error: %s, SQL state %s",
- errormsg, state);
- }
+ } else {
+ php_error(E_WARNING, "SQL error: %s, SQL state %s",
+ errormsg, state);
+ }
+ } while ( SQL_SUCCEEDED( ret ));
}
void php3_odbc_fetch_attribs(INTERNAL_FUNCTION_PARAMETERS, int mode)