PHP Deployment (CS)

This is a short introduction to help you deploy your PHP programs on the CS server.
(Please tell me if you find any errors or omissions in the document —Upsorn Praphamontripong, 7-February-2021)

If you have not received an email with your credential from the CS helpdesk, please contact the instructor.


Connect to the CS server

To connect to the CS server, you may use any SSH/FTP-like approach of your choice. Alternatively, you may use any FTP software such as FileZilla and Cyberduck.

To upload and deploy your web resources, use the following setting:
  • Hostname: portal.cs.virginia.edu
  • Protocol: SFTP
  • Port: 22 (by default)
  • Username: your computing ID
  • Password: the password you received from cshelpdesk
    • Note: this password is different from the password you use to connect to CS phpMyAdmin. You should have received 2 sets of credential from CS helpdesk: one for phpMyAdmin, one for web server. To deploy your web resources, you need the password for the web server.
    • If you have not received an email from cshelpdesk, or don't know (or forgot) your password, please try to reset the password.
    • To reset the password, use https://www.cs.virginia.edu/PasswordReset/
  • Folder: public_html
    • Note: this folder was created by the CS helpdesk. Do not re-create it. You will later put all of your web resources in this folder)

Deploy an app

  1. Create a blank file named  helloworld.php. Paste the following contents in the file
    <?php echo "Hello World @^_^@" ?>
  2. Upload your  helloworld.php  file to the CS server. Put the  .php  file under  public_html

Access an app

To access your app, open a web browser and enter a URL similar to
    http://cs.virginia.edu/~your-computingID/path-to-your-file/helloworld.html, or
    http://cs.virginia.edu/~your-computingID/path-to-your-file/helloworld.php

Note: do not put public_html in your URL, the path-to-your-file should be the folders inside the public_html folder