how do i get mySQL to work with PHP?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

how do i get mySQL to work with PHP?

Post by Obadiah »

ok....i finally got PHP working on my server....the funny thing is all i did was uninstall the version i had....then reinstall that same version...i didnt even touch the ini file and it came right up....lol...i was like hmmm....ok?...anyways...im wanting to use both mySQL and PHP to make a chat forum like this on for one of my companies 3 sites...i was working on something similar before and i need to test to see if it still works....i also downloaded one of those flash web forums as a quick solution until i learn to build my own...however im at the point of trying to get these 2 programs to work together on IIS...anyone know of a good step by step install instruction for mySQL...im using php version 4.42...what version of mySQL will be compatable with that?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

The 5.0 tree of mysql is currently recommend. Current version: 5.0.22
There's a problem with old client libraries and more current servers, http://dev.mysql.com/doc/refman/5.0/en/old-client.html
But you can replace libmysql.dll of the php.net win32 package by the current one from your mysql installation, if that becomes an issue.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

volka wrote:The 5.0 tree of mysql is currently recommend. Current version: 5.0.22
There's a problem with old client libraries and more current servers, http://dev.mysql.com/doc/refman/5.0/en/old-client.html
But you can replace libmysql.dll of the php.net win32 package by the current one from your mysql installation, if that becomes an issue.
so, 5.0.22 is the .net version? or do i need php.net to get mysql and php to run properly on IIS and windows server 2003? By the way, sorry for the stupid questions, I just never had to install anything on a server and it seems harder for me to grasp some of the concept of installing it than it is for me to understand and write the language bc ususally when ur on a job all ur tools are there for u and all u have to do is start coding....maybe download and set up a GUI or a development environment for your language...but im using php 4.4.2....should i change? would mySQL 5.0 work with php 4.4.2? or should i download something like mySQL admin?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

.net version? IIS and mysql are independent programs/servers.

Do you really have to worry about the installation process or would something like http://www.apachefriends.org/en/xampp.html solve your problems?
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

a setup like that will be nice...however will it work on iis 6.0, if not how do i go about disabling one vs the other?....im new to the whole php/mySQL experience
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

it comes with its "own" webserver - apache.
So there is no need for iis. In fact, their respective default settings would not allow both server programs to work at the same time (both want to listen to port 80).
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

so how do i get iis to stop listening at port 80?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

do you need it running anyway?
if not simply stop the service.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

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

Post by RobertGonzalez »

Are you wanting to run Apache, PHP and MySQL on your Windows machine, or do you want to run PHP and MySQL on your IIS server? Both are easy. In fact you can have both servers run at the same time on different ports. Right now on my development machine I have IIS 5 running on 8080 and apache running on 80. I am running the .NET framework 2.0, PHP5, MSDE Express and MySQL5. I can run PHP apps on IIS and I can hit both MSDE Express and MySQL with both server-sdie platforms.

What exactly are you attempting to do?
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post by Obadiah »

i just switched my apache to port 80 and iis6 to port 82(i really just wanted to get it out the way at the time) but say if i swiched my IIS6 to port 8080, how would i go about directing webtrafic to that port if when a user veiws ur site it autimatically directs them to port 80?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You can put a PHP page on the 8080 server that redirects to the other server. Just append the port number to the site address after a colon.

http://www.mysite.com:8080
Post Reply