The Whole OS X Web Development System



Similar documents
Getting Started with Dynamic Web Sites

Install Apache on windows 8 Create your own server

Application note: Connecting the to a Database

CPE111 COMPUTER EXPLORATION

Install and configure Apache, MySQL, PHP on OSX 10.8 Mountain Lion

MAMP 3 User Guide! March 2014 (c) appsolute GmbH!

Lesson 7 - Website Administration

MySQL Quick Start Guide

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

Installing OptiRain Open on Macintosh OS X 10.6 (Snow Leopard)

What will be supplied with chemoventory package?

MassTransit 6.0 Enterprise Web Configuration for Macintosh OS 10.5 Server

CC ICT-SUD. Setting up and integrate Apache, MySQL and PHP on a Linux system

CSCI110 Exercise 4: Database - MySQL

MySQL Quick Start Guide

SVNManager Installation. Documentation. Department of Public Health Erasmus MC University Medical Center

Installation of PHP, MariaDB, and Apache

FileMaker 12. ODBC and JDBC Guide

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

Contents: 1. Preparation/download files 2. Apache HTTPD Web Server MySQL PHP PHPMyAdmin Ruby On Rails 1.8.

MySQL quick start guide

Installing Booked scheduler on CentOS 6.5

FileMaker 13. ODBC and JDBC Guide

Server Installation/Upgrade Guide

Short notes on webpage programming languages

SQL Injection. Blossom Hands-on exercises for computer forensics and security

Installing an open source version of MateCat

SIMIAN systems. Setting up a Sitellite development environment on Windows. Sitellite Content Management System

System Administration Training Guide. S100 Installation and Site Management

It is recommended that you use a clean installation of Lion client before upgrading to Lion Server.

Online shopping store

CEFNS Web Hosting a Guide for CS212

Migrating helpdesk to a new server

Setting Up a Dreamweaver Site Definition for OIT s Web Hosting Server

SIMIAN systems. Setting up a Sitellite development environment on Mac OS X. Sitellite Content Management System

FileMaker Server 11. FileMaker Server Help

Talking to Databases: SQL for Designers

Web Technologies Week 4 Hosting, Servers and Databases. Context. Contents. MSc in Computing Computing - IBITE Liverpool Hope University College

FileMaker 11. ODBC and JDBC Guide

Extending Remote Desktop for Large Installations. Distributed Package Installs

FileMaker Server 12. FileMaker Server Help

FileMaker 14. ODBC and JDBC Guide

VP-ASP Shopping Cart QUICK START GUIDE Version th Feb 2010 Rocksalt International Pty Ltd

FileMaker Server 13. Getting Started Guide

Snow Inventory. Installing and Evaluating

Magento Search Extension TECHNICAL DOCUMENTATION

FileMaker Server 12. Getting Started Guide

FileMaker Server 10 Help

OpenPro ERP Software Installation Guide Talbert Ave Suite 200 Fountain Valley, CA USA Phone Fax

Installing buzztouch Self Hosted

Customer Bank Account Management System Technical Specification Document

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Accessing External Databases from Mobile Applications

Web Development. How the Web Works 3/3/2015. Clients / Server

SETTING UP AND RUNNING A WEB SITE ON YOUR LENOVO STORAGE DEVICE WORKING WITH WEB SERVER TOOLS

E-Commerce: Designing And Creating An Online Store

OpenEyes - Windows Server Setup. OpenEyes - Windows Server Setup

FileMaker Server 15. Getting Started Guide

VP-ASP Shopping Cart Quick Start (Free Version) Guide Version 6.50 March

Version of this tutorial: 1.06a (this tutorial will going to evolve with versions of NWNX4)

FileMaker Server 13. FileMaker Server Help

LAMP : THE PROMINENT OPEN SOURCE WEB PLATFORM FOR QUERY EXECUTION AND RESOURCE OPTIMIZATION. R. Mohanty Mumbai, India

Building a Database-Driven Web Application With FileMaker

PassMark Software BurnInTest Management Console. Quick start guide

EZcast Installation guide

Mac OS X Snow Leopard: IBM Informix IDS PHP 5.3

Guide to the MySQL Workbench Migration Wizard: From Microsoft SQL Server to MySQL

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Installing Drupal on Your Local Computer

IBM DB2 for Linux, UNIX, and Windows. Deploying IBM DB2 Express-C with PHP on Ubuntu Linux

The SkySQL Administration Console

Writing Scripts with PHP s PEAR DB Module

Kollaborate Server Installation Guide!! 1. Kollaborate Server! Installation Guide!

Transferring Your Hosting Account

Content Management System

Benchmarking and monitoring tools

Modelling with R and MySQL. - Manual - Gesine Bökenkamp, Frauke Wiese, Clemens Wingenbach

JMC Next Generation Web-based Server Install and Setup

Pemrograman Web. 1. Pengenalan Web Server. M. Udin Harun Al Rasyid, S.Kom, Ph.D

Cloud Homework instructions for AWS default instance (Red Hat based)

Lucid Key Server v2 Installation Documentation.

McAfee Network Threat Response (NTR) 4.0

How To Install Amyshelf On Windows 2000 Or Later

Securing the OpenAdmin Tool for Informix web server with HTTPS

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

Building Website with Drupal 7

1. Installation Overview

Mac OS X Security Checklist:

CDH installation & Application Test Report

IBM FileNet eforms Designer

X-POS GUIDE. v3.4 INSTALLATION SmartOSC and X-POS

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

FileMaker Server 9. Custom Web Publishing with PHP

Getting Started with Attunity CloudBeam for Azure SQL Data Warehouse BYOL

Installing Drupal 8 on Windows 7 with XAMPP. I am trying to install Drupal 8 on my Windows machine as a development system.

Transcription:

The Whole OS X Web Development Title slide Building PHP/MySQL Web Databases for OS X Scot Hacker Webmaster, UC Berkeley s Graduate School of Journalism The Macworld Conference on Dreamweaver January 6-7, 2003

Dynamic publishing Making the jump from static HTML to dynamic / database-driven. Pages assembled on the fly Instantaneous changes site-wide Single template drives entire site No more propagation of errors Maintain state easily How can Amazon recommend other books you might like? Assembly required J-School jobs database

AMP An Ideal partnership Apache (web server) MySQL (database server) PHP (scripting language) ((glue)) Independent / Interdependent

Marketshare PHP competes with Allaire's ColdFusion, Microsoft's ASP, and various JSP (Java Server Page) technologies. Difficult to assess market size but Apache is the most popular web server and is seldom coupled w/asp. CF seems to be losing ground. ASP is being subsumed into.net. PHP rapidly growing on Apache and even on Windows web servers. Many low-cost providers springing up to support Web application development at low cost, almost always via PHP/MySQL. e.g. www.phpwebhosting.com Content created on a Mac can easily be moved to a commercial or 3 rd - partyamp host.

Unix power Before OS X, only FileMaker and a few other obscure solutions available. Mac users no longer take a back seat. Unix power is at your fingertips - use it! No need for commercial tools - all free, secure, and well-supported.

The AMP request process Straight HTML requests are returned directly to requesting agent. If request includes PHP commands, they re sent to Apache s PHP module for parsing. If PHP commands include database requests, those are passed to database server (which may or may not be on the same machine). Query results are passed back to PHP module for inclusion. PHP module can now return a file back to Apache, which hands it back to requesting agent.

Manual vs. Automatic Dreamweaver can take a lot of PHP-programming responsibility off your hands. As with HTML and JavaScript, auto-generated PHP may not be as clean as hand-generated, but it s sure easier. Dreamweaver still requires you to do the initial database setup yourself. It pays to learn some of the guts -- get some mud on your hands so you know how things work.

Fire Up Apache Installed but not enabled by default - turn on Web Sharing in prefs Test your site at http://localhost/ or http://localhost/~yourname/

PHP A server-interpreted language you never see PHP code when you view source. Runs as an Apache module interpreter embedded in Apache run-time for speed. Thousands of built-in functions, or create your own Use php.net as a reference Need to learn PHP basics before MySQL is useful to us

More PHP Quick example of dynamic things you can do without database - calc.php It s all about variables - moving them around, tracking them... Lots of database-specific functions built in.

Enable PHP 1,000 Apache tweaks and configs you can do, but only one we have to do: Edit /etc/httpd/httpd.conf (hidden from Tracker) and uncomment (remove the #) from the beginning of two PHP lines #LoadModule php4_module libexec/httpd/libphp4.so #AddModulemod_php4.c Add one line to the file after the line addtype application x-tar.tgz addtype application/x-httpd-php.php Restart Apache Test with phpinfo();

MySQL What is a relational database server? Hosts data sets and responds to queries from other apps. Relational:

What is SQL? Structured Query Language Cross-database industry standard way to communicate with databases select * from contacts select ID, name from contacts where state=ca delete from contacts where ID > 497 update contacts set lname= Hacker where ID=312

Installing MySQL www.entropy.ch - Mark Liyanage Run vanilla installer Initialize database cd /usr/local/mysql sudo ls sudo./scripts/mysql_install_db Run it sudo chown -R /usr/local/mysql/* sudo./bin/safe_mysqld --user=mysql & Install mysqlstartupitem.pkg from entropy.ch

MySQL Security Set the root user password:./bin/mysqladmin/ -u root password mypass

Test It./bin/mysql -u root -p > show databases; test mysql Enough brain surgery!

phpmyadmin Done with the command line All-purpose, free, open source database administration tool: www.phpmyadmin.net Not a replacement for custom apps Can do anything you can do from the mysql console Remote control

Install phpmyadmin Download from www.phpmyadmin.net in tar.gz format Decompress on desktop, rename folder Move phpmyadmin folder into ~/Sites Very important: Password-protect! Open config.inc.php and set auth_type to http, enter root user and root password.

Database creation and admin

Create a database and tables From Home, enter a name for db Create new table on database foobar w/5 fields Set first column to int, auto_increment, primary. This is your ID field, your key. Set other columns to appropriate data types - varchar 16 In your 2nd table, you ll have a lookup column that will ref values in this table s ID column.

Set permissions Not root perms, but perms script will connect as Click Home, Users host=localhost user=public (or similar), pass=youchoose privs=select, update, insert, delete Reload MySQL server! Return and set grants for this user for this database

Connect to database from PHP Create a dbconnect() function in a central locale. Invoke from every script with: include /include/connect.php"; dbconnect(); Try by itself - page should not error. Dreamweaver can handle this process for you.

Moving Your Database View dump schema Select All, structure and data, save as File. Save with.sql extension On remote host, use phpmyadmin to create database with same name Enter database, Browse to.sql file, click Go. The important bit is to pay attention to permissions in scripts and in MySQL

More Information Definitive book: Rasmus Lerdorf s Programming PHP (O Reilly) Dreamweaver MX: PHP Web Development (Glasshaus) www.php.net for function descriptions www.phpbuilder.com - great forums www.hotscripts.com - giant script library www.mysql.com - Very detailed documentation Once set up, you probably need more info on learning SQL than on MySQL itself. Google sql tutorial - there are lots.