From the KnowledgeBase

Title:
WebScript: The Web Scripting Learning Environment

Synopsis:
WebScript: The Web Scripting Learning Environment

Solution:
WebScript is OIT’s new Web scripting learning environment. In response to customer requests, WebScript provides a place to learn Web scripting (PHP, Perl, etc.) on a Linux-based shared server, also known as a “LAMP” (Linux, Apache, mysql, PHP) server. The service may undergo minor changes and software upgrades during the academic semester as customer feedback is evaluated.

OIT offers a separate production facility for departments running PHP based web applications. For more information about the production web hosting facility please see the Solution 9807.

Instructions
To get started with WebScript, you need to create a MySQL database and then set up your SQL administrative interface.

Create a MySQL database
Go to http://mysqlserver.princeton.edu/PUMySql to create your MySQL database (you only get one per account).

You will name the database and also set a password. Set a strong password that contains upper and lower case letters and numbers. Passwords need to be a minimum of 6 and a maximum of 8 characters long. (It is strongly recommended that you do not use the password associated with your University netID.)

When you have successfully finished this step, you will see the following message:

NetID [your netID] now has an Instructional MySql Account

Set up your SQL administrative interface
A web based administration interface for MySQL databases has been installed. To use it go to: https://webscript.princeton.edu/phpMyAdmin

You can also access this interface from the http://mysqlserver.princeton.edu page.

Securing your Files
All files are installed in your public_html directory. The correct URL is:
http://webscript.princeton.edu/~netID/, where netID is your University netID.

For security reasons, all access to the database needs to occur from webscript. Because the tools send the database password in the clear, it is unwise to provide access to the database from another machine. Once tools are in place to support password encryption, this restriction will be removed.

To provide control, the Apache running on webscript is started with the “-Dwebscript” option. You should add the following to an htaccess file to force access via webscript:

<IfDefine !webscript>

RedirectPermanent /~netID http://webscript.princeton.edu/~netID

</IfDefine>

Training Materials
To learn how to use WebScript, please see the training materials developed for the "PHP/MySQL Web Development Using Dreamweaver" class at the URL: http://www.princeton.edu/~daveh/dwphpclass_guide

Final Notes
Currently there are no limits on database size. However, OIT is monitoring database sizes and rate of growth. You will be contacted via e-mail if your database grows significantly and affects system performance.

Comments and suggestions about WebScript should be sent to ess-incoming@princeton.edu.

Related Links:

Last Updated:
July 7, 2008

Solution ID:
9732