WEB ENGINEERING

Archive for the ‘PHP’ Category

NOTE:

This tutorial is just to show how cross platform integrations are done. I would strongly advice you to use web servers like Apache for PHP.




STEP 1: Installing Web Platform Installer

Microsoft Web Platform Installer 2.0

The Microsoft Web Platform Installer 2.0 (Web PI) is a free tool that makes getting the latest components of the Microsoft Web Platform, including Internet Information Services (IIS), SQL Server Express, .NET Framework and Visual Web Developer easy. The Web PI also makes it easy to install and run the most popular free web applications for blogging, content management and more with the built-in Windows Web Application Gallery.

Features

  1. The Web PI is a free download.
  2. Weighing in at under 2 megabytes, the Web PI is the fastest way to get the components that make up the Microsoft Web Platform.
  3. Installing Web Apps or updating the Microsoft Web Platform, Web PI’s improved validation support ensures everything just works.
  4. Whether you’re updating or installing components, Web PI always includes the latest version of the Microsoft Web Platform.
  5. Available in 9 different languages. Choose your language and if a component is available in that language, Web PI will ensure you get it.
  6. Popular, free and ready to install Web Apps including Umbraco, WordPress, Acquia Drupal, SugarCRM, and more!

STEP 2: Installing WebMatrix

What Is WebMatrix?

WebMatrix is free, seamless, small which includes a complete Web development stack that installs in minutes and elegantly integrates a Web server, database and programming frameworks into a single, integrated experience

Features

  1. WebMatrix is a free Web development tool that installs in minutes and elegantly brings together a Web server, a database, and programming frameworks into a single, integrated experience. WebMatrix lets you code, test, and deploy both ASP.NET and PHP applications side by side.
  2. WebMatrix integrates Visual Studio into your workflow. Connect to Visual Studio to take advantage of powerful features such as debugging and profiling. And when you’re ready for a high-volume relational database server, move your database and data from SQL Server Compact to SQL Server with just a click of the mouse.
  3. WebMatrix includes a small, embedded database called SQL Server Compact that can live with your Web site code and content. Use it to start building your next Web site, and when you’re ready to publish, just copy the database file from your computer to any Web server and it will run— no extra installation required. Or you can easily migrate the database and data to SQL Server when you’re ready for high-volume traffic.
  4. WebMatrix integrates a rich code editor, a database editor, Web server management, Search Engine Optimization, FTP publishing.
  5. Start with HTML, CSS and JavaScript and then seamlessly connect to a database or add in dynamic server code using the new ‘Razor’ syntax for ASP.NET Web pages. Your code is easy to read, simple to learn, short to write and works with any text editor. Use built-in helper functions to connect to a database, display a Twitter feed, or embed a video. And with a seamless path to ASP.NET MVC it is now easier than ever to create powerful ASP.NET Web applications.
  6. Code helpers make common tasks (i.e. tweets or displaying video)easy to do with just a simple tag in your HTML.
  7. WebMatrix uses the same Web server, database engine, and frameworks environment that will run your Web site on the Internet, which makes the transition from development to product seamless.
  8. WebMatrix integrates with IIS Developer Express and is tightly linked with the Web server components that run your site. Directly monitor real-time Web requests and responses to track down problems right at the source. Missing an image? You’ll instantly see why and where, and WebMatrix will take you directly to the file to fix the problem.
  9. Run an SEO report and find how to make your site more visible to search engines. WebMatrix takes the secrets out of search engine optimization, provides clear guidance on how to make your site better, and even offers to take you right to the file in your site you need to fix.

10.  WebMatrix can be used to find a Web host that fits your requirements and use the built-in publishing support for FTP, FTPS, and WebDeploy to ensure that your files, databases, and settings arrive intact on the web.

WebMatrix is free, seamless, small which includes a complete Web development stack that installs in minutes and elegantly integrates a Web server, database and programming frameworks into a single, integrated experience.

Document No. D-IIS-3

STEP 1: Install XAMMP including PHP and MySQL Database.

  1. Install XAMMP following from link: http://www.apachefriends.org/en/xampp-windows.html
  2. Run the xammp setup .exe file.
  3. On Microsoft Vista, the User Access Control feature blocks the PHP installer from updating the Apache httpd configuration. Disable UAC while you are installing XAMPP.
  4. You are given the option to install the Apache server and the MySQL database server as services. If you install the Apache Server and MySQL as services, you will not have to start them manually through the XAMP Control Panel.
  5. If you are using the self-extracting archive, after the archive is extracted, run the file setup-xampp.bat to configure the components of the package. (The XAMPP installer runs this file automatically.)
  6. After configuration, open the XAMP Control Panel. (You can open it manually by running the file XAMPP_HOME/xampp-control.exe or from the Xampp Control Panel icon that is automatically placed on your desktop.) When you open the XAMPP Control Panel, note that the modules that are installed as services are already running.

Warning: On Windows Vista sometimes xampp-control.exe will not run. You can run xampp-start.exe instead.

  1. The Svc checkboxes indicate that a module is installed as a Windows service and will start automatically on system startup. You can install or uninstall Windows services by selecting or unselecting the Svc checkbox. Uninstalling a Windows service does not uninstall the module, but it does require you to start the module manually. The XAMPP control panel includes buttons for stopping and starting modules and opening their administration consoles

STEP 2:  Install NetBeans 6.9.1 IDE for PHP

Download and Install NetBeans IDE for PHP from following link: http://netbeans.org/downloads/index.html

STEP 3: Setting up Your first PHP Project in the NetBeans IDE for PHP

  1. Start the IDE, switch to the Projects window, and choose File > New Project. The Choose Project panel opens.
  2. In the Categories list, choose PHP.
  3. In the Projects area, choose PHP Application and click Next. The New PHP Project > Name and Location panel opens..
  4. In the Project Name text field, enter hello-world.
  5. In the Sources Folder field, browse for your PHP document root and create a subfolder there called hello-world. The document root is the folder where the web server looks for files to open in the browser. The document root is xampp/htdocs.
  6. Leave all other fields with their default values. Click Next.
  7. In the Run As drop-down list, select Local Web Site. The project will run on your local Apache server.
  8. Click Finish.

Practical: Creating a CRUD Application with NetBeans IDE PHP Editor

Aim: To create and run a simple web application called wish list.

Designing the Structure of the Sample Database

To arrange and store all the necessary data you need two tables:

  • A wishers table for storing names and passwords of registered users
  • A wishes table for storing descriptions of wishes


The wishers table contains three fields:

  1. id – the unique ID of a wisher. This field is used as the Primary Key
  2. name
  3. password

The wishes table contains four fields:

  1. id – the unique ID of a wish. The field is used as the Primary Key
  2. wisher_id – the ID of the wisher to whom the wish belongs. The field is used as the Foreign Key.
  3. description
  4. due_date – the date by when the wish is requested

The tables are related through the wisher’s ID. All the fields are mandatory except due_date in wishes.

Requirement Definition

The scope of your application covers the following use cases:

  1. The user views the wish list of a person.
  2. The user registers as a new wisher.
  3. The user logs in and creates her/his wish list.
  4. The user logs in and edits his/her wish list.

To cover this basic functionality, you will need to implement the following pages:

  1. The “front” page index.php for logging in, registering, and switching to wish lists of other users.
  2. The wishlist.php page for viewing the wish list of a particular wisher.
  3. The createNewWisher.php for registering as a wisher.
  4. The editWishList.php page for editing a wish list by its owner.
  5. The editWish.php page for creating and editing wishes.

Solution:

Initially I thought of making video tutorial for this scenario, but the resource website from which this tutorial has been studied is awsome with respect to explanation and step by step approach. Hence, instead of developing a clone tutorial, i request you to go to following link.

CLICK HERE TO GO TO TUTORIAL PAGE

Note: Before using tutorial just go through my video for creating and managing users of MySQL database including root user, which is you should check out to save time in understanding settings and previleges for MySQL database users.


CLICK HERE TO GO TO TUTORIAL PAGE


Current Scenario:

IIS Admin is stopped, which was running on port 80 by default, because we want Apache Server to run on port 80

But the condition is that we want both IIS Server and Apache Server running simultaneously.

Obviously both server cannot work on same port 80

Therefore we will run IIS Server on port 80 by default an run Apache Server on port 8080

Read about TCP / IP Ports here

Rest of the process is explained in detail in following video tutorial.

Once Installed go to www.w3schools.com and practice ASP and PHP scripts  out there.


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 50 other followers

What I am Upto Now

Follow Me On Twitter

Blog Stats

  • 69,006 hits

Live Traffic

My Paintings

Guess Who is She

Magnet

Party Goer

Holi

Propose

More Photos
%d bloggers like this: