A little food for thought
Saturday, April 30, 2005
Apache, PHP and MySQL
Last 2 days I spent on installing Apache, PHP and MySQL. I wanted to see the server side of development. I used my windows laptop I got it from work.
Windows has its own advantages (easy installers) and disadvantage (not enough help).
So I started with installing Apache. I downloaded the Apache server. It comes as a installer file . And installed in laptop. Installation went fine just the way installation goes in windows. But when I tried to start the server. It could not start the server. It seems some of the software on my machine already using port 80. I could not figure it out which one. So I just changed the port of Apache to 8080 and wholla.....it started the server and I could see the Aapche test page.
The nest step was to install PHP. There is no installer for PHP. What we need to do is download the file and unzipped it at any directory....so simple. After unzipping the next step is rename a file to php.ini. And create some lines in httpd.conf file. But after following the steps....I still could not get the php running....So went back to google (long live google....i just don't know how was the life before google). I found that we need to copy the dlls from sapi directory to main php directory. After doing that it started working.
So the last piece of puzzle is Mysql. It is again direct installation. After installation it failed to create service. It seems that my pc already has a mysql service. But I could not find the software installed anywhere. So I guess the person using this laptop might have installed this and uninstalled it later. But uninstallation must have removed the software keeping services there.
How do we delete the service. The services window does not allow you to delete the service. Back to google. It seems you need to use a command line tool 'sc -delete service' to delete the service. A command line tool on windows XP in 2005 !!!!
After deleting the service I could create a new service and could start the server. I could also connect to server and create some tables and insert rows.
Now connect the PHP to Mysql....No setups nothing..Supposed to work out of box. Nope.....when i run test page it gives me error 'Client does not support sever authentication upgrade the server' What the hell... It seems Mysql 4.1 used 16 bit password but PHP mysql client uses 8 bit....so solution? change the password with old_password('oldpwd') function.
After doing all these I could see php page spitting mysql data on apache server....
Hope fully when I do the same excersise on my home PC, it should not have so many issue, Also may be I will just use easy php...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment