RU beehive logo ITEC dept promo banner
ITEC 325
2018fall
ibarland

running php on rucs
not via web

We will look at:

There is no youtube video for this content. However video from distance lecture (breeze), 2017-jan-24b (0h30m): syllabus-review; running php @ 0h21m


Reviewing a few linux commands

You are responsible for being familiar with the main options for the following commands:

If you want to brush up (or, learn) basic unix, this is a good tutorial (sections 1,2 on using the command-line for file basics, and section 5 for file permissions).

Accessing rucs

Before we even revisit the code, let's talk about the machine rucs.radford.edu (“radford university computer science”): it's a machine for use by ITEC department students, and is a compute-server which you can access from anywhere.

How to log on to rucs, so that you can run php on it:

  1. First, start the VPN, if you are off campus.
  2. Then, either
      1. Start a shell.
        Windows: preferably bash2, but cmd may work too; Mac: Terminal.app on Mac.
      2. type ssh yourUserName@rucs.radford.edu
    1. run putty (Windows-only).
      Note that you can click the box “save” to have it remember your preferences — in particular the machine-name and login-id.
    Note that if rucs is down, the alternate host ruacad.radford.edu can be used.

Be aware: rucs is not the campus web server, nor the php server! You don't have accounts on those machines (although your H: drive is shared by those machines). In particular: the version of php you run from rucs's command-line is slightly different than the version run by php.radford.edu !-o

Running PHP from the command line

Once logged on to rucs, it is straightforward to run a php program:

However, this raises the question of how to get your php program-files onto your H: drive in the first place.

How to edit files on rucs

Either

I do not suggest editing the file locally, and then scp’ing them over after each edit.

Note that if you have your own computer and have installed XAMP, it includes a PHP interpreter (that's the ‘P’ in “XAMP”). So you may find it easy to
However, you'll still need to know how to connect to rucs and run php there: the reason is that the rather-quite-old version of PHP installed on rucs is much closer to the old version of PHP used by php.radford.edu. So when debugging, you'll want to be able to run PHP using the exact H: files and the similar php version as the web server uses.



1 The j/k keybindings to move down/up also happens to work in gmail when viewing your list of messages, btw).      
2 In the Davis lab machines, it seems to be caalled something like “bash/git” … so-named since it was once downloaded from a git repository, maybe?      

logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.