Code Comments
Programming Forum and web based access to our favorite programming groups.Victor Menendez wrote:
> Does anyone know for sure that PEAR DB class does currently work with PHP5
and Mysql 4.1?
>
> I received the following error;
> Error: "Non-static method DB::connect() should not be called statically" (
error #2048).
>
> I know that this is a commong problem, is it just a matter for declaring a public
class and calling hte DB method differently?
Works for me, with either the mysql or mysqli drivers.
PEAR 1.3.3.1
DB 1.6.8
PHP 5.0.2
There is a bug in the PHP mysqli extension that causes it to fail if
there's no socket file in the connect string. This patch fixes it:
--- mysqli_nonapi.c.orig 2004-09-04 09:19:20 -05:00
+++ mysqli_nonapi.c 2004-10-18 15:12:45 -05:00
@@ -49,6 +49,10 @@
return;
}
+ if (!socket_len) {
+ socket = NULL;
+ }
+
/* TODO: safe mode handling */
if (PG(sql_safe_mode)){
} else {
The patch is in the current CVS, but I don't think it's in any
released version. 5.0.3, perhaps.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.