-
Notifications
You must be signed in to change notification settings - Fork 0
Testing on the Server
In order to be able to SSH (Secure SHell) into the server, you need to request access from the CIO (who will then request access on your behalf from Marist IT).
In order to use PHP and test on the server there are a few things you need to do:
- Make sure you're on Marist Foxnet. If you're using a different wifi network, please download the VPN and connect using that.
- Download an SSH (Secure SHell) file viewer so that you can see the file structure like on your computer (Finder on Mac, Windows Explorer on Windows).
- We recommend downloading Cyberduck.
- Run Cyberduck and click the Open Connection button on the top left.
- Click the first drop down menu and make sure you're using
SFTP (SSH File Transfer Protocol)
. The server won't accept any other types of connections. - For the
server
putsga.dev.it.marist.edu
. - For the
username
please enter your K Account.- Find out your K Account. Log In and look at the last part of the URL displayed for you.
- K Accounts are 5 letter aliases for your Foxmail account starting with
k
. -
Tip: You can use this K Account in place of your full
first.last1
account name. This means any sort of Marist Login system (CAS) or even Foxmail itself.
- For the
password
please enter the password you use for Foxmail. - Leave
Anonymous Login
unchecked and leaveSSH Private Key
toNone
. - Click Connect.
- You should see a path at the top dropdown:
/home/<kaccount>
- Click that top dropdown and navigate to the root of the server:
/
From here you can see all the folders on the server. The SGA IT Council only deals with a small space. You likely won't have access to modify any of the folders that you see, unless you request permission.
The IT Council's folder path | data/sga_webapps/htdocs/ |
---|---|
Entry to the actual website | home |
The test page you're interested in | test |
In the test
folder you should see a bunch of folders with names of the IT Council members. If you don't have a folder with your name on it (literally), please contact the CIO and request one be made for you.
If there is a folder with your name on it, take your local version of the repository (copy the top level files).
Open any of the files in your favorite text editor (obviously Atom), and modify away. Test using
http://sga.marist.edu/test/<your name same as the folder>/<path for a file in your directory>
To test the home page:
http://sga.marist.edu/test/<your name same as the folder>/pages/index.html
Running code you write in HTML, CSS, and JavaScript using Chrome or Safari (or some other browser) is what is called Front End or Clientside code, meaning the user's computer (the browser) actually executes the code.
Some websites are only built using front end technologies, and that's just fine. But they tend not to be very dynamic.
We use PHP, which is a Web Scripting language that runs on the server, not the client. This distinction is important. The server runs all the PHP commands before the webpage is even out of the server, so the all the client receives is a normal-looking HTML page with no PHP in sight.
PHP is helpful for dynamically loading information. For example, Facebook's news feed is dynamic. It serves you posts and pictures customized for you, the user. It does this by doing all sorts of Server Side calculations, and then hands off the easy, display-code to your browser to layout.
We use PHP to access a database, which stores most of the information on the website (such as the Officers of SGA and of SGA's clubs). This database access can only occur on our server, which contains the database. The client (Chrome, Firefox, etc.) have no clue about a database; they only see a nicely formed HTML document.
This presents a problem when the people working on the website test on their own laptops, which are distinct from the server on which the website's code runs. SSH allows us to access and modify all the files on the server (if we have access). In this way we can work on our laptops, use Atom or Vim or whatever, and comfortably edit files on the server from anywhere. We test those files by actually going to the url of the server; in this sense, we become both server and client.
tl;dr So PHP and MySQL stuff works. Learn to become both server and client.
- Home
- CIO
- Words of Wisdom
- Developers
- Designers
- Web Applications
- Making Changes
- Infrastructure
- Resources
- Key Contacts
- Future Plans