Presentation is loading. Please wait.

Presentation is loading. Please wait.

Website Development & Management Getting Ready for the Server-Side CIT 3353 -- Fall 2006 www.clt.astate.edu/jseydel/mis3353 Instructor: John Seydel, Ph.D.

Similar presentations


Presentation on theme: "Website Development & Management Getting Ready for the Server-Side CIT 3353 -- Fall 2006 www.clt.astate.edu/jseydel/mis3353 Instructor: John Seydel, Ph.D."— Presentation transcript:

1

2 Website Development & Management Getting Ready for the Server-Side CIT 3353 -- Fall 2006 www.clt.astate.edu/jseydel/mis3353 Instructor: John Seydel, Ph.D.

3 Student Objectives Upon completion of this class meeting, you should be able to: Install PHP-related development software Create simple web forms

4 First, Let’s Resolve Some SSI and Other IssuesSSI Your PHP repertoire, so far Script delimiters Variables  Naming  Assigning string literals Functions  echo()  include() First and second tier SSI versions Modify footer to include link home Questions/problems? XML declaration Other...

5 Now, an Intro to Forms Forms are what made eCommerce feasible Get info from user Display info back to user That is, they add interactivity ! Working with forms involves Forms page Forms processor, either  Client-side or  Server-side, or  Both (local validation then server-side processing)

6 HTML Forms in Brief At lowest level, a form consists of two elements: Form   The overall container element Input data collection control   A variety of types (textboxes, checkboxes, buttons, etc.) exist and are designated by the type attribute Example: Class: Several other data collection controls exist

7 Getting Started with Forms Main element is Attributes:  id (for object references in scripts)  action (where the form processor is)  method (usually post but sometimes get) Should be only one per page (for our purposes) All controls must be within... Form controls  input (many types)  button  select  textarea Forms also typically contain standard inline (e.g., ) and block (e.g., ) elements

8 Basic Forms Example Suzy Student GuestbookGuestbook Look at the tags Elements Attributes Note the action attribute This is the form processor Use any URL, including email However, email submission is very undependable

9 Our PHP Environment (LAMP) The components Operating system  Linux (production machine)  LAMP  Windows (development machine)  WAMP MySQL: the DBMS and server Apache: the web server PHP: the scripting engine For best results, install in that order Before downloading Make sure you have administrator permissions Stop IIS if it’s running Create a desktop folder Downloads

10 The Installation Process: MySQL Generally follows procedure given in Meloni textbook Download mysql-4.0.24-win.zip from course Handouts page (or from MySQL.com) into Downloads directory Uncompress into a default temporary directory and then open that directory Double-click on SETUP.EXE and accept all defaults as the installation wizard runs Test the installation Run c:\mysql\bin\winmysqladmin.exe Provide a username and password you’ll remember (generally, these won’t be used again, ever) Note the stoplight now on taskbar at bottom right MySQL’s database server now starts upon bootup For now, go no further (i.e., not beyond p. 8)

11 The Installation Process: Apache Again, ensure that IIS is stopped Also follows procedure given in Meloni textbook but with some variations; assumes you’ll be installing PHP right away Download apache_2.0.54-win32-x86-no_ssl.msi from course Handouts page (or from Apache.org) into Downloads directory Double-click on apache_2.0.54-win32-x86-no_ssl.msi Accept defaults as the installation wizard runs Don’t worry for now about Server Information panel Verify the installation Note the feather icon near the right end of the taskbar Point browser to http://127.0.0.1 (output displayed on p. 29 should appear) Modify the configuration...

12 Modifications to Apache Edit the configuration file: c:\Program Files\Apache Group\Apache2\conf\httpd.conf Specify server settings: Find ServerAdmin statement and set the argument to your email address Find ServerName statement and set the argument to your IP address or to 127.0.0.1 Two more changes: Add to the end of the LoadModule section LoadModule php5_module c:/php/php5apache2.dll Add to the end of the AddType section AddType application/x-httpd-php.phtml.php Do not restart Apache until after installing PHP

13 The Installation Process: PHP Varies somewhat from procedure given in Meloni textbook Download php-5.0.4-Win32.zip from course Handouts page (or from PHP.net) into Downloads directory Uncompress into a permanent directory (c:\php) and then open that directory Configure PHP (see next slide) Restart Apache Click on taskbar icon (feather) Then Apache2 | Restart

14 Configuring PHP Make changes to files Copy c:\php\php.ini-dist to c:\WINDOWS Rename c:\WINDOWS\php.ini-dist to c:\WINDOWS\php.ini Edit c:\WINDOWS\php.ini  Open in NotePad  Find and uncomment (remove “;”) extension=php_mysql.dll  Find and set error reporting configuration error_reporting = E_ALL & ~E_NOTICE display_errors = On  Setup for email (example) SMTP = smail.astate.edu sendmail_from = JoJo.Beans@smail.astate.eduJoJo.Beans@smail.astate.edu  Save and close the file Copy c:\php\php5ts.dll to c:\WINDOWS\system Copy c:\php\ext\php_mysql.dll to c:\WINDOWS\system Copy c:\mysql\bin\libmysql.dll to c:\WINDOWS\system Restart Apache

15 If Modifications are Needed Apache: Modify the httpd.conf file and then restart Located in C:\Program Files\Apache Group\Apache2\conf PHP: Modify the php.ini file and then restart Apache Located in C:\WINDOWS MySQL: we’ll address this later

16 Summary of Today’s Objectives Create simple web forms Install PHP-related development software

17 Appendix

18 Browser/Server Interaction

19 Server-Side Include Exercise Locally, make 4 copies of index.html index.php header1.shtml header2.shtml styles1.shtml Edit these files, save them, and post them to SuSE1 header1.shtml: remove all before and after footer1.shtml: remove all before and after last styles1.shtml: remove all before and after index.php (first remove XML directive, for now)  Remove all between and inclusive  Insert:  Remove all between and inclusive  Insert:  Remove all between and last inclusive  Insert:


Download ppt "Website Development & Management Getting Ready for the Server-Side CIT 3353 -- Fall 2006 www.clt.astate.edu/jseydel/mis3353 Instructor: John Seydel, Ph.D."

Similar presentations


Ads by Google