Yes, you can run CGI/PHP scripts on the Home Page server if you have an active Unix userid. Follow the steps below to set up the necessary support for scripts.
PHP scripts can be run from anywhere within your public_html directory.
CGI scripts (perl, bash, sh, etc) can be run by following the procedure here:
hostname% makepublic cgi-bin
Your script can be accessed by using the following URL format:
https://home.cc.umanitoba.ca/~userid/cgi-bin/scriptname
Every file in the cgi-bin directory must be set to be executable. This can be done by doing a chmod 755 on each file you create.
Please note:
#!/usr/bin/perl
as the first line.You may wish to use a test script to ensure that everything is working properly.
The following perl script, when entered into a file called hello_world.pl and placed into the cgi-bin directory, will display "Hello World!" on a web page:
#!/usr/bin/perl use CGI; print "Content-Type: text/html\n\n"; print "<html>\n<head>\n<title>Hello World</title>\n</head>\n"; print "<body><center><h1>HELLO WORLD!</h1></center>\n"; print "<p>Hello World!\n"; print "<i><br> Hello World!</i>\n"; print "<b><br> Hello World!</b>\n"; print "</body></html>\n";
Visit the following link to see the result of the script running in the support account:
https://home.cc.umanitoba.ca/~support/cgi-bin/hello_world.pl
The following PHP script, when entered into a file called php_test.php and placed into your public_html directory, will display "PHP rocks!" on a web page:
<html> <head> <title>PHP ROCKS!</title> </head> <body> <?php print "PHP rocks!"; ?> </body> </html>
Visit the following link to see the result of the script running in the support account:
https://home.cc.umanitoba.ca/~support/cgi-bin/php_test.php
Help & Solutions Centre |
204-474-8600 123 Fletcher Argue |
Bannatyne Help Desk |
204-789-3541 230 NJM Library |