HP Laptops… dislike.

3 people i know purchased HPs. 3 is the number of HP’s that had mother boards crap out after a little over a year. 3 is also the number of hours you’ll end up spending trying to get your motherboard replaced after it craps out. 3 hundred is the number of dollars you’ll spend if it craps out a day after your warantee expires. 3 Reasons not to buy HP. 3 alternative suggestions… Get a Dell, an apple, or build your own.

CAS Authentication with PHP

Found this old tutorial in some notes. Enjoy.

It was a bit tricky getting CAS to work with a php authentication page, but I got it working in about an hour. I couldn’t find any good instructions, so heres a tutorial for anyone interested.

1. Download casPHP files and put them in www root. They are available at http://www.ja-sig.org/wiki/display/CASC/phpCAS+installation+guide.
2. Make sure the source from the zip file is in your web server root.
3. Look through the examples. Copy example_gateway.php to your web server root.
4. Modify example_gateway.php to use the BYU CAS server, as shown below. The line that needs to be changed is bolded.

<?php

//
// phpCAS simple client
//

// import phpCAS lib
include_once(‘CAS.php’);

phpCAS::setDebug();

// initialize phpCAS
phpCAS::client(CAS_VERSION_2_0,’cas.byu.edu’,443,’cas’);

// no SSL validation for the CAS server
phpCAS::setNoCasServerValidation();

if (isset($_REQUEST['logout'])) {
phpCAS::logout();
}
if (isset($_REQUEST['login'])) {
phpCAS::forceAuthentication();
}

// check CAS authentication
$auth = phpCAS::checkAuthentication();

?>
<html>
<head>
<title>phpCAS simple client</title>
</head>
<body>
<?php
if ($auth) {
// for this test, simply print that the authentication was successfull
?>
<h1>Successfull Authentication!</h1>
<p>the user’s login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
<p><a href=”?logout=”>Logout</a></p>
<?php
} else {
?>
<h1>Guest mode</h1>
<p><a href=”?login=”>Login</a></p>
<?php
}
?>
<p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
</body>
</html>

5. If you get errors, you may need to make sure you have all the needed php extensions.
I had to add cURL since phpCas uses some of it’s methods.

There you have it. A simple CAS authentication script that you can modify to fit your needs.

Resume

Education

Brigham Young University; Provo, Utah (Senior)
Major: Information Technology

 

Experience

 

The Church of Jesus Christ of Latter-day Saints, San Francisco, California Missionary Service (February 2003-February 2005)

Taught church principles to those interested in learning.
Served as district leader over 12 other missionaries.
Did various community service activities for 6 hours a week, including teaching maximum security inmates at San Quentin parables.

 

Brigham Young University Religious Education Web Developer(2007-2009)

Setup WIMP and LAMP servers.
Developed applications in PHP / MYSQL.
Maintained current websites and web applications.
Maintain / Backup / Update servers.
Recovered from major server crash.
Setup major drupal website for RSC with complex database interacts and management console.
Setup custom wordpress blog for RSC department head.

 

Brigham Young University Student Life Web Developer(2009-2010)

Worked on several sites for both the womens resource center, and BYU clubs.
Developed applications in HTML / CSS/ PHP / MYSQL, and within CMS’s.
Maintained current websites and web applications.
Maintain / Backup / Update servers.

Ilead Interactive(2009-2010)

Processing large access / excel databases with php scripts and outputting them into MYSQL database.
Modification of PHPeasyproject open source project to automate task and project creation to fit company needs.
Integration of styled websites to work with CRM and credit card processing.  Add tracking and database interaction with PHP.
MYSQL database driven website for managing orders processed by a call center, and reporting.
Converting static creatives into functional sites with reporting and credit card processing.

Contract Work(2007-2010)

Global Private Equity Group – globalpeg.com, converted a design
XO Dreamteam – wadelerickson.com, worked closely with designer to create a wordpress theme.
actionpowersportrentals – actionpowersportrentals.com, created design, and logo for rental company.
 

Skills Summary

Dependable, good with people, good technical skills, motivated, responsible. Have programmed in a variety of different languages, and pick up new skills, computer languages, and management systems quickly.

 

Computer Skills

  • Microsoft Access, Excel, Word, Outlook, Frontpage, and Powerpoint
  • Linux, Windows, Apple
  • MSSQL, MYSQL
  • PHP, Flash, Javascript, HTML, CSS, ASP.NET, JSP
  • JAVA, Objective-C
  • Adobe Photoshop, Dreamweaver, Flash, Illustrator
  • Apache, Tomcat, IIS
  • Drupal, WordPress

How to configure an Amazon EC2 server

1. setup the server and activate your instance, downloading your pem key, configure security group, and attaching an elastic ip address.

2. ssh into the server – if using putty, use putty gen to generate a ppk key.

3. sudo su
yum update
yum install mysql mysql-server
yum install php
yum install gcc
yum install httpd mod_ssl
yum install php-devel php-pear
yum install pcre-devel
yum install httpd-devel
pecl install apc-beta
yum install php-mysql
yum install php-gd
yum install php-mcrypt
yum install php-mbstring

useradd admin
passwd admin
usermod -a -G ftp admin
usermod -a -G apache admin
usermod -a -G root admin
yum install vsftpd

vi /etc/vsftpd/vsftpd.conf
add
pasv_enable=YES
pasv_min_port=14000
pasv_max_port=14050
port_enable=YES
open up ports 14000-14050 in amazon security group

service mysqld start
service vsftpd start
service httpd start

mysql -u root
use mysql
SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘password’);
DELETE FROM user WHERE password = ”;
DELETE FROM user WHERE user.user= ”;
FLUSH PRIVILEGES;
DROP DATABASE test;

MySQL Auto Start in EC2 Amazon Linux -
/sbin/chkconfig –levels 235 httpd on
/sbin/chkconfig –levels 235 vsfttpd on
/sbin/chkconfig –levels 235 mysqld on

cd /var/www/html
wget http://www.sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.4.1/phpMyAdmin-3.4.1-all-languages.tar.bz2

tar -jxf phpMyAdmin-3.4.1-all-languages-tar.bz2 -C /var/www/html

mv phpMyAdmin-3.4.1-all-languages phpmyadmin

rm -rf phpMyAdmin-3.4.1-all-languages.tar.bz2
mv phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.php and edit as neccesary