It is that time of the year when I want to restart my programming skills and get my hands dirty learning new skills
Agenda: Develop web applications using PHP and deploy it on my justin-joseph.com server
Following are the steps,
Download and installation
- Download XAMPP from https://www.apachefriends.org/download.html and chose ‘7.1.1 / PHP 7.1.1’. Install it to the ‘C:\xampp’ folder
- Download Eclipse Neon 64 bit version from http://www.eclipse.org/pdt/#download
Coding in eclipse
- Unzip the eclipse downloaded file and open ‘eclipse.exe’
- Go to Windows > Preferences >PHP > PHP Executables and make sure PHP executable details are visible there. If not, add using the ‘Add‘ button
- Create a new project. I created it under’E:\Projects\Misc\workspace\Homepage’
- Added a new file ‘index.php’ into the project and added the following lines
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo ‘<p>Hello World 2017</p>’; ?>
</body>
</html>
Running the program
- Open XAMPP and start Apache and MySQL. In case of any errors resolve them ( NOTE: Mostly the error is due to conflicting port. If that’s the case, check out windows event log and stop the offending service )
- Change DocumentRoot to “E:\Projects\Misc\workspace\Homepage”
- Now open eclipse and go to Windows > Preferences >PHP > Servers and click on ‘Browse‘. Select ‘E:\Projects\Misc\workspace ( DO NOT APPEND WITH HOMEPAGE !!!!)
Right click on ‘Index.php’ and select ‘Run as > PHP Web application‘

