PHP4 PHP5 Switching now cannot log into SQL Server

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

PHP4 PHP5 Switching now cannot log into SQL Server

Postby Melza » 28. March 2008 01:27

Hi,

This is my very first post in a forum EVER! So be gentle.

I am trying to switch between PHP5 and PHP4. I used the switch bat and everything was great, worked well until I tried to log into myPHPAdmin whilst running PHP4.

I entered username and password then I got an error that says Cannot Log into the MySQL Server

The username and password works fine when I switch back to PHP5.

Is there something else I need to change?

I am using the latest version of xampp 1.6.6a.

Thanks
Melza
 
Posts: 1
Joined: 28. March 2008 00:13

Switch to php 4 changes MySql version!

Postby macview » 13. May 2008 16:27

I am having a similar issue. But I have noticed after installing Xampp with it's defaults (PHP5) all looks good, set up of password etc. Switch to php4 and all goes wrong - can't log into phpMyadmin - At first I thought it was the pass word issue but now there is something more to it.

If I re-install putting in NO password for MYsql THEN switch to PHP4, I can get into phpMyadmin. BUT look at the MYSQL version in top corner - 3.23.49! How did that happen? It was running MYsql version 5 before the switch - IF it's running a different version of MYSQL then adding the pass word to MYSQL (Via xampp security) breaks the phpMyadmin access.

SO looking at the bottom of phpMyadmin it says in a warning "Your PHP MySQL library version 3.23.49 differs from your MySQL server version 5.0.51a. This may cause unpredictable behavior." Why it did this I don't know. I will see if I can fix this and post back the result.
macview
 
Posts: 5
Joined: 13. May 2008 16:17

Postby ifokkema » 14. May 2008 11:50

Make sure the mysqli module is loaded into PHP4... the 'i' stands for improved (thus, newer MySQL versions).
HTH (Hope this helps),
Ivo
ifokkema
 
Posts: 56
Joined: 08. May 2008 13:05
Location: Leiden, Netherlands

mysqli file

Postby macview » 14. May 2008 14:22

Okay, in the main php.ini file there is no call to extensions for loading any .dll files BUT there is in the php4 and php5.ini files (and the there is no reference to mysqli.dll only mysql.dll in those) There is a libmysqli.dll file in the php4 folder itself.

SO the question is; should I be moving some files around and setting the extension load in a particular php.ini file?
macview
 
Posts: 5
Joined: 13. May 2008 16:17

Re: mysqli file

Postby ifokkema » 14. May 2008 14:29

macview wrote:SO the question is; should I be moving some files around and setting the extension load in a particular php.ini file?

I don't think you need to move files around, but adding a line to the php.ini file that already loads the mysql.dll to also include the mysqli.dll should work...
ifokkema
 
Posts: 56
Joined: 08. May 2008 13:05
Location: Leiden, Netherlands

No change

Postby macview » 14. May 2008 20:04

I believe it is loading now (if I take mysqli.dll out, the error log will show it missing) but there is no change to the error in PHPmyadmin and the MySql version still says 3.23.49 instead of 5.0.51a. I will keep trying things to see.
macview
 
Posts: 5
Joined: 13. May 2008 16:17

Postby ifokkema » 15. May 2008 08:25

how many libmysql.dll files do you have spread over your hard drive? Maybe PHP is picking the wrong one...
ifokkema
 
Posts: 56
Joined: 08. May 2008 13:05
Location: Leiden, Netherlands

Postby sari42 » 15. May 2008 10:20

iirc the mysql extension uses 3.23 functionality if it can't load any libmysql. Try and copy the latest libmysql.dll from, e.g., apache\bin into the search path (usually "system32"). You also could try the mysqli extension. There also was a controluser related bugfix lately, see http://sourceforge.net/tracker/index.ph ... tid=377408 "(ok 2.11.5) Mysql Server and Client version mismatch"
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby Wiedmann » 15. May 2008 11:53

Make sure the mysqli module is loaded into PHP4...

mysqli is only available for PHP5, not for PHP4.

and the MySql version still says 3.23.49 instead of 5.0.51a.

The mysql extension is a static build-in extension in PHP4. For PHP4 builds the MySQL client libraries 3.23.49 is used. And because it's static build in you can't change this. (In PHP5 this is a shared extension).
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

php4

Postby macview » 15. May 2008 13:59

So is it something I should just ignore if were using php4?

We're running XAMPP 5.5 on our current machines with php4 and MySql shows properly (as version 5) and was hoping to update all to a new machine but if only if there is no issues with this.

So if you can tell me this is just a false reading and we ARE in fact running Mysql 5 under php4 and it should work as usual, that would be great.
macview
 
Posts: 5
Joined: 13. May 2008 16:17

Postby Wiedmann » 15. May 2008 14:55

So if you can tell me this is just a false reading and we ARE in fact running Mysql 5 under php4 and it should work as usual, that would be great.

You must distinguish:
- You are running MySQL server version 5.x.x
- PHP4 is using the MYSQL client version 3.x.x

(The client must not be the same version as the server. Of course, it's better to have the same... that'S what phpMyAdmin is telling you)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Thanks

Postby macview » 15. May 2008 16:36

Thanks for the clarification - this helps, Thanks again.
macview
 
Posts: 5
Joined: 13. May 2008 16:17


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 76 guests