Page 1 of 1

MySQLi - "Unknown command"

PostPosted: 11. August 2004 23:19
by rich1000
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.

PostPosted: 12. August 2004 09:05
by Wiedmann
Can you give us a code example?

Code Example

PostPosted: 12. August 2004 18:12
by rich1000
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();

Maybe it works now with Xampp 4.1.11

PostPosted: 19. January 2005 17:02
by jjrohrer
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.

Re: MySQLi - "Unknown command"

PostPosted: 27. October 2005 20:18
by ulises
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')