#33263 [Csd->Opn]: parent::real_connect() can not be used, hence cant use option flags.

From: Date: Fri, 25 Nov 2005 11:20:40 +0000
Subject: #33263 [Csd->Opn]: parent::real_connect() can not be used, hence cant use option flags.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88930@lists.php.net to get a copy of this message
ID: 33263 User updated by: daarius at hotmail dot com Reported By: daarius at hotmail dot com -Status: Closed +Status: Open Bug Type: MySQLi related Operating System: WinXP -PHP Version: 5CVS-2005-06-11 +PHP Version: 5.1 Assigned To: georg New Comment: just tried on new version php5.1, and the error is same. using parent::real_connect() in the constructor of my class that extends mysqli doesnt work and gives error of "warning: mysqli::real_connect() [function.real-connect]: Couldn't fetch" need to use real_connect as it has the 7th param of flags, which is not present in parent::__construct() (mysqli_connect) please check, thanks. Previous Comments: ------------------------------------------------------------------------ [2005-06-17 18:37:51] georg@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2005-06-08 18:30:16] daarius at hotmail dot com I have used latest win32 version, and the problem is same. is there any other way of doing this in the new version? ------------------------------------------------------------------------ [2005-06-08 00:25:09] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-06-07 14:08:31] daarius at hotmail dot com Description: ------------ class mydb extends mysqli { public function __construct() { parent::real_connect(); // can not use parent::__construct(); // doesnt support 7th parameter of flags. } } as above, the real_connect() gives some errors, and may be not allowed to be used, but in there the 7th parameter of flags are not present in connect() of mysqli. so what to do? also, as real_connect() is not allowed, i can not use parent::options() for setting the config options before connect. as this gives errors too. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33263&edit=1

« previous php.bugs (#88930) next »