Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgrading from PHP 4.4.2 to PHP 5+

Status
Not open for further replies.

FoxT2

MIS
Oct 3, 2003
143
US
Hi,

Ok I'm trying to upgrade from PHP 4+ to PHP 5+ and I have noticed that in PHP 5+ it no longer default to MySQL. My question is, what do I need to do to make this work with MySQL. And yes I have visited the PHP and MySQL web site for answers. And no, I could not find anything specific enough to get it to work. Here is what I have tried so far..

in the PHP.ini

extension=php_msql.dll
extension=php_mysql.dll
extension_dir = "c:\php\ext"
include_path = ".;c:\php"

I have also tried coping php_mysql.dll to the c:\windows\system32 directory and also to the c:\php and c:\php\ext directories.

I have tried chaning the path in the environment variable to %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Executive Software\Diskeeper\;c:\php\;

I have tried the same with this file too libmysql.dll.

Can someone please tell me in detail what I need to do to make this recognize MySQL 5.0. I have tried PHP 5.1.2, PHP 5.1.3, PHP 5.1.4. By the way I am using WinXP and IIS 5.1.

Thanks


 
Are you running PHP as a CGI or as an ISAPI filter? If the latter, you need to shutdown and restart IIS after changing php.ini.





Want the best answers? Ask the best questions! TANSTAAFL!
 
Hi sleipnir,

I am running it as CGI. And yes I have tried restarting IIS several times as well as rebooting several times. I have removed extension=php_msql.dll. And Yes I have already looked at the manual
I have also tried coping php_mysql.dll to the c:\windows\system32 directory and also to the c:\php and c:\php\ext directories.

I have tried chaning the path in the environment variable to %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Executive Software\Diskeeper\;c:\php\;

I have put libmysql.dll file in all the same locations as
php_mysql.dll as well.

Questions:
Should I be using extension=php_mysql.dll in the php.ini?
Are there any other .dll's I need to use as well?
Where should I put php_mysql.dll if I'm supposed to be using this.

All I'm after here is to make PHP 5+ see MySQL just like PHP 4.4.2 did. Correct me if I'm wrong but after I install PHP 5.1.4 using the installer, then copy php_mysql.dll & libmysql.dll to the correct folder, the only thing left to do is tweak the php.ini. Is that not correct? That is what is indicated in
 
Should I be using extension=php_mysql.dll in the php.ini?
Yes.

Are there any other .dll's I need to use as well?
To support MySQL? No. But other DLLs might add functionality to PHP that you might find useful...

Where should I put php_mysql.dll if I'm supposed to be using this.
I haven't run PHP too many times on Win32, but it seems that having php_mysql.dll in either \windows\system32 or the PHP install directory seemed to do the trick.

...tweak the php.ini. Is that not correct?
To the best of my knowledge, yes. What indications do you have that this is not working right?



Want the best answers? Ask the best questions! TANSTAAFL!
 
Thanks again for the help sleipnir,

Ok I finally got it! First off MySQL 5.0 does not like PHP 4+ from my findings. It does work well with PHP 5+. Secondly, I have had everything setup correctly from the beginning. Where I went wrong was I was using php_mysql.dll from a previous PHP version and did not even realize that! The base php 5.1.4 installer does not come with the php_mysql.dll, so you must download that seperately. So for anyone else having this kind of issue make sure you get the correct php_mysql.dll that corresponds to your version of PHP. It makes a difference.

Thanks,

FoxT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top