Lecture 3: Web Servers / PHP and Apache. CS 383 Web Development II Monday, January 29, 2018

Size: px
Start display at page:

Download "Lecture 3: Web Servers / PHP and Apache. CS 383 Web Development II Monday, January 29, 2018"

Transcription

1 Lecture 3: Web Servers / PHP and Apache CS 383 Web Development II Monday, January 29, 2018

2 Server Configuration One of the most common configurations of servers meant for web development is called a LAMP server o Linux o Apache o MySQL o PHP Some servers explicitly have a LAMP option Others do not, but have all of the components in their repositories 1

3 Linux We are familiar with Linux through the other courses and labs The key to the Linux component is our file ownership/permissions that we ve learned 2

4 Apache We ll come back to this in a second 3

5 MySQL MySQL runs as a process in the background that we connect to We can either connect from the command line with the mysql command, or use libraries to connect from programming languages with out account logins 4

6 PHP PHP scripts are stored in regular files on a filesystem Thus, any user on the system who wants to run the PHP script must be able to read the file on the system 5

7 Back to Apache Apache runs as a process on the server All processes on a system must be run as somebody o Run ps aux on dilbert these are the processes running, with the user who is running the process listed in the first column We need somebody who can run the Apache web server, and also access our files 6

8 Apache By default, root is the only user who can access anybody s files But this is a horrible idea people connecting to webpages are theoretically executing code as the admin of the system Solution: We need to use another user, and set the permissions on the file so that new user can create it 7

9 Apache If we run ps aux grep apache on dilbert, we will see the running processes for the web server On our system (Ubuntu), they are run by www-data, as configured automatically by aptitude, the package manager Thus, we need to configure out scripts to be able to be read by www-data 8

10 Apache If you manually set up Apache on a server, the admin must create a new user (named whatever they want) and configure this server to do so If you use repositories supplied by the Linux distribution (yum for Fedora), they generally choose the name in their configuration scripts that come through the repository Also note, on some systems, that the web server is simply known as httpd, rather than apache 9

11 File Permissions File permissions are critical when making a web application available to a web server File permissions are usually stored as octals Octals can represent 8 different values, using numbers 0 through 7 10

12 File Permissions There are three different digits in the octal form of a file permission o The first digit is for the user that owns the file o The second digit is for the group that owns the file o The third digit is for all users on the system 11

13 File Permissions To assign permissions to one of these three, you add up the permissions o 4 means read permission o 2 means write permission o 1 means execute permission If we want the group owner of the file to have read and execute access, the value of that digit would be 5 (4 for read + 1 for execute) 12

14 File Permissions Because these use binary numbers, two different combinations of permissions cannot equal the same value We will see this later in the course when we talk about configuration options for PHP 13

15 File Permissions To assign an octal file permission to a file, we use the chmod command (short for change mode): chmod octal filename Example: Suppose we had the file foo.php and wanted to assign the permissions 755: chmod 755 foo.php If you had a directory with subdirectories and files, you can use the R option to apply the permission to all of them: chmod R 755 foo/ 14

16 File Permissions So, suppose we want the owner of the file index.php to be able to read, write, and execute the file; the group owner of the file to be able to read and execute the file; all other users to be able to execute the file o First digit: 4 (read) + 2 (write) + 1 (execute) = 7 o Second digit: 4 (read) + 1 (execute) = 5 o Third digit: 1 (execute) = 1 o Octal permission: 751 o Command: chmod 751 index.php 15

17 File Permissions Thus, for our scripts to be able to be run as www-data, we need to set the permissions of our files to 644, and our directories to 755 o group and other are set to 4, which is read o owner is set to 6, which is read + write (obviously, we need to be able to add code to our file, so we must be able to write to it) o Directories need execute access 16

18 But We ve created another problem by solving this one Now, the www-data user can access our files and so can every other user on our system o This exposes your source code, passwords, etc. o This means if you have a script that uploads or generates any files, the files are owned by the www-data user, not you and thus, you can t access them 17

19 AssignUserID AssignUserID allows you to run PHP as another user on a system Thus, we will run our own apache processes as ourselves This will allow us to set permissions on the scripts so that only we have access to them 18

20 AssignUserID Your web directories have been setup to use AssignUserID if accessed at an alternate URL called a virtual host o will run the files as www-data o will run the files as you We will talk about the configuration of virtual hosts later this semester 19

21 AssignUserID To ensure everything is working as expected: o Make a directory inside your webdocs called cs383 (where all of your work this semester will be stored) o Give this directory the permission 700 o Create a file inside your cs383 directory called hello.php that contains the patented Hello World program to ensure everything is working o Give this file the permission 600 o Visit this at to ensure that it does works o Visit to ensure that it does not work 20

22 Warning #1 If you put files in your webdocs directory and make them publicly readable so that www-data (and anybody else) can read them, this means anybody can go on dilbert and read your source code If somebody else in the class goes into your webdocs and copies your code because you made a file publically readable, you will be considered to be as equally responsible for cheating as they are and will face the same consequences All files should be readable only by you and executed through AssignUserID 21

23 phpinfo() phpinfo() is a function that takes no arguments that does just what it s name implies dumps out information about PHP It can be used on the command line or in a web script Information includes: o Version numbers o Modules installed o Configuration settings o Environment/server variables Create a file called info.php that contains the following: <?php phpinfo();?> 22

24 PHP Configuration The settings for PHP on a web server are stored in a file called php.ini There is a separate file for each version of PHP o /etc/php5/cli/php.ini for scripts run on the command line o /etc/php5/apache2/php.ini for scripts run through the web server You can change the PHP configuration by: o Edit the php.ini file (if you have admin access) o Create your own php.ini file and set your virtual host to use it (if you have admin access) o Use the ini_set() function to override a settings o Settings in an.htaccess file o Use a function for a specific option to override it s setting 23

25 Warning #2 If you Google issues you are having with code, it may direct you to change values that come from php.ini DO NOT CHANGE ANY OF THESE VALUES IN YOUR ASSIGNMENTS UNLESS YOU ARE DIRECTED TO DO SO Often, people post solutions without fully understanding the scope of their suggestions, Some PHP settings can change crucial security settings that may open up holes that were previously closed Example: Register Globals (now removed from PHP) 24

26 Warning #2 Often, php.ini is configured for this class to ensure no shortcuts are taken All assignments I give can be completed using the php.ini settings that are listed on dilbert If it cannot, I will supply you with the necessary changes to the php.ini settings 25

27 PHP through Apache Last week, we talked about building command line scripts This week, we will transition to building scripts that will run through the web server, Apache, that will be viewable in a browser 26

28 Differences in Input As mentioned last week, the biggest difference between the two interfaces for programming is how we receive input and provide output While different, providing input will (mostly) be different due to the fact that we need to wrap everything in HTML code to properly display it in a browser window For input, think about our command line applications and how we received input 27

29 Differences in Input Command Line Input Method Command line arguments ($argv) Standard input (STDIN) Equivalent in Web Browser Query strings ($_GET) Forms ($_POST) 28

30 Note about Forms with $_GET and $_POST Note that we can send forms over $_GET instead of $_POST However, it is not ideal because all data in $_GET is sent through the URL: o Generally has a limit of about 2048 characters in a URL, limiting how much data can be sent over a form o Sensitive data (such as a password) would be captured in the URL, and thus, appear in the user s browser history 29

31 $_GET and Query Strings The syntax of a URL is: The query string consists of data, in the form variable=value Multiple piece of data can be strung together with & 30

32 $_GET and Query Strings Suppose you had the URL: 8&theme=2 Our variables are newsid (18) and theme (2) If we were to add print_r($_get); the output would be: Array( [newsid] => 18 [theme] => 2 ) We can access these with $_GET["newsid"] and $_GET["theme"] 31

33 Register Globals You may see a solution on the Internet to a problem that suggests you turn on register globals in the INI settings of PHP Register globals means, if you had the URL then you could access the variable in the query string directly with $userid rather than $_GET["userid"] DON T TURN IT ON 32

34 Register Global This creates a HUGE security risk Suppose your script had a variable that had $userid in it, which kept track of who was logged in Somebody could add?userid=3 to the end of a URL, and if your script is not explicitly checking for somebody to add their own query strings, it could allow them to take over the account of whoever had the userid 3 33

35 Validating Input Because PHP is flexible in that the explicit variable definitions are neither necessary nor allowed, this makes checking input somewhat complicated Suppose we had the URL (some value for x) We want to make sure the value supplied for x in the query string is an integer How do we do this? 34

36 Validating Input First, note that, even if this value came from a form or a link we put on the page, we cannot assume that the input is valid Why not? Even if we use Javascript on a form to validate input is good, somebody can create their own form that submits to submit.php anyway, surpassing the Javascript validation 35

37 Validating Input First, we need to verify that a value for x was actually supplied in the query string We can do this with the function isset($var), which verifies that the variable provided was initialized somewhere Example: isset($_get["x"]) 36

38 Validating Input Now, we need to verify that the integer is a value If you look in the PHP documentation, you can see that it looks like we have a few functions that can do this... But we actually don t These functions will not do what we really want them to 37

39 Validating Input One function you will find is is_int($var) However, this checks if the type, as it is stored, is an int, not if the actual value is an int Note that we don t call the part of the URL we are extracting these variables from a query integer, but it is in fact a query string Examples: o is_int(4) => true o is_int("4") => false Since the latter is how the variable would appear from a query string, this function will not work 38

40 Validating Input Next, you may come across the function intval($var) This converts strings into integers However, it essentially takes a string and strips out all numeric characters Examples: o intval("4") => 4 o Intval("4.6") => 46 Since the latter would just simply take a floating point and remove the decimal to completely change our input, this function will not work 39

41 Validating Input We have the function, is_numeric($var), which will tell us if something is a numeric value Examples: o is_numeric(4) => true o is_numeric("4") => true o is_numeric("4.6") => true This gets us almost there, but it will still return true for floating points 40

42 Validating Input Workaround: Cast the variable as an integer, and compare it to the original if they re equal, it must be an integer: is_numeric($var) && $var == (int)$var So, putting this all together, to verify that a variable x is provided in a query string, and it is an integer, our code would be: if(isset($_get["x"]) && is_numeric($_get["x"]) && $_GET["x"] == (int)$_get["x"]) { // is an int } else { // is not an int } 41

43 Why does this work? Validating Input Unlike other languages, the following WILL evaluate to true: 0.2 == "0.2" Although the previous functions would have found a distinction between 0.2 and "0.2" PHP otherwise does not 42

Lecture 4. Wednesday, January 27, 2016

Lecture 4. Wednesday, January 27, 2016 Lecture 4 Wednesday, January 27, 2016 PHP through Apache Last week, we talked about building command line scripts This week, we will transition to building scripts that will run through the web server,

More information

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018 Lecture 6: More Arrays & HTML Forms CS 383 Web Development II Monday, February 12, 2018 Lambdas You may have encountered a lambda (sometimes called anonymous functions) in other programming languages The

More information

Lecture 18: Server Configuration & Miscellanea. Monday, April 23, 2018

Lecture 18: Server Configuration & Miscellanea. Monday, April 23, 2018 Lecture 18: Server Configuration & Miscellanea Monday, April 23, 2018 Apache Earlier in the course, we talked about the configuration of everything except Apache There are some components of configuring

More information

Lecture 5. Monday, February 1, 2016

Lecture 5. Monday, February 1, 2016 Lecture 5 Monday, February 1, 2016 === and!== In an example last week, we talked about how PHP does not check type when doing comparisons (so 1.0 == "1.0" is true) PHP calls this type juggling it juggles

More information

Lecture 10: Working with Files. CS 383 Web Development II Monday, March 12, 2018

Lecture 10: Working with Files. CS 383 Web Development II Monday, March 12, 2018 Lecture 10: Working with Files CS 383 Web Development II Monday, March 12, 2018 Working with Files Last week, we began to do some work with files through uploads, and we talked a little bit about headers

More information

If you re the administrator on any network,

If you re the administrator on any network, Let s do an inventory! If you re the administrator on any network, chances are you ve already faced the need to make an inventory. In fact, keeping a list of all the computers, monitors, software and other

More information

PHP. MIT 6.470, IAP 2010 Yafim Landa

PHP. MIT 6.470, IAP 2010 Yafim Landa PHP MIT 6.470, IAP 2010 Yafim Landa (landa@mit.edu) LAMP We ll use Linux, Apache, MySQL, and PHP for this course There are alternatives Windows with IIS and ASP Java with Tomcat Other database systems

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

Lecture 13: MySQL and PHP. Monday, March 26, 2018

Lecture 13: MySQL and PHP. Monday, March 26, 2018 Lecture 13: MySQL and PHP Monday, March 26, 2018 MySQL The Old Way In older versions of PHP, we typically used functions that started with mysql_ that did not belong to a class For example: o o o o mysql_connect()

More information

COMP519 Practical 15 PHP (1)

COMP519 Practical 15 PHP (1) COMP519 Practical 15 PHP (1) Introduction This worksheet contains exercises that are intended to familiarise you with PHP Programming. While you work through the exercises below compare your results with

More information

CS101 Lecture 04: How the Web Works Publishing Web pages. What You ll Learn Today

CS101 Lecture 04: How the Web Works Publishing Web pages. What You ll Learn Today CS101 Lecture 04: How the Web Works Publishing Web pages Aaron Stevens 28 January 2011 1 What You ll Learn Today How does the WWW work? What are web servers, anyway? So I got some HTML pages and stuff.

More information

Web Servers and Security

Web Servers and Security Web Servers and Security The Web is the most visible part of the net Two web servers Apache (open source) and Microsoft s IIS dominate the market (Apache has 70%; IIS has 20%) Both major servers have lots

More information

Web Servers and Security

Web Servers and Security Web Servers and Security The Web is the most visible part of the net Two web servers Apache (open source) and Microsoft s IIS dominate the market Apache has 49%; IIS has 36% (source: http://news.netcraft.com/archives/2008/09/30/

More information

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209

CSC209. Software Tools and Systems Programming. https://mcs.utm.utoronto.ca/~209 CSC209 Software Tools and Systems Programming https://mcs.utm.utoronto.ca/~209 What is this Course About? Software Tools Using them Building them Systems Programming Quirks of C The file system System

More information

L.A.M.P. Stack Part I

L.A.M.P. Stack Part I L.A.M.P. Stack Part I By George Beatty and Matt Frantz This lab will cover the basic installation and some configuration of a LAMP stack on a Ubuntu virtual box. Students will download and install the

More information

Architecture. Steven M. Bellovin October 31,

Architecture. Steven M. Bellovin October 31, Architecture Steven M. Bellovin October 31, 2016 1 Web Servers and Security The Web is the most visible part of the net Two web servers Apache (open source) and Microsoft s IIS dominate the market Apache

More information

Architecture. Steven M. Bellovin October 27,

Architecture. Steven M. Bellovin October 27, Architecture Steven M. Bellovin October 27, 2015 1 Web Servers and Security The Web is the most visible part of the net Two web servers Apache (open source) and Microsoft s IIS dominate the market Apache

More information

Using RANCID. Contents. 1 Introduction Goals Notes Install rancid Add alias Configure rancid...

Using RANCID. Contents. 1 Introduction Goals Notes Install rancid Add alias Configure rancid... Using RANCID Contents 1 Introduction 2 1.1 Goals................................. 2 1.2 Notes................................. 2 2 Install rancid 2 2.1 Add alias............................... 3 2.2 Configure

More information

Web pages are a complex undertaking. The basic web page itself isn t

Web pages are a complex undertaking. The basic web page itself isn t Chapter 1 : Managing Your Servers In This Chapter Understanding the client/server relationship Reviewing tools for client-side development Gathering server-side development tools Installing a local server

More information

COMP519 Practical 5 JavaScript (1)

COMP519 Practical 5 JavaScript (1) COMP519 Practical 5 JavaScript (1) Introduction This worksheet contains exercises that are intended to familiarise you with JavaScript Programming. While you work through the tasks below compare your results

More information

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions CSE 390a Lecture 3 Multi-user systems; remote login; editors; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1

More information

We want to install putty, an ssh client on the laptops. In the web browser goto:

We want to install putty, an ssh client on the laptops. In the web browser goto: We want to install putty, an ssh client on the laptops. In the web browser goto: www.chiark.greenend.org.uk/~sgtatham/putty/download.html Under Alternative binary files grab 32 bit putty.exe and put it

More information

Security issues. Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith

Security issues. Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith Security issues Unit 27 Web Server Scripting Extended Diploma in ICT 2016 Lecture: Phil Smith Criteria D3 D3 Recommend ways to improve web security when using web server scripting Clean browser input Don

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1 Today s Topics Web Resources Amazon EC2 Linux Apache PHP Workflow and Tools Extensible Networking Platform 1 1 - CSE 330 Creative Programming and Rapid Prototyping Course Wiki Extensible Networking Platform

More information

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Introduction: PHP (Hypertext Preprocessor) was invented by Rasmus Lerdorf in 1994. First it was known as Personal Home Page. Later

More information

Principles of Bioinformatics. BIO540/STA569/CSI660 Fall 2010

Principles of Bioinformatics. BIO540/STA569/CSI660 Fall 2010 Principles of Bioinformatics BIO540/STA569/CSI660 Fall 2010 Lecture Five Practical Computing Skills Emphasis This time it s concrete, not abstract. Fall 2010 BIO540/STA569/CSI660 3 Administrivia Monday

More information

Lecture 7: Dates/Times & Sessions. CS 383 Web Development II Wednesday, February 14, 2018

Lecture 7: Dates/Times & Sessions. CS 383 Web Development II Wednesday, February 14, 2018 Lecture 7: Dates/Times & Sessions CS 383 Web Development II Wednesday, February 14, 2018 Date/Time When working in PHP, date is primarily tracked as a UNIX timestamp, the number of seconds that have elapsed

More information

web.py Tutorial Tom Kelliher, CS 317 This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment.

web.py Tutorial Tom Kelliher, CS 317 This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment. web.py Tutorial Tom Kelliher, CS 317 1 Acknowledgment This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment. 2 Starting So you know Python and want to make

More information

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n)

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n) Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Module 10A Lecture - 20 What is a function?

More information

CSE : Python Programming

CSE : Python Programming CSE 399-004: Python Programming Lecture 2: Data, Classes, and Modules January 22, 2007 http://www.seas.upenn.edu/~cse39904/ Administrative things Teaching assistant Brian Summa (bsumma @ seas.upenn.edu)

More information

K-RATE INSTALLATION MANUAL

K-RATE INSTALLATION MANUAL K-RATE INSTALLATION MANUAL K-Rate Installation Manual Contents SYSTEM REQUIREMENTS... 3 1. DOWNLOADING K-RATE... 4 STEP 1: LOGIN TO YOUR MEMBER ACCOUNT... 4 STEP 2: ENTER DOMAIN NAME... 5 STEP 3: DOWNLOAD

More information

week8 Tommy MacWilliam week8 October 31, 2011

week8 Tommy MacWilliam week8 October 31, 2011 tmacwilliam@cs50.net October 31, 2011 Announcements pset5: returned final project pre-proposals due Monday 11/7 http://cs50.net/projects/project.pdf CS50 seminars: http://wiki.cs50.net/seminars Today common

More information

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Web Security Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Topics Web Architecture Parameter Tampering Local File Inclusion SQL Injection XSS Web Architecture Web Request Structure Web Request Structure

More information

1 Installation (briefly)

1 Installation (briefly) Jumpstart Linux Bo Waggoner Updated: 2014-09-15 Abstract A basic, rapid tutorial on Linux and its command line for the absolute beginner. Prerequisites: a computer on which to install, a DVD and/or USB

More information

Some things to watch out for when using PHP and Javascript when building websites

Some things to watch out for when using PHP and Javascript when building websites Some things to watch out for when using PHP and Javascript when building websites Les Hatton 10 Sep 2003 1 PHP PHP is a C-like language which evolved from Perl scripts originally produced by Rasmus Lerdorf

More information

CS1 Lecture 3 Jan. 22, 2018

CS1 Lecture 3 Jan. 22, 2018 CS1 Lecture 3 Jan. 22, 2018 Office hours for me and for TAs have been posted, locations will change check class website regularly First homework available, due Mon., 9:00am. Discussion sections tomorrow

More information

Kollaborate Server. Installation Guide

Kollaborate Server. Installation Guide 1 Kollaborate Server Installation Guide Kollaborate Server is a local implementation of the Kollaborate cloud workflow system that allows you to run the service in-house on your own server and storage.

More information

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley PHP and MySQL for Dynamic Web Sites Intro Ed Crowley Class Preparation If you haven t already, download the sample scripts from: http://www.larryullman.com/books/phpand-mysql-for-dynamic-web-sitesvisual-quickpro-guide-4thedition/#downloads

More information

K-SEARCH TRIAL INSTALLATION MANUAL

K-SEARCH TRIAL INSTALLATION MANUAL K-SEARCH TRIAL INSTALLATION MANUAL Qsoft Inc, 2006-2009, All Rights Reserved Page 1 of 32 K-Search Trial Installation Manual Contents SYSTEM REQUIREMENTS... 3 1. DOWNLOADING K-SEARCH 15 DAYS TRIAL... 4

More information

CSCI 201 Lab 1 Environment Setup

CSCI 201 Lab 1 Environment Setup CSCI 201 Lab 1 Environment Setup "The journey of a thousand miles begins with one step." - Lao Tzu Introduction This lab document will go over the steps to install and set up Eclipse, which is a Java integrated

More information

Guide for Building Web Application Using PHP and Mysql

Guide for Building Web Application Using PHP and Mysql Guide for Building Web Application Using PHP and Mysql 1. Download and install PHP, Web Server, and MySql from one of the following sites. You can look up the lecture notes on the class webpage for tutorials

More information

Let's Look Back. We talked about how to create a form in HTML. Forms are one way to interact with users

Let's Look Back. We talked about how to create a form in HTML. Forms are one way to interact with users Introduction to PHP Let's Look Back We talked about how to create a form in HTML Forms are one way to interact with users Users can enter information into forms which can be used by you (programmer) We

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

CCMS Installation Instructions

CCMS Installation Instructions CCMS Installation Instructions August 2012 Rev. 1.8.0 Ceedo Technologies, Ltd. 21 Hamelacha St. P.O. Box 11695 Park Afek, Rosh-Haayin, Israel 48091 T +972-7-322-322-00 www.ceedo.com 2012 Ceedo Technologies,

More information

C++ Data Types. 1 Simple C++ Data Types 2. 3 Numeric Types Integers (whole numbers) Decimal Numbers... 5

C++ Data Types. 1 Simple C++ Data Types 2. 3 Numeric Types Integers (whole numbers) Decimal Numbers... 5 C++ Data Types Contents 1 Simple C++ Data Types 2 2 Quick Note About Representations 3 3 Numeric Types 4 3.1 Integers (whole numbers)............................................ 4 3.2 Decimal Numbers.................................................

More information

OptiRain Open 2 Installation Guide for LInux. This guide provides general instructions for installing OptiRain Open 2 on a Linux based server.

OptiRain Open 2 Installation Guide for LInux. This guide provides general instructions for installing OptiRain Open 2 on a Linux based server. QUICKSMART OptiRain Open 2 Installation Guide for LInux QuickSmart Development P.O. Box 3689 Santa Clara, CA 95055 408-777-0944 www.quicksmart.com This guide provides general instructions for installing

More information

CS1 Lecture 3 Jan. 18, 2019

CS1 Lecture 3 Jan. 18, 2019 CS1 Lecture 3 Jan. 18, 2019 Office hours for Prof. Cremer and for TAs have been posted. Locations will change check class website regularly First homework assignment will be available Monday evening, due

More information

TECH 4272 Operating Systems

TECH 4272 Operating Systems TECH 4272 Lecture 3 2 Todd S. Canaday Adjunct Professor Herff College of Engineering sudo sudo is a program for Unix like computer operating systems that allows users to run programs with the security

More information

Table of Contents. 1. Introduction 1. 1 Overview Business Context Glossary...3

Table of Contents. 1. Introduction 1. 1 Overview Business Context Glossary...3 Table of Contents 1. Introduction 1. 1 Overview......2 1. 2 Business Context.. 2 1. 3 Glossary...3 2. General Description 2. 1 Product/System Functions..4 2. 2 User Characteristics and Objectives 4 2.

More information

CSCB20 Week 8. Introduction to Database and Web Application Programming. Anna Bretscher* Winter 2017

CSCB20 Week 8. Introduction to Database and Web Application Programming. Anna Bretscher* Winter 2017 CSCB20 Week 8 Introduction to Database and Web Application Programming Anna Bretscher* Winter 2017 *thanks to Alan Rosselet for providing the slides these are adapted from. Web Programming We have seen

More information

Compiling Software on UNIX. System Administration Decal Spring 2009 Lecture #4 George Wu Slides prepared by Joshua Kwan

Compiling Software on UNIX. System Administration Decal Spring 2009 Lecture #4 George Wu Slides prepared by Joshua Kwan Compiling Software on UNIX System Administration Decal Spring 2009 Lecture #4 George Wu Slides prepared by Joshua Kwan Today How to turn source code into programs that run on Linux? What if that software

More information

Lecture 8: Images. CS 383 Web Development II Monday, February 19, 2018

Lecture 8: Images. CS 383 Web Development II Monday, February 19, 2018 Lecture 8: Images CS 383 Web Development II Monday, February 19, 2018 Images We can dynamically create images in PHP through the GD library o GD originally stood for gif draw o At one point, GIF support

More information

CS 11 java track: lecture 1

CS 11 java track: lecture 1 CS 11 java track: lecture 1 Administrivia need a CS cluster account http://www.cs.caltech.edu/ cgi-bin/sysadmin/account_request.cgi need to know UNIX www.its.caltech.edu/its/facilities/labsclusters/ unix/unixtutorial.shtml

More information

Getting Started with Ingres and PHP April 8 th 2008

Getting Started with Ingres and PHP April 8 th 2008 Getting Started with Ingres and PHP April 8 th 2008 grantc@php.net 1 Abstract From downloading the source code to building the Ingres PECL extension, this session covers what is needed to get started with

More information

Introduction. Installation. Version 2 Installation & User Guide. In the following steps you will:

Introduction. Installation. Version 2 Installation & User Guide. In the following steps you will: Introduction Hello and welcome to RedCart TM online proofing and order management! We appreciate your decision to implement RedCart for your online proofing and order management business needs. This guide

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use Figure

More information

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring 2009 Topic Notes: C and Unix Overview This course is about computer organization, but since most of our programming is

More information

System Administration for Beginners

System Administration for Beginners System Administration for Beginners Week 5 Notes March 16, 2009 1 Introduction In the previous weeks, we have covered much of the basic groundwork needed in a UNIX environment. In the upcoming weeks, we

More information

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Module 11.0: Consuming Data I Introduction to Ajax This module is designed to familiarize you with web services and web APIs and how to connect to such services and consume and

More information

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted)

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted) A QUICK GUIDE TO PROGRAMMING FOR THE WEB TO GET ACCESS TO THE SERVER: ssh Secure- Shell. A command- line program that allows you to log in to a server and access your files there as you would on your own

More information

:

: CS200 Assignment 5 HTML and CSS Due Monday February 11th 2019, 11:59 pm Readings and Resources On the web: http://validator.w3.org/ : a site that will check a web page for faulty HTML tags http://jigsaw.w3.org/css-validator/

More information

A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

More information

Create-A-Page Design Documentation

Create-A-Page Design Documentation Create-A-Page Design Documentation Group 9 C r e a t e - A - P a g e This document contains a description of all development tools utilized by Create-A-Page, as well as sequence diagrams, the entity-relationship

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

CS61C Machine Structures. Lecture 4 C Pointers and Arrays. 1/25/2006 John Wawrzynek. www-inst.eecs.berkeley.edu/~cs61c/

CS61C Machine Structures. Lecture 4 C Pointers and Arrays. 1/25/2006 John Wawrzynek. www-inst.eecs.berkeley.edu/~cs61c/ CS61C Machine Structures Lecture 4 C Pointers and Arrays 1/25/2006 John Wawrzynek (www.cs.berkeley.edu/~johnw) www-inst.eecs.berkeley.edu/~cs61c/ CS 61C L04 C Pointers (1) Common C Error There is a difference

More information

PHP INTERVIEW QUESTION-ANSWERS

PHP INTERVIEW QUESTION-ANSWERS 1. What is PHP? PHP (recursive acronym for PHP: Hypertext Preprocessor) is the most widely used open source scripting language, majorly used for web-development and application development and can be embedded

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

CS 161 Computer Security

CS 161 Computer Security Nick Weaver Fall 2018 CS 161 Computer Security Homework 3 Due: Friday, 19 October 2018, at 11:59pm Instructions. This homework is due Friday, 19 October 2018, at 11:59pm. No late homeworks will be accepted

More information

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL.

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL. Hello everyone! Welcome to our PHP + MySQL (Easy to learn) E.T.L. free online course Hope you have installed your XAMPP? And you have created your forms inside the studio file in the htdocs folder using

More information

COMP combinational logic 1 Jan. 18, 2016

COMP combinational logic 1 Jan. 18, 2016 In lectures 1 and 2, we looked at representations of numbers. For the case of integers, we saw that we could perform addition of two numbers using a binary representation and using the same algorithm that

More information

Lab 4: Basic PHP Tutorial, Part 2

Lab 4: Basic PHP Tutorial, Part 2 Lab 4: Basic PHP Tutorial, Part 2 This lab activity provides a continued overview of the basic building blocks of the PHP server-side scripting language. Once again, your task is to thoroughly study the

More information

Reversing. Time to get with the program

Reversing. Time to get with the program Reversing Time to get with the program This guide is a brief introduction to C, Assembly Language, and Python that will be helpful for solving Reversing challenges. Writing a C Program C is one of the

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Note about compatibility: This module requires that PHP is enabled on the server. You should verify that your host offers PHP prior to installation.

Note about compatibility: This module requires that PHP is enabled on the server. You should verify that your host offers PHP prior to installation. http://www.vikingcoders.com Soft Goods This module provides a means for selling downloadable products. The Concept... This module provides an interface for you to deliver downloadable products, such as

More information

Real Web Development. yeah, for real.

Real Web Development. yeah, for real. Real Web Development yeah, for real. 1 who am i? i m still cyle i m a systems developer and architect every day i m developin i like this kind of stuff 2 real? kind of ranty, sorry web development is more

More information

Setting up the Apache Web Server

Setting up the Apache Web Server 1 Setting up the Apache Web Server The Apache Web Server (Hyper Text Transfer Protocol) is the most popular web server available. The project gained popularity with Linux in the 1990 s as they teamed up

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Formal semantics of loosely typed languages. Joep Verkoelen Vincent Driessen

Formal semantics of loosely typed languages. Joep Verkoelen Vincent Driessen Formal semantics of loosely typed languages Joep Verkoelen Vincent Driessen June, 2004 ii Contents 1 Introduction 3 2 Syntax 5 2.1 Formalities.............................. 5 2.2 Example language LooselyWhile.................

More information

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

CSC209H Lecture 1. Dan Zingaro. January 7, 2015 CSC209H Lecture 1 Dan Zingaro January 7, 2015 Welcome! Welcome to CSC209 Comments or questions during class? Let me know! Topics: shell and Unix, pipes and filters, C programming, processes, system calls,

More information

Web Engineering (Lecture 08) WAMP

Web Engineering (Lecture 08) WAMP Web Engineering (Lecture 08) WAMP By: Mr. Sadiq Shah Lecturer (CS) Class BS(IT)-6 th semester WAMP WAMP is all-in-one Apache/MySQL/PHP package WAMP stands for: i) Windows ii) iii) iv) Apache MySql PHP

More information

CS 220: Introduction to Parallel Computing. Beginning C. Lecture 2

CS 220: Introduction to Parallel Computing. Beginning C. Lecture 2 CS 220: Introduction to Parallel Computing Beginning C Lecture 2 Today s Schedule More C Background Differences: C vs Java/Python The C Compiler HW0 8/25/17 CS 220: Parallel Computing 2 Today s Schedule

More information

PHP 5 Introduction. What You Should Already Know. What is PHP? What is a PHP File? What Can PHP Do? Why PHP?

PHP 5 Introduction. What You Should Already Know. What is PHP? What is a PHP File? What Can PHP Do? Why PHP? PHP 5 Introduction What You Should Already Know you should have a basic understanding of the following: HTML CSS What is PHP? PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open

More information

Biocomputing II Coursework guidance

Biocomputing II Coursework guidance Biocomputing II Coursework guidance I refer to the database layer as DB, the middle (business logic) layer as BL and the front end graphical interface with CGI scripts as (FE). Standardized file headers

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Lab 2 Building on Linux

Lab 2 Building on Linux Lab 2 Building on Linux Assignment Details Assigned: January 28 th, 2013. Due: January 30 th, 2013 at midnight. Background This assignment should introduce the basic development tools on Linux. This assumes

More information

EASYLAMP REDHAT V1.0 DOCUMENT OWNER: OUDHUIS, JONATHAN INGRAM MICRO CLOUD EUROPE

EASYLAMP REDHAT V1.0 DOCUMENT OWNER: OUDHUIS, JONATHAN INGRAM MICRO CLOUD EUROPE EASYLAMP REDHAT V1.0 DOCUMENT OWNER: OUDHUIS, JONATHAN INGRAM MICRO CLOUD EUROPE CONTENTS 1 Introduction... 2 2 Creating and configuring a virtual machine... 3 3 Installing Apache... 10 4 Installing MariaDB...

More information

Bash command shell language interpreter

Bash command shell language interpreter Principles of Programming Languages Bash command shell language interpreter Advanced seminar topic Louis Sugy & Baptiste Thémine Presentation on December 8th, 2017 Table of contents I. General information

More information

CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28) First Name: Last Name: NetID:

CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28)   First Name: Last Name: NetID: CS 1110 SPRING 2016: GETTING STARTED (Jan 27-28) http://www.cs.cornell.edu/courses/cs1110/2016sp/labs/lab01/lab01.pdf First Name: Last Name: NetID: Goals. Learning a computer language is a lot like learning

More information

If Statements, For Loops, Functions

If Statements, For Loops, Functions Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

More information

6.01, Spring Semester, 2008 Assignment 3, Issued: Tuesday, February 19 1

6.01, Spring Semester, 2008 Assignment 3, Issued: Tuesday, February 19 1 6.01, Spring Semester, 2008 Assignment 3, Issued: Tuesday, February 19 1 MASSACHVSETTS INSTITVTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science 6.01 Introduction to EECS I Spring

More information

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions CSE 390a Lecture 4 Persistent shell settings; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture summary

More information

HCW Human Centred Web. HuCEL: Keywords Experiment Manual. School of Computer Science. Information Management Group

HCW Human Centred Web. HuCEL: Keywords Experiment Manual. School of Computer Science. Information Management Group HCW HuCEL Technical Report 1, June 2009 School of Computer Science Information Management Group HuCEL: Keywords Experiment Manual Paul Waring Human Centred Web Lab School of Computer Science University

More information

ULTEO OPEN VIRTUAL DESKTOP CENTOS 6.0 SUPPORT

ULTEO OPEN VIRTUAL DESKTOP CENTOS 6.0 SUPPORT ULTEO OPEN VIRTUAL DESKTOP V4.0.2 CENTOS 6.0 SUPPORT Contents 1 Prerequisites: CentOS 6.0 3 1.1 System Requirements.............................. 3 1.2 SELinux....................................... 3

More information

C Shell Tutorial. Section 1

C Shell Tutorial. Section 1 C Shell Tutorial Goals: Section 1 Learn how to write a simple shell script and how to run it. Learn how to use local and global variables. About CSH The Barkley Unix C shell was originally written with

More information

Lecture 17. Monday, November 17, 2014

Lecture 17. Monday, November 17, 2014 Lecture 17 Monday, November 17, 2014 DELIMITER So far this semester, we ve used ; to send all of our SQL statements However, when we define routines that use SQL statements in them, it can make distinguishing

More information

CMSC 201 Spring 2018 Lab 01 Hello World

CMSC 201 Spring 2018 Lab 01 Hello World CMSC 201 Spring 2018 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 4th by 8:59:59 PM Value: 10 points At UMBC, the GL system is designed to grant students the privileges

More information

Setting up a LAMP server

Setting up a LAMP server Setting up a LAMP server What is a LAMP? Duh. Actually, we re interested in... Linux, Apache, Mysql, and PHP A pretty standard web server setup Not the only technology options! Linux Pick any! Common choices

More information

COSC 2P91. Introduction Part Deux. Week 1b. Brock University. Brock University (Week 1b) Introduction Part Deux 1 / 14

COSC 2P91. Introduction Part Deux. Week 1b. Brock University. Brock University (Week 1b) Introduction Part Deux 1 / 14 COSC 2P91 Introduction Part Deux Week 1b Brock University Brock University (Week 1b) Introduction Part Deux 1 / 14 Source Files Like most other compiled languages, we ll be dealing with a few different

More information

EZ Admin Helper Addon

EZ Admin Helper Addon EZ Admin Helper Addon Purpose Many common administrative functions are needed to successfully run your business. This addon provides you a way to either schedule tasks to be done at an interval you choose

More information