MySQLi - "Unknown command"

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQLi - "Unknown command"

Postby rich1000 » 11. August 2004 23:19

I enabled MySQLi by adding the line:
"extension=php_mysqli.dll"
to php.ini.

I can create a MySQLi object. However, when I call its function, "prepare()", its error property is set to "Undefined function."

Is there a build problem with Xampp where MySQLi is not working correctly?
Is there some configuration problem?

thanks and please don't respond regarding the MySQL interface which is different.
rich1000
 
Posts: 6
Joined: 30. July 2004 19:26
Location: SF, CA, USA

Postby Wiedmann » 12. August 2004 09:05

Can you give us a code example?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Code Example

Postby rich1000 » 12. August 2004 18:12

This code outputs:
"Ping: 1
Prepare failed: Unknown command"

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

$mysqli = new mysqli("localhost", "root", "", "res1");

echo "<p>Ping: " . $mysqli->ping() . "</p>\n";

$stmt = $mysqli->prepare("SELECT * FROM Hotels");
if ( !$stmt )
echo "<p>Prepare failed: " . $mysqli->error . "</p>\n";

$mysqli->close();
rich1000
 
Posts: 6
Joined: 30. July 2004 19:26
Location: SF, CA, USA

Maybe it works now with Xampp 4.1.11

Postby jjrohrer » 19. January 2005 17:02

I was having the same problem. I'm trying to test some php code written by somebody else, and it requires mysqli. I added the single line:
(at line 615 in C:\xampp\apache\bin\php.ini)
Code: Select all
extension=php_mysqli.dll ;<-- jjr 1/19/2005) added in accordance with http://community.apachefriends.org/f/viewtopic.php?t=6893&highlight=mysqli

and the code seemingly works now.
jjrohrer
 
Posts: 2
Joined: 03. November 2003 23:14

Re: MySQLi - "Unknown command"

Postby ulises » 27. October 2005 20:18

rich1000 wrote:I enabled MySQLi by adding the line:
"extension=php_mysqli.dll"
to php.ini.

I can create a MySQLi object. However, when I call its function, "prepare()", its error property is set to "Undefined function."

Is there a build problem with Xampp where MySQLi is not working correctly?
Is there some configuration problem?

thanks and please don't respond regarding the MySQL interface which is different.


hello to Activate mysqli instead of mysql steps to segir first sight in:

php.ini

that have descomentado this

;extension=php_mysqli.dll

has that descomentar this;

extension = php_mysqli. dll

Once it arrived aqui you have to publish the config.inc of phpmyadmin in this piece of codigo.

Has to remain in this manner:

$cfg['Servers'][$i]['extension'] = 'mysqli'; // The php MySQL extension to use ('mysql' or 'mysqli')
User avatar
ulises
 
Posts: 36
Joined: 13. July 2005 23:02
Location: Palma de Mallorca


Return to XAMPP for Windows

Who is online

Users browsing this forum: milaz357 and 61 guests