Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #30409 : MySQLi Loaded with MySQL Causes loss of MySQL Functions
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 30th May 03:35
php-bugs
External User
 
Posts: 1
Default #30409 : MySQLi Loaded with MySQL Causes loss of MySQL Functions



ID: 30409
Comment by: verysimple at googlemail dot com
Reported By: david at inspiredthinking dot co dot uk
Status: No Feedback
Bug Type: MySQLi related
Operating System: Windows XP SP2
PHP Version: 5CVS-2004-10-12 (dev)
New Comment:

I think I finally figured something out folks:

I'm running php5, apache2 and mysql5 on a winxp machine.

In php.ini I have:
extension_dir='c:/php'
extension=php_mysqli.dll
I copied the php_mysqli.dll and libmysql.dll in my php install folder
which is also my extension directory (extension_dir='c:/php').

As you can see all instructions followed as recommended throughout the
web.

I created a phpinfo() test page and I get MySQLi information with no
problem.

I installed phpMyAdmin and it's running fine as well.

But I started building a mysql class in php and got stuck with the
"Fatal error: Call to undefined function mysql_connect()". That's when
the headache began.

After about 2 hours I tried mysqli_connect() instead of mysql_connect()
and the error disappeared and gave way to the next "undefined function
error" still related to a mysql_ function. I soon discovered that
there's a whole new set of mysqli_ functions that are part of the new
library. Basically wherever you used to have mysql_ you now use
mysqli_. It should however be noted that the latter version is a bit
more strict when it comes to parameters passed as variables. The
$linkID is often required in the function call, not optional as it used
to be in the former library.

have a look: http://ca3.php.net/manual/en/function.mysqli-connect.php

I think this is a detail that should have been advertised a bit more
when they were handing out mysqli.


Previous Comments:
------------------------------------------------------------------------

[2004-11-14 01:00:10] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2004-11-06 06:41:52] edink@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-STABLE-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.0-win32-latest.zip

------------------------------------------------------------------------

[2004-10-28 23:56:03] fscii at yahoo dot com

I would like to add that a call to phpinfo() shows that php_mysqli.dll
is actually being loaded - no clue why its totally ineffective!?

MysqlI Support enabled
Client API version 4.1.3-beta
MYSQLI_SOCKET /tmp/mysql.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off

------------------------------------------------------------------------

[2004-10-28 23:46:42] fscii at yahoo dot com

My case is that I am only trying to use php_mysqli.dll to interface
with MySql 5.x (using php 5.02). I was under the impression you do not
require to use both php_mysqli.dll AND php_mysql.dll - I am of the
opinion you use either one or the other. I get the message:

Fatal error: Call to undefined function mysql_connect())

When I attempt to use php_mysql.dll I get the EXPECTED error of:

"Client does not support authentication protocol requested by server;
consider upgrading MySQL client"

(which is the entire reason PHP suggests php_mysqli.dll).

I have no intention of converting the MySQL 5 passwords to the old
method of storage and php is of no use to me if it does not work with
MySQL.

Please advise!

------------------------------------------------------------------------

[2004-10-23 16:16:43] atiara at covad dot net

I stand corrected. I rechecked my php.ini and discovered that I had
not disabled to the loading of php_mysqli.dll. Upon disabling that
particular module I was able to resume normal execution. Therefore,
my case is no different from that originally reported by david.

------------------------------------------------------------------------

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/30409

--
Edit this bug report at http://bugs.php.net/?id=30409&edit=1
  Reply With Quote


  sponsored links


2 30th May 03:36
php-bugs
External User
 
Posts: 1
Default #30409 : MySQLi Loaded with MySQL Causes loss of MySQL Functions



ID: 30409
Comment by: verysimple at googlemail dot com
Reported By: david at inspiredthinking dot co dot uk
Status: No Feedback
Bug Type: MySQLi related
Operating System: Windows XP SP2
PHP Version: 5CVS-2004-10-12 (dev)
New Comment:

I think I finally figured something out folks:

I'm running php5, apache2 and mysql5 on a winxp machine.

In php.ini I have:
extension_dir='c:/php'
extension=php_mysqli.dll
I copied the php_mysqli.dll and libmysql.dll in my php install folder
which is also my extension directory (extension_dir='c:/php').

As you can see all instructions followed as recommended throughout the
web.

I created a phpinfo() test page and I get MySQLi information with no
problem.

I installed phpMyAdmin and it's running fine as well.

But I started building a mysql class in php and got stuck with the
"Fatal error: Call to undefined function mysql_connect()". That's when
the headache began.

After about 2 hours I tried mysqli_connect() instead of mysql_connect()
and the error disappeared and gave way to the next "undefined function
error" still related to a mysql_ function. I soon discovered that
there's a whole new set of mysqli_ functions that are part of the new
library. Basically wherever you used to have mysql_ you now use
mysqli_. It should however be noted that the latter version is a bit
more strict when it comes to parameters passed as variables. The
$linkID is often required in the function call, not optional as it used
to be in the former library.

have a look: http://ca3.php.net/manual/en/function.mysqli-connect.php

I think this is a detail that should have been advertised a bit more
when they were handing out mysqli.


Previous Comments:
------------------------------------------------------------------------

[2004-11-14 01:00:10] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2004-11-06 06:41:52] edink@php.net

Please try using this CVS snapshot:

http://snaps.php.net/php5-STABLE-latest.tar.gz

For Windows:

http://snaps.php.net/win32/php5.0-win32-latest.zip

------------------------------------------------------------------------

[2004-10-28 23:56:03] fscii at yahoo dot com

I would like to add that a call to phpinfo() shows that php_mysqli.dll
is actually being loaded - no clue why its totally ineffective!?

MysqlI Support enabled
Client API version 4.1.3-beta
MYSQLI_SOCKET /tmp/mysql.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off

------------------------------------------------------------------------

[2004-10-28 23:46:42] fscii at yahoo dot com

My case is that I am only trying to use php_mysqli.dll to interface
with MySql 5.x (using php 5.02). I was under the impression you do not
require to use both php_mysqli.dll AND php_mysql.dll - I am of the
opinion you use either one or the other. I get the message:

Fatal error: Call to undefined function mysql_connect())

When I attempt to use php_mysql.dll I get the EXPECTED error of:

"Client does not support authentication protocol requested by server;
consider upgrading MySQL client"

(which is the entire reason PHP suggests php_mysqli.dll).

I have no intention of converting the MySQL 5 passwords to the old
method of storage and php is of no use to me if it does not work with
MySQL.

Please advise!

------------------------------------------------------------------------

[2004-10-23 16:16:43] atiara at covad dot net

I stand corrected. I rechecked my php.ini and discovered that I had
not disabled to the loading of php_mysqli.dll. Upon disabling that
particular module I was able to resume normal execution. Therefore,
my case is no different from that originally reported by david.

------------------------------------------------------------------------

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/30409

--
Edit this bug report at http://bugs.php.net/?id=30409&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666