Vous êtes sur la page 1sur 5

How to install Apache, PHP and MySQl 1. Download MySql from the link - http://dev.mysql.com/downloads/installer/5.6.html a.

. The download file would be something like this Windows (x86, 32-bit), MSI Installer b. You the copy the download msi file to c:\ drive and run the exe file 2. Be sure that you have installed Visual C++ Redistributable for Visual Studio 2012 a. Use the link -http://www.microsoft.com/en-us/download/details.aspx?id=30679 b. Download the - VSU_4\vcredist_x86.exe file c. Run the exe file and install 3. Installing Apache 2.4 (Windows 7) - http://www.youtube.com/watch?v=17qhikHv5hY a. Go To - www.apachelounge.com>Download>Apache 2.4.7 Win32>httpd-2.4.7win32-VC11.zip b. Save it to C:\drive and extract it c. Go to start menu type cmd d. Now right click on cmd and open as administrator e. Now you find something like c:\Windows\system32 and now you need to type >cd\apache24. It would look like - c:\Windows\system32>cd\apache24. f. Now something like c:\Apache24 will appear in the next line. Now type >cd bin. It would look like - c:\Apache24>cd bin g. Now something like c:\Apache24\bin will appear in the next line. Now type httpd k install and enter h. Now it will install the apache to your system i. To uninstall at a later point you can type the command - c:\Apache24\bin> httpd k uninstall j. Go to windows explorer and type in Apache24. Click on the folder and go to bin sub folder. You would now find an exe file by name ApacheMonitor. Go ahead and double on that and you find the small icon on the task bar. k. Now right click on the icon and choose ApacheMonitor and click on start button 4. You may also like to download the text editor using the link http://gedit.software.informer.com/download/ 5. Now download phpmyadmin using the link http://www.phpmyadmin.net/home_page/index.php 6. Download PHP on my Laptop using the link - http://windows.php.net/download/ a. You can download the stable version with Thread Safe. It would be something like this VC11 x86 Thread Safe (2014-Jan-09 18:16:03) b. You the copy the download zip file to c:\ drive and extract the file. c. Use the link - http://www.youtube.com/watch?v=3TH6BnjuNG0 d. Added to end of Load Module e. LoadModule php5_module "c:/php/php5apache2_4.dll" f. AddHandler application/x-httpd-php .php g. Changed - DirectoryIndex index.html to DirectoryIndex index.php index.html h. Added at the bottom PHPIniDir c:/php i. Uncomma j. extension=php_curl.dll

k. l. m. n. o. p.

extension=php_fileinfo.dll extension=php_gd2.dll extension=php_mysql.dll extension=php_mysqli.dll extension=php_pdo_mysql.dll extension=php_pdo_sqlite.dll

q. Uncomma & Insert time zone in - date.timezone = Asia/Kolkata r. <?php phpinfo(); ?>

C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\Sy stem32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared
C:\Program Files (x86)\Common Files folder;C\webserver\php

Use another useful youtube links like http://www.youtube.com/watch?v=FJC2iGt_2bc http://www.youtube.com/watch?v=6Y6lOHov3Bk

Use the link - http://www.developphp.com/ for learning PHP Download Wampserver HTML Simple Learning Video - http://www.youtube.com/watch?v=bWPMSSsVdPk

Code for creating a Form

<h2>Submit Your CV</h2> <script type="text/javascript"> function ValidateForm(frm) { if (frm.First_Name.value == "") {alert('First name is required.');frm.First_Name.focus();return false;} if (frm.Last_Name.value == "") {alert('Last name is required.');frm.Last_Name.focus();return false;} if (frm.Email_Address.value == "") {alert('Email address is required.');frm.Email_Address.focus();return false;} if (frm.Email_Address.value.indexOf("@") < 1 || frm.Email_Address.value.indexO f(".") < 1) {alert('Please enter a valid email address.');frm.Email_Address.focus();return false;} if (frm.Position.value == "") {alert('Position is required.');frm.Position.focus();return false;} if (frm.Phone.value == "") {alert('Phone is required.');frm.Phone.focus();return false;} if (frm.CaptchaCode.value == "") {alert('Enter security code.');frm.CaptchaCode.focus();return false;} return true; } function ReloadCaptchaImage(captchaImageId) { var obj = document.getElementById(captchaImageId); var src = obj.src; var date = new Date(); var pos = src.indexOf('&rad='); if (pos >= 0) { src = src.substr(0, pos); } obj.src = src + '&rad=' + date.getTime(); return false; } </script> <hr /> <form id="ExampleForm" action="http://www.SnapHost.com/captcha/WebFormSubmi t.aspx" onsubmit="return ValidateForm(this);" method="post"> <input id="SnapHostID" name="SnapHostID" type="hidden" value="9ZRCBF2AFH8Q" /> <table border="0" cellpadding="5" cellspacing="0"> <tr> <td style="width:50%"> <b>First name *</b><br /> <input name="First_Name" type="text" maxlength="50" style="width:260px" /> </td> <td style="width:50%"> <b>Last name *</b><br /> <input name="Last_Name" type="text" maxlength="50" style="width:260px" /> </td> </tr> <tr> <td colspan="2">

<b>Email *</b><br /> <input name="Email_Address" type="text" maxlength="100" style="width:535px" /> </td> </tr> <tr> <td colspan="2"> <b>Portfolio website</b><br /> <input name="Portfolio" type="text" maxlength="255" value="http://" style=" width:535px" /> </td> </tr> <tr> <td colspan="2"> <b>Position you are applying for *</b><br /> <input name="Position" type="text" maxlength="100" style="width:535px" /> </td> </tr> <tr> <td style="width:50%"> <b>Salary requirements</b><br /> <input name="Salary" type="text" maxlength="50" style="width:260px" /> </td> <td style="width:50%"> <b>When can you start?</b><br /> <input name="StartDate" type="text" maxlength="50" style="width:260px" /> </td> </tr> <tr> <td style="width:50%"> <b>Phone *</b><br /> <input name="Phone" type="text" maxlength="50" style="width:260px" /> </td> <td style="width:50%"> <b>Fax</b><br /> <input name="Fax" type="text" maxlength="50" style="width:260px" /> </td> </tr> <tr> <td colspan="2"> <b>Are you willing to relocate?</b><br /> <input name="Relocate" type="radio" value="Yes" checked="checked" /> Yes &n bsp; &nbsp; &nbsp; <input name="Relocate" type="radio" value="No" /> No &nbsp; &nbsp; &nbsp; <input name="Relocate" type="radio" value="NotSure" /> Not sure </td> </tr> <tr> <td colspan="2"> <b>Last company you worked for</b><br /> <input name="Organization" type="text" maxlength="100" style="width:535px" /> </td>

</tr> <tr> <td colspan="2"> <b>Reference / Comments / Questions</b><br /> <textarea name="Reference" rows="7" cols="40" style="width:535px"></textare a> </td> </tr> </table> <br /> <div style="text-align:center;"> <table border="0" cellpadding="0" cellspacing="0" style="text-align:center; width:300px; margin:auto;"> <tr> <td><i>Enter security code</i></td> <td>SECURITY CODE</td> </tr> <tr> <td> <input name="CaptchaCode" type="text" maxlength="6" style="width:130px; height:28px; font-size:24px; text-align:center;" /> </td> <td> <a href="http://www.SnapHost.com"><img id="CaptchaImage" style="border:1px solid #999999; vertical-align:bottom;" alt="Web Form Security Code" title="Anti-spam web forms" src="http://www.SnapHost.com/captcha/WebForm.aspx?id=9ZRCBF2AFH8Q&ImgType=2 " /></a> <br /><a href="#" onclick="return ReloadCaptchaImage('CaptchaImage');"><span style="font-size:12px;">reload image</span></a> </td> </tr> </table> <br /><br /> <input name="Submit" type="submit" value="Send Application" /> </div> </form>