Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,159,093 members, 7,838,763 topics. Date: Friday, 24 May 2024 at 08:57 AM |
Nairaland Forum / Science/Technology / Webmasters / Installing Apache,mysql + Php (windows) (1219 Views)
How To Install Apache, Mysql & PHP On Ubuntu 14.10 / Joomla Error: Ssl-error-rx-record-too-long-and-apache-ssl / Webmasters Quiz :: How To Fix Apache Redirection Bugs (2) (3) (4)
Installing Apache,mysql + Php (windows) by kambo(m): 8:33pm On Apr 15, 2007 |
INSTALLING APACHE,MYSQL AND PHP on WINDOWS ============================================ Assumptions: ---------- ur using windows NT technology ( any later than win ME. i.e 2000,xp,nt,more likely xp.) i ur root drive is C:\ I assume ur installing packages for development purposes(web dev. etc ) on a local machine. Lay hands on the following tools (windows version) php,apache,mysql. download, zip versions(for php) and windows installer versions for mysql and apache . MYSQL ===== DOWNLOAD MYSQL FROM -------- DOWNLOAD THE ONE WITH THE .zip /msi installer. open on ur machine and by double clicking, when installing , install as typical,choose the 'typical' option. when requested to 'create a new account' click 'skip sign up'. uncheck the 'configure mysql server now ' check box. click finish button to finish the database server installation. To start mysql server under windows : open ur 'command prompt window' click Start button on windows xp windows screen(bottom left of screen)->all programs->accessories->command prompt. click the command prompt icon to open a new command prompt window. on the window u'd most likely see : boot drive:\Documents and Settings\computer name> e.g C:\Documents and Settings\[ur computer name] > navigate to the directory where Mysql was installed: > easiest way is by backing out of current directory till ur at the systems root directory. so type : cd, [press Enter] i.e C:\Documents and Settings\computer name>cd, cd, [press Enter] " " "" when u got only root drive on the screen stop. [next navigate to the Mysql 'bin' directory: type: >cd P* * /My*/M*/b* [ - takes u straight to server 'bin' directory] the objective is to start the database server daemon , without it being started u cant begin using the database. >type mysqld[space key]--standalone[Enter key] i.e. mysqld --standalone [enter] the cursor should be blinking on a new line, signifying the start of the database. Now the database daemon thread has been start , u can now access the database. > Open another command prompt window. [by clicking ]start button->all programs->accessories->command prompt. navigate to the 'bin' directory of the Mysql server ,as u did before,previously. but this time u want to create or manipulate a database. >type at the command prompt.[bin directory] mysql -u root [enter] u should see the following message on the command prompt screen: "Welcome to the Mysql monitor. Commands end with ; or \g. Your Mysql connection id is [number] to server version: [server version] " Type 'help;' or '\h' for help. Type '\c' to clear the buffer. " the "-u " command signifies "user"and the "root" is the username. " mysql> to quit mysql> prompt type: \q; " if u see this ur database start up was successful! to access a database or view the list of databases type at the 'mysql' prompt. show databases[semi colon] ie. mysql>show databases; dont forget the semi-colon; That's all about setting up mysql. next. Setting up Apache web server. ========================================= installing Apache web server ========================================= Apache http server is the free web server for serving ur html pages and other resources to the web. it's ur web server. download it from -apache.org. i'll assume u have the installer downloaded to ur system. - to install Apache: >double click the installer icon to begin installation. >click 'next' on the Welcome page. >accept the license terms and click next >on the server information screen ur required to enter network Domain. i assume ur installing the package for development purpose, on a local machine. in the 'Network Domain' text box, enter -> localhost for server name : enter -> localhost -> enter an email address of ur choice. in the Email Address section.->ur_email_id@localhost finally click the 'for All users radio button.' localhost is the name of ur localmachine for development purposes. >click the 'next' button to proceed with installation select the 'typical' set up option >click the 'next' button. >Accept default destination folder, and click 'next' >click the 'install' button to commence installation [- the install wizard commence installation , may take some time ] >Click the 'finish' button to complete the apache http server installation. - when successfully installed a purple feather appears on the bottom left side of ur windows tray with a green light on ,signifying that the web server is on and running. >u have to configure the web server but hold that off until after the php installation. ====================================================================== INSTALLING PHP VERSION 4. ===================================================================== download the zip file and click on it to open. > unzip it to a directory on ur system. e.g C:\unzipped\php4.0.4 etc > FOR unambiguity or to avoid clustering it with other zip files u can change the destination folder to sth more meaningful. e.g C:\PHP\ (from C:\unzipped\php[version no) > i use C:\PHP next step is to configure the PHP files to work with the web server . Ur going to move some files around and modify some things. so lets go. >navigate to the where u unzipped the php files to. e.g C:\unzipped\php[version no] this example uses php 4. the folder should contain the following files and sub folders. FOLDERS {cli,dlls,extensions,mibs,openssl,pdf-related,PEAR,sapi} Files {php4ts.dll,php.ini-dist,php.ini-recommended,etc} for web development purposes, php will be installed as an Apache[the webserver] module. it will work with the web server to parse ur php script embedded web pages. -> rename the php.ini-dist file to php.ini. the file should change to a notepad with a gear icon. or an iconified notepad. -> open the php.ini configuration file and make the following changes. a) look for the following lines : short_open_tag = On. //this allows u to contain php script in <? ?> tags. it unsafe and unrecommended except for learning and testing purposes. to turn it off. set the value to 'Off'[Off without the inverted commas] i.e short_open_tag = Off [no semi-colons permitted.] b) switch of 'magic quotes' magic_quotes_gpc = On after 'switching off' it should read : magic_quotes_gpc = Off resave the php configuration folder and close it. > i.e save as php.ini and exit notepad. look for the following line and set its value to 'Off' > since ur setting up php to run as a server module u'll have to transfer the interpreter to the web server's bin directory. > copy the php file , php4ts.dll to apache's 'bin' directory. server's bin directory should be: root drive[or wherever Apache was installed]/ e.g C:\program files\Apache Group\Apache2\bin > copy [or cut] php4ts.dll [ the script interpreter] to the 'bin' directory . if u've come this far u aint doing bad at all. ur almost there. Finally copy the configured php.ini file (notepad with gear icon) to ur window's directory[folder]. ie. C:/Windows next : configure the web server to work with the script interpreter[php] ================================================================== > Open the server configuration file. click Start menu->All Programs->Apache HTTP Server [version no]->(sub menu)Configure Apache Server->(sub menu) Edit Apache httpd.conf Configuration file (click on this file to begin server configuration) >make the following changes to the httpd.conf file. [Web server configuration file ] a) indicate the directory where ur web pages will be stored. This is a folder where all web pages u create will be stored. Create the folder and place the location address in the httpd.conf file. e.g lets create a folder called -"MyWebFolder" in C:\ (c drive.) and point apache to it. Change the following line in httpd.conf file DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" to [where ur web folder is located i.e C:/MyWebFolder (enclose with quotation marks )] [ ur config file should like this after the change ] DocumentRoot "C:/MyWebFolder" repeat the same change to the following lines-still httpd.config file. <Directory "C:/program Files/Apache Group/Apache2/htdocs"> change it to this : <Directory "C:/MyWebFolder"> Recap: So far we've transfered php script engine to web server directory, Included command to Load server module, and pointed the web server to a designated public folder for our web pages. next. include commands to enable the web server distinguish and process code embedded pages [by calling the php interpreter saved in 'bin']. > Find the following lines in the httpd.conf file that begin with the phrase:'AddType application/' e.g AddType application/x-compress .z typeinclude the following two lines note the space b4 the .php ) AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps c)Load the web server module engine module: Look for the following line: LoadModule foo_module modules/mod_foo.so # type on a new new line below the '#' sign the following. [there should be no '#' before this instruction set ] type: LoadModule php4_module PHP/php/sapi/php4apache2.dll if using php5 it willbe php5_module, the core thing is to point the web server to the apache2.dll file in 'sapi' folder of the extracted php package, so specify the path to this file[php4apache2.dll] as it appears on ur system. resave the httpd.conf file [web server configuration file] and close notepad. Restart ur system to register all the changes u've made so far. installation and configuration is finished. TEst the work to see if it's without glitches. ====================================================================== TESTING SERVER SET UP ====================================================================== 1) create a plain html file and save it to our web server directory. (C:\MyWebFolder) open notepad : start menu->All Programs->Accessories->notepad. type the following and save as Test.html. <html><body><h2>Hello world - AMP set up </h2></body></html> 2) view the file : open a web browser and type in the address column http://localhost/Test.html 3) for the php test : open notepad again and : type the following> <?php //short tags have been turned off remember print "hello work. successfully installed php "; print "<br> i am a web designer wannabe "; ?> save the file as hellowork.php ,for type: save as 'All File' type instead of 'text' and save to ur web folder, i.e C:\MyWebFolder. to preview files . fire up explorer or whatever browser ur using and type in http://localhost/hellowork.php if all goes well, u should see some text on the screen else, u gat trouble-shooting to do!!.hello work! |
Re: Installing Apache,mysql + Php (windows) by kambo(m): 8:49pm On Apr 15, 2007 |
INSTALLING APACHE,MYSQL AND PHP on WINDOWS ============================================ Assumptions: ---------- ur using windows NT technology ( any later than win ME. i.e 2000,xp,nt,more likely xp.) i ur root drive is C:\ I assume ur installing packages for development purposes(web dev. etc ) on a local machine. Lay hands on the following tools (windows version) php,apache,mysql. download, zip versions(for php) and windows installer versions for mysql and apache . MYSQL ===== DOWNLOAD MYSQL FROM -------- DOWNLOAD THE ONE WITH THE .zip /msi installer. open on ur machine and by double clicking, when installing , install as typical,choose the 'typical' option. when requested to 'create a new account' click 'skip sign up'. uncheck the 'configure mysql server now ' check box. click finish button to finish the database server installation. To start mysql server under windows : open ur 'command prompt window' click Start button on windows xp windows screen(bottom left of screen)->all programs->accessories->command prompt. click the command prompt icon to open a new command prompt window. on the window u'd most likely see : boot drive:\Documents and Settings\computer name> e.g C:\Documents and Settings\[ur computer name] > navigate to the directory where Mysql was installed: > easiest way is by backing out of current directory till ur at the systems root directory. so type : cd, [press Enter] i.e C:\Documents and Settings\computer name>cd, cd, [press Enter] " " "" when u got only root drive on the screen stop. [next navigate to the Mysql 'bin' directory: type: >cd P* * /My*/M*/b* [ - takes u straight to server 'bin' directory] the objective is to start the database server daemon , without it being started u cant begin using the database. >type mysqld[space key]--standalone[Enter key] i.e. mysqld --standalone [enter] the cursor should be blinking on a new line, signifying the start of the database. Now the database daemon thread has been start , u can now access the database. > Open another command prompt window. [by clicking ]start button->all programs->accessories->command prompt. navigate to the 'bin' directory of the Mysql server ,as u did before,previously. but this time u want to create or manipulate a database. >type at the command prompt.[bin directory] mysql -u root [enter] u should see the following message on the command prompt screen: "Welcome to the Mysql monitor. Commands end with ; or \g. Your Mysql connection id is [number] to server version: [server version] " Type 'help;' or '\h' for help. Type '\c' to clear the buffer. " the "-u " command signifies "user"and the "root" is the username. " mysql> to quit mysql> prompt type: \q; " if u see this ur database start up was successful! to access a database or view the list of databases type at the 'mysql' prompt. show databases[semi colon] ie. mysql>show databases; dont forget the semi-colon; That's all about setting up mysql. next. Setting up Apache web server. ========================================= installing Apache web server ========================================= Apache http server is the free web server for serving ur html pages and other resources to the web. it's ur web server. download it from -apache.org. i'll assume u have the installer downloaded to ur system. - to install Apache: >double click the installer icon to begin installation. >click 'next' on the Welcome page. >accept the license terms and click next >on the server information screen ur required to enter network Domain. i assume ur installing the package for development purpose, on a local machine. in the 'Network Domain' text box, enter -> localhost for server name : enter -> localhost -> enter an email address of ur choice. in the Email Address section.->ur_email_id@localhost finally click the 'for All users radio button.' localhost is the name of ur localmachine for development purposes. >click the 'next' button to proceed with installation select the 'typical' set up option >click the 'next' button. >Accept default destination folder, and click 'next' >click the 'install' button to commence installation [- the install wizard commence installation , may take some time ] >Click the 'finish' button to complete the apache http server installation. - when successfully installed a purple feather appears on the bottom left side of ur windows tray with a green light on ,signifying that the web server is on and running. >u have to configure the web server but hold that off until after the php installation. ====================================================================== INSTALLING PHP VERSION 4. ===================================================================== download the zip file and click on it to open. > unzip it to a directory on ur system. e.g C:\unzipped\php4.0.4 etc > FOR unambiguity or to avoid clustering it with other zip files u can change the destination folder to sth more meaningful. e.g C:\PHP\ (from C:\unzipped\php[version no) > i use C:\PHP next step is to configure the PHP files to work with the web server . Ur going to move some files around and modify some things. so lets go. >navigate to the where u unzipped the php files to. e.g C:\unzipped\php[version no] this example uses php 4. the folder should contain the following files and sub folders. FOLDERS {cli,dlls,extensions,mibs,openssl,pdf-related,PEAR,sapi} Files {php4ts.dll,php.ini-dist,php.ini-recommended,etc} for web development purposes, php will be installed as an Apache[the webserver] module. it will work with the web server to parse ur php script embedded web pages. -> rename the php.ini-dist file to php.ini. the file should change to a notepad with a gear icon. or an iconified notepad. -> open the php.ini configuration file and make the following changes. a) look for the following lines : short_open_tag = On. //this allows u to contain php script in <? ?> tags. it unsafe and unrecommended except for learning and testing purposes. to turn it off. set the value to 'Off'[Off without the inverted commas] i.e short_open_tag = Off [no semi-colons permitted.] b) switch of 'magic quotes' magic_quotes_gpc = On after 'switching off' it should read : magic_quotes_gpc = Off resave the php configuration folder and close it. > i.e save as php.ini and exit notepad. look for the following line and set its value to 'Off' > since ur setting up php to run as a server module u'll have to transfer the interpreter to the web server's bin directory. > copy the php file , php4ts.dll to apache's 'bin' directory. server's bin directory should be: root drive[or wherever Apache was installed]/ e.g C:\program files\Apache Group\Apache2\bin > copy [or cut] php4ts.dll [ the script interpreter] to the 'bin' directory . if u've come this far u aint doing bad at all. ur almost there. Finally copy the configured php.ini file (notepad with gear icon) to ur window's directory[folder]. ie. C:/Windows next : configure the web server to work with the script interpreter[php] ================================================================== > Open the server configuration file. click Start menu->All Programs->Apache HTTP Server [version no]->(sub menu)Configure Apache Server->(sub menu) Edit Apache httpd.conf Configuration file (click on this file to begin server configuration) >make the following changes to the httpd.conf file. [Web server configuration file ] a) indicate the directory where ur web pages will be stored. This is a folder where all web pages u create will be stored. Create the folder and place the location address in the httpd.conf file. e.g lets create a folder called -"MyWebFolder" in C:\ (c drive.) and point apache to it. Change the following line in httpd.conf file DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" to [where ur web folder is located i.e C:/MyWebFolder (enclose with quotation marks )] [ ur config file should like this after the change ] DocumentRoot "C:/MyWebFolder" repeat the same change to the following lines-still httpd.config file. <Directory "C:/program Files/Apache Group/Apache2/htdocs"> change it to this : <Directory "C:/MyWebFolder"> Recap: So far we've transfered php script engine to web server directory, Included command to Load server module, and pointed the web server to a designated public folder for our web pages. next. include commands to enable the web server distinguish and process code embedded pages [by calling the php interpreter saved in 'bin']. > Find the following lines in the httpd.conf file that begin with the phrase:'AddType application/' e.g AddType application/x-compress .z typeinclude the following two lines note the space b4 the .php ) AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps c)Load the web server module engine module: Look for the following line: LoadModule foo_module modules/mod_foo.so # type on a new new line below the '#' sign the following. [there should be no '#' before this instruction set ] type: LoadModule php4_module PHP/php/sapi/php4apache2.dll if using php5 it willbe php5_module, the core thing is to point the web server to the apache2.dll file in 'sapi' folder of the extracted php package, so specify the path to this file[php4apache2.dll] as it appears on ur system. resave the httpd.conf file [web server configuration file] and close notepad. Restart ur system to register all the changes u've made so far. installation and configuration is finished. TEst the work to see if it's without glitches. ====================================================================== TESTING SERVER SET UP ====================================================================== 1) create a plain html file and save it to our web server directory. (C:\MyWebFolder) open notepad : start menu->All Programs->Accessories->notepad. type the following and save as Test.html. <html><body><h2>Hello world - AMP set up </h2></body></html> 2) view the file : open a web browser and type in the address column http://localhost/Test.html 3) for the php test : open notepad again and : type the following> <?php //short tags have been turned off remember print "hello work. successfully installed php "; print "<br> i am a web designer wannabe "; ?> save the file as hellowork.php ,for type: save as 'All File' type instead of 'text' and save to ur web folder, i.e C:\MyWebFolder. to preview files . fire up explorer or whatever browser ur using and type in http://localhost/hellowork.php if all goes well, u should see some text on the screen else, u gat trouble-shooting to do!!.hello work! |
Re: Installing Apache,mysql + Php (windows) by Fdeveloper(m): 7:23am On Apr 16, 2007 |
Very helpful post. The URLs for the various packages are as follows: MySQL: http://dev.mysql.com/downloads Apache: http://httpd.apache.org PHP: http://www.php.net/downloads.php |
Re: Installing Apache,mysql + Php (windows) by gbolio4(m): 4:12am On Apr 28, 2007 |
Haba, Why grammar and tori come long like this Abeg just go get xampp and follow the instructions wey dem give. You go achieve the same complete setup - stresslessly- in 65 seconds flat Haba!!! |
Re: Installing Apache,mysql + Php (windows) by abimco(m): 7:14pm On Apr 28, 2007 |
Hello, STOP THE STRESS JUST WAMP5 your system. Download WAMP5 here it is free: www.wampserver.com/en/download.php This release opens a new branche of WAMP5 : - multilingual manager - compatible with Windows Vista - now with branch 2.2.x of Apache (2.2.4) - PHP 5 - MySQL5 |
(1) (Reply)
Webmail! / Free Lecture On Google Adsense / Start Your Own 3-in-1 Adsense, Affiliate Programs And Articles Niches Directory
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 42 |