Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

My big idea: Ancient Brain


CA114      CA170

CA668      CA669      Projects

Lab - PHP

  1. Make PHP page on student.computing.dcu.ie.
  2. Output some tags. Note code is not visible to client.
  3. Define some variables and output them.

  4. Make page with var_dump($_SERVER);
  5. Make page with phpinfo();

  6. Implement the PHP demo page.
  7. Consult PHP reference site to get syntax right.


PHP command-line, etc.

  1. Can we make command-line call on student.computing.dcu.ie?
  2. Run the test to find out what is enabled.

  3. What user does PHP run as?
    • My PHP demo runs on www.computing.dcu.ie
    • On that server, it can make a command-line call and we see that the PHP runs as user "wwwrun".
    • On student.computing.dcu.ie, can we make a command-line call?
    • If so, what user does PHP run as?

  4. Can we make HTTP call on student.computing.dcu.ie?
    • Use file_get_contents to fetch HTTP page and dump it to stdout


PHP include v. SSI include

  1. Include another PHP page with
  2. Can use this instead of SSI include.

ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.

Wikipedia: Sometimes I link to Wikipedia. I have written something In defence of Wikipedia. It is often a useful starting point but you cannot trust it. Linking to it is like linking to a Google search. A starting point, not a destination. I automatically highlight in red all links to Wikipedia and Google search and other possibly-unreliable user-generated content.