Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] PHP5 and PEAR DB class
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Paul Dubois
11-29-04 09:04 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:10 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.