+ All Categories
Home > Documents > Intro to APACHE, MySQL, and PHP & freely available ( hackable ) Packages

Intro to APACHE, MySQL, and PHP & freely available ( hackable ) Packages

Date post: 03-Jan-2016
Category:
Upload: melvin-schmidt
View: 72 times
Download: 2 times
Share this document with a friend
Description:
Intro to APACHE, MySQL, and PHP & freely available ( hackable ) Packages. Aonghus Sugrue 04 Oct 2012. Apache, PHP, and MySql. WHAT? Apache as a web server Php as a server side scripting language MySql as a database - PowerPoint PPT Presentation
Popular Tags:
34
Intro to APACHE, MySQL, and PHP & freely available (hackable) Packages Aonghus Sugrue 04 Oct 2012
Transcript
Page 1: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Intro to APACHE, MySQL, and PHP & freely available (hackable) Packages

Aonghus Sugrue04 Oct 2012

Page 2: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Apache, PHP, and MySqlWHAT?1.Apache as a web server2.Php as a server side scripting language3.MySql as a database

•You will use HTML, CSS, Javascript, Jquery etc with the bundle above

WHY?•Open Source – free!!!•Good as proprietary – even Facebook use it!•Lightweight•Many freely available bundles built using it – Wiki, Wordpress, Drupal, Joomla, OpenCart

Page 3: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

• You can install all 3 of these separately and then configure them to work together: DONT!

• Packages freely available for download that allow for one quick installation:– XAMPP (

http://www.apachefriends.org/en/xampp.html) choose the installer and not the zipped files!

– WAMP

Page 4: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 5: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 6: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 7: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 8: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 9: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 10: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Type http://localhost into your web browser. Please note this page will not

display if the APACHE server is not started as per the previous slide!!

Page 11: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

• When your apache server is running it is looking at the htdocs folder within the XAMPP folder installed on your computer. Most likely location: C:/Xampp/htdocs

• For WAMP it will be the wwwroot folder

• In english, what this means is the server lloks at this folder for your webpages.

• This is where you put your .php, html, css, javascript files

Page 12: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 13: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

• Add some php code and save

• Go to w3schools.com to learn php and mysql.

Page 14: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Setting up Development Environment

Page 15: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Working with MySql in XAMPP

• Go to browser and type http://localhost

• At the xampp homepage click on phpmyadmin

• This is a GUI system that you can use to work with the MySQL database engine

• Note: default user is “root” and password is not set, i.e. “”

Page 16: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

PhpmyAdmin

Page 17: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

PhpmyAdmin

• Easy to figure out• Create some databases and tables• Mess around with it

Page 18: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Integrating php and mysql

• W3schools is a good resource to learn php and mysql

• Learn them separately on their own first before integrating them.

• W3schools has tutorials that show how to integrate them.

• A great book is “Sams Teach Yourself PHP, MySQL and Apache All in One”

Page 19: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

• You can learn all the technical stuff to do with php and mysql on your own time.

• Now we’ll look at taking an existing package and using it on your XAMPP or other development setup

Page 20: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Content Mgt Systems (CMS)

• Many developed already and freely available• Examples: Joomla, Wordpress, Drupal, etc

• To run these you either need a hosting package online or a development environment (e.g. XAMPP or WAMP)

• Also the CMS above are all built using PHP and MySql and as such you need development environment or hosting that can handle these these

Page 21: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress

• Go to wordpress.org (NOT .com)• Download the source files

Page 22: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress

• Extract the files into a folder in your server folder (i.e. htdocs if using XAMPP)

Page 23: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress

• Rename the folder to something appropriate: your new site, blog, etc

• Go to your browser and type in http://locahost/[whatever_name_you_gave_the_wordpress_folder]

Page 24: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress• Screen will say there is no configuration file.

For some other packages you may need to alter that separately.

Page 25: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress

Page 26: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress• Go back to your database and create a blank database• Go back to the browser and insert the database name,

username (will be “root” unless you changed it), and password leave blank, and leave the host as “localhost”

• Click next and your done. Your wordpress install should be complete and its up to you what you do next!!

• It is very flexible and hackable – learn php and mysql and then you will be able to customise as you wish!!

Page 27: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress

Page 28: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

CMS – Example Wordpress• Next page will give you option

to login• From then on, if you want to

login to the backend you go to the directory where you extracted the wordpress files: note above that I extracted the wordpress files to the folder mynewwebsite in the htdocs folder. As such, you can access the login at http://localhost/mynewwebsite/wp-login.php

Page 29: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Wordpress – After Login

Page 30: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Wordpress – What the site looks like• Go to http://localhost/mynewwebsite

Page 31: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Up to you how to customise it• You can either choose from the many 100s

(maybe 1000s) of design themes.• You can build your own theme; e.g.

skelligslandscaping.ie is built using wordpress and I created a custom wordpress theme. Good tutorial, a little old at this stage, is http://webdesignerwall.com/tutorials/building-custom-wordpress-theme

• Codex at wordpress.org has plenty information on wordpress files

Page 32: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

3 examples of Wordpress Use• aonghussugrue.wordpress.com – uses wordpress.com

to create website. This options means “.wordpress” will be included in domain name. Good for familiarising yourself with wordpress

• Skelligslandscaping.ie – Completely built using wordpress (i.e. all content managed by logging into wordpress backend)

• Linx.ie – Footer section of every page and blog page are wordpress driven; the rest of the website is managed through standard .php and html files outside of wordpress (note: this site is not fully live yet: temporary location = http://preview1.reg365.net/linx.ie

Page 33: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Up to you how to customise it• Plugins allow you to add whatever features

you need from shopping carts to calendars to social media widgets.

• If a plugin does not exist for your specific need, then you can always build it yourself:-– Could be good commercial opportunity if you

build a good plugin– Some plugin developments are worthy of project

in and of themselves

Page 34: Intro to APACHE, MySQL, and  PHP  & freely available ( hackable ) Packages

Other Examples

• Similar process for most other packages:– Mediawiki for a wiki– Drupal and Joomla for different CMS– OpenCart for full e-commerce site


Recommended