Jump to content

Recommended Posts

I am unfamiliar with the new mysqlnd  - a replacement for libmysql - and haven't come across anything showing how to install this on windows. I have installed php 5.3, which uses by default mysqlnd. It doesn't recognize the function mysql_connect, which tells me that something is wrong with the mysql configuration. In the phpinfo() printout, the only mysql related stuff that it prints out is this:

mysqlnd

mysqlnd => enabled
Version => mysqlnd 5.0.3-dev - 080129 - $Revision: 1.3.2.14 $
Client statistics =>  
bytes_sent => 0
bytes_received => 0
packets_sent => 0
packets_received => 0
protocol_overhead_in => 0
protocol_overhead_out => 0
result_set_queries => 0
non_result_set_queries => 0
no_index_used => 0
bad_index_used => 0
buffered_sets => 0
unbuffered_sets => 0
ps_buffered_sets => 0
ps_unbuffered_sets => 0
flushed_normal_sets => 0
flushed_ps_sets => 0
ps_prepared_never_executed => 0
ps_prepared_once_executed => 0
rows_fetched_from_server_normal => 0
rows_fetched_from_server_ps => 0
rows_buffered_from_client_normal => 0
rows_buffered_from_client_ps => 0
rows_fetched_from_client_normal_buffered => 0
rows_fetched_from_client_normal_unbuffered => 0
rows_fetched_from_client_ps_buffered => 0
rows_fetched_from_client_ps_unbuffered => 0
rows_fetched_from_client_ps_cursor => 0
rows_skipped_normal => 0
rows_skipped_ps => 0
copy_on_write_saved => 0
copy_on_write_performed => 0
command_buffer_too_small => 0
connect_success => 0
connect_failure => 0
connection_reused => 0
reconnect => 0
pconnect_success => 0
active_connections => 0
active_persistent_connections => 0
explicit_close => 0
implicit_close => 0
disconnect_close => 0
in_middle_of_command_close => 0
explicit_free_result => 0
implicit_free_result => 0
explicit_stmt_close => 0
implicit_stmt_close => 0
mem_emalloc_count => 0
mem_emalloc_ammount => 0
mem_ecalloc_count => 0
mem_ecalloc_ammount => 0
mem_erealloc_count => 0
mem_erealloc_ammount => 0
mem_efree_count => 0
mem_malloc_count => 0
mem_malloc_ammount => 0
mem_calloc_count => 0
mem_calloc_ammount => 0
mem_realloc_calloc => 0
mem_realloc_ammount => 0
mem_free_count => 0
Collecting statistics => Yes
Collecting memory statistics => No
Command buffer size => 2048
Read buffer size => 32768

???

Thanks for the file, but the problem is probably not with the php.ini file. I have two installations of php: 5.2 and 5.3. I tested the same ini file for both versions of php, and php5.2 connected, php5.3 gave me the "Fatal error: Call to undefined function mysql_connect()". This signals to me that something is jacked up with the mysqlnd, since that seems to be the only difference...

As far as I have read mysqlnd is a replacement for libmysql.dll. You should still need to enable php_mysql.dll (mysql_* functions) or php_mysqli.dll (mysqli_*) within the php.ini, in order to use the MySQL libraries in PHP5.3

I know it's a PITA every time I install in windows. Here are some things to check:

 

uncomment these and set them to correct directory:

extension_dir ="C:\PHP\ext"

extension=php_mysql.dll

extension=php_mysqli.dll

 

copy the *mysql*.dll files to your php ext directory (C:\PHP\ext)

 

REBOOT your machine after you change the php.ini

Thanks so much for all your input. Here is where I am right now:

My ini file has php_mysql.dll and php_mysqli.dll enabled. 

My extension_dir is properly set, otherwise it spits out lots of errors.

I copied libmysql.dll to the ext directory, (but since mysqlnd is apparently replacing this file, I don't know why this step would be necessary...)

I restarted my webserver, tested it out and got the "undefined mysql_connect()" error. Then I rebooted my computer, and same thing. I really need a function (getopt) that 5.3 offers, otherwise I'd just stick with what works. I guess mysqldn is built into the php5.3 binary. In other words I don't have to worry about configuring it with a dll file at all?  ???

 

 

I never messed around with the MSI install, I just downloaded the ZIP package. Also, the ini file is correct. Since I'm running it from the command line, I specified it with the -c option. And in the phpinfo() it reports the correct ini file. Any more tips or avenues I could pursue?

Has PHP5.3 been released yet? I cannot find any official docs from php.net about php5.3 or the mysqlnd extension.

 

It maybe because you have two different versions of PHP installed on the same computer. Perhaps PHP5.2 is interfering with your PHP5.3 installation.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.