i need help to set up a server, and install php and Mysql
Moderator: General Moderators
i need help to set up a server, and install php and Mysql
Hi people! I am doing my final year project where I am creating a video rental website using PHP and MySql, however i am quite new to these languages and needed help to set up the server on my home pc. I am using Apache but i do not know exactely which server to use, some one recommended me to use Tomcat apache server. Can anyone help me to start me off and I also need help on how to install the server. I also need to install PHP and MySql, but don't know how to 
- Pointybeard
- Forum Commoner
- Posts: 71
- Joined: Wed Sep 03, 2003 7:23 pm
- Location: Brisbane, AUS
- Contact:
You dont really want tomcat if your using php. If your not needing to care much about the setting up of the server try http://www.firepages.com.au they have a nice install package with eveything in. Apache, php, mysql, phpmyadmin. But if you need to manually set it all up, i would suggest you visit the relvant sites. http://www.php.net http://www.mysql.org and http://www.apache.org and get the stuff you need from there.
-PB
-PB
-
crazytopu
- Forum Contributor
- Posts: 259
- Joined: Fri Nov 07, 2003 12:43 pm
- Location: London, UK
- Contact:
Doing manually helps you learn better...
Follow this steps…I learnt by making so many mistakes..but refined my steps as I proceeded…so hope this short tutorial of mine would help you get all 3 working properly.
You should install MySql first, then php and then finally apache in order for them to work properly.
Download Mysql from http://www.mysql.com and save them in a folder called mysqldownloads- you can name it whatever you like.
Run the setup.exe in mysqldownloads. Let the files be installed in a folder you can name it as mysql for ease of recognition.
Follow the steps below to get your PHP working with your apache:
Download the newest PHP binary distribution for windows from http://www.php.net
Extract to a directory of your choice. I suggest c:\php
Copy php4_ts.dll to your windows\system32 directory
Copy php.ini-dist to your WINDOWS directory...typically c:\winnt - rename it to php.ini
Open php.ini in an editor and at a minimum change extension_dir to: c:\php\extensions
I recommend quoting your values. ie: extension_dir="c:\php\extensions"
Close php.ini file.
Download apache from http://www.apache.org
Install apache in G:\Program Files\Apache Group\Apache
Check if the apache server is running ok by going to your brower’s address bar and typing http://localhost
Open php.ini file again:
Set the 'doc_root' to point to your web servers
document_root. ex: G:\Program Files\Apache Group\Apache\htdocs
close php.ini file.
open G:\Program Files\Apache Group\Apache\conf\httpd.conf file:
Just add the following lines to your httpd.conf:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Use find (Ctrl+ f) to get the first words from each respective lines:
For example: press Ctrl+ f and in the find window type : LoadModule and at the end of last LoadModule line paste this line : LoadModule php4_module c:/php/sapi/php4apache.dll
Do same for rest two.
close httpd.conf
Test configuration of http.conf file by going to start>programs>Apache HTTP server>Configure Apache Server>Test configuration
See the test message. If error is reported debug it first.
After you get the “No Syntex Error” message- restart your apache server.
Put the following code into a text file and save it as phpinfo.php.
<?php phpinfo();?>
Very important note: when you save this text file don’t save it as a text file..so what you have to do is simply change the file type from “text” type to “all” type when u click save. It is very important that you do it correctly. It took me 2 whole days to figure out that I saved this file as a text file, which I should not have done.
Put phpinfo.php into G:\Program Files\Apache Group\Apache\htdocs
Go to browser and type: http:\\localhost\phpinfo.php
Do you see a file contaiting so many information about php configuration? If yes,
You are done successfully installing all 3!! Congratulations!
If you get a message “ no server found” go back and check all the steps again.
Crazy Topu
Follow this steps…I learnt by making so many mistakes..but refined my steps as I proceeded…so hope this short tutorial of mine would help you get all 3 working properly.
You should install MySql first, then php and then finally apache in order for them to work properly.
Download Mysql from http://www.mysql.com and save them in a folder called mysqldownloads- you can name it whatever you like.
Run the setup.exe in mysqldownloads. Let the files be installed in a folder you can name it as mysql for ease of recognition.
Follow the steps below to get your PHP working with your apache:
Download the newest PHP binary distribution for windows from http://www.php.net
Extract to a directory of your choice. I suggest c:\php
Copy php4_ts.dll to your windows\system32 directory
Copy php.ini-dist to your WINDOWS directory...typically c:\winnt - rename it to php.ini
Open php.ini in an editor and at a minimum change extension_dir to: c:\php\extensions
I recommend quoting your values. ie: extension_dir="c:\php\extensions"
Close php.ini file.
Download apache from http://www.apache.org
Install apache in G:\Program Files\Apache Group\Apache
Check if the apache server is running ok by going to your brower’s address bar and typing http://localhost
Open php.ini file again:
Set the 'doc_root' to point to your web servers
document_root. ex: G:\Program Files\Apache Group\Apache\htdocs
close php.ini file.
open G:\Program Files\Apache Group\Apache\conf\httpd.conf file:
Just add the following lines to your httpd.conf:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
Use find (Ctrl+ f) to get the first words from each respective lines:
For example: press Ctrl+ f and in the find window type : LoadModule and at the end of last LoadModule line paste this line : LoadModule php4_module c:/php/sapi/php4apache.dll
Do same for rest two.
close httpd.conf
Test configuration of http.conf file by going to start>programs>Apache HTTP server>Configure Apache Server>Test configuration
See the test message. If error is reported debug it first.
After you get the “No Syntex Error” message- restart your apache server.
Put the following code into a text file and save it as phpinfo.php.
<?php phpinfo();?>
Very important note: when you save this text file don’t save it as a text file..so what you have to do is simply change the file type from “text” type to “all” type when u click save. It is very important that you do it correctly. It took me 2 whole days to figure out that I saved this file as a text file, which I should not have done.
Put phpinfo.php into G:\Program Files\Apache Group\Apache\htdocs
Go to browser and type: http:\\localhost\phpinfo.php
Do you see a file contaiting so many information about php configuration? If yes,
You are done successfully installing all 3!! Congratulations!
If you get a message “ no server found” go back and check all the steps again.
Crazy Topu
-
ilovetoast
- Forum Contributor
- Posts: 142
- Joined: Thu Jan 15, 2004 7:34 pm
- Michael 01
- Forum Commoner
- Posts: 87
- Joined: Wed Feb 04, 2004 12:26 am
Agreed. If he is not used to PHP, than using PHP on Windows is going to be a real pain in the ass for the first few scripts just because of the differences of syntax..etc..AKKK!! no way would I use php on windows..did it once, and its a pain..MAJOR pain.ilovetoast wrote:Do you have to use Windows? You might consider a Linux install on the same box instead.....
peace
Open Source Toast
Could you be more specific. My first scripts have all been written on Windows and a couple on a Mac, the uploaded on a Linux box and all have always worked!Michael 01 wrote: Windows is going to be a real pain in the ass for the first few scripts just because of the differences of syntax.
ktan you can try http://www.easyphp.org
You'll save masses of time for development and testing
Dr Evil[/b]
- Michael 01
- Forum Commoner
- Posts: 87
- Joined: Wed Feb 04, 2004 12:26 am
You are the lucky one for sure. I have had nothing but problems with Windows and PHP. Maybe now with the newer versions out, they are more forgiving, but with version 3 to 4.0 they were miserable.
Things such as the \ rather than / and double quotes...etc. Than of course comes the path directories which at times were simple..until a person wanted to do lets say a picture gallery or something along those lines.
My problem is, I started with PHP on Linux, and never messed with it on Windows for more than a couple months, so maybe its just me being awfully hard on Microsoft...teeheee.
Things such as the \ rather than / and double quotes...etc. Than of course comes the path directories which at times were simple..until a person wanted to do lets say a picture gallery or something along those lines.
My problem is, I started with PHP on Linux, and never messed with it on Windows for more than a couple months, so maybe its just me being awfully hard on Microsoft...teeheee.
I tend to dislike Microsoft products as well, but as I have only been developping seriously for 2 years I might be lucky with PHP 4.
For a beginner it is often easier to install a package like easyphp on windows than go through the process of installing Linux than mysql and php.
Thanks for the honest reply
For a beginner it is often easier to install a package like easyphp on windows than go through the process of installing Linux than mysql and php.
Thanks for the honest reply