Using Mysql 5.0 Functions with PHP

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

OK... But I can use SET PASSWORD without complicate more my problem? As I say above, I'm very new in mySQL/PHP and, aditional, my english is not "the top of the world..." :(
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You can, but I'd rather replace the dll.
What did you do to install php and mysql?
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

When I install mySql/PHP I don't need to change or upgrade any .DLL. I only set the Windows Path to C:\mySql. That's all.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

i.e. you've downloaded a package from php.net? Which one? How did you install it?
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

OK. I download and install the version 4.4.4. I extract the package to C:\PHP and follow the instrucctions of the PHP Manual to Manual Installation. According with this Manual, I translate all the files located in DLL and SAPI folders to the main folder (PHP). I add C:\PHP to the Windows Path and use the PHP.INI-recommended. Aditional I include the line: doc_root = c:\inetpub\wwwroot in PHP.INI because I work with IIS. That's my installation.

Thanks, volka.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

The MySQL client API in PHP4 works with MySQL up to 4.0. As of 4.1, their password hashing algorithm changed. You can adjust a setting in the my.conf file to make MySQL use the old password (16 bit) hash, although the new hash is much more secure. I would seriously consider moving up to PHP 5 and MySQL 5.
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

You are rigth about the versions. I use mySql 5.0 but the problem with PHP is that my Server Hosting (1planhost) don't have the upgrade to PHP 5.0 I'm waiting for this change, but they have mySql 5.0

A last question:

If I use the "famous" SET PASSWORD FOR ’some_user’@’some_host’ = OLD_PASSWORD(’mypass’); I need also to modify the my.conf?
(I don't find my.conf; is just like my.ini? )

Thanks...
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

THANKS TO ALL!!!! Now everything work SUPER OK including phpMyAdmin. Some errors persist but they are caused by my litle knowledge of mySql. With the time they are solved too. Really, thanks very much for your time and your aid. :)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Sorry if I insist but I've downloaded http://www.php.net/get/php-4.4.4-Win32. ... m/a/mirror
There's a libmysql.dll in that package. In order to you the php_mysql extension you must have done something so windows can find this dll.
Maybe you did it with a previous installation of php. Something like copying this dll to c:\windows or similar.
If you just replace this dll (the one you've copied) by the one in your mysql directory there's nothing else to do. php 4 will use this (new) dll and therefore use the new password encryption - no sweat, no need to change any data within the database.
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

In the app's all ok (according with your post) but remain a problem with the phpMyAdmin:

The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.

I found any solutions in Internet like

"Did you put the correct path to the directory where the dll files are residing, here:

extension_dir =c:\php\extensions (for me)

And did you uncomment this:

;extension=php_mbstring.dll "


I made all the changes but the problem persists
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Unless you plan on using the mbstring extension you do not need to enable it. I have the same warning on anothe machine of mine that I run phpMyAdmin on. It is not an error. It is only a warning that if you want the functionality of the MBString extension you need to enable it.
jeva39
Forum Commoner
Posts: 45
Joined: Sun Aug 27, 2006 11:45 pm
Location: Panamá

Post by jeva39 »

Thanks!!
Post Reply