forked from pifty/tutes-dump
73 lines
2.3 KiB
Plaintext
Executable File
73 lines
2.3 KiB
Plaintext
Executable File
[02] IS PHP, ASP, PERL, SSI, CGI AVAILABLE HERE?
|
|
|
|
YES!
|
|
|
|
This is probably #1 FAQ regarding SDF hosted web sites.
|
|
|
|
We use suEXEC and suPHP. What this means is that the tools
|
|
you have access to under your SDF membership are the tools
|
|
you can use in your website scripting.
|
|
|
|
To make use of SSI, be sure to use .shtml as your filename
|
|
extension.
|
|
|
|
Need to see php options? Create a file called 'test.php'
|
|
in your web directory, and put the following inside:
|
|
|
|
<?php
|
|
phpinfo();
|
|
?>
|
|
|
|
Don't forget to run 'mkhomepg -p' afterwards to set the
|
|
proper permissions. Display results in web browser pointed
|
|
at "http://<your sdf userID>.sdf.org/test.php".
|
|
|
|
|
|
How about CGI?
|
|
|
|
CGI scripts ARE allowed. Giving a detailed tutorial is
|
|
beyond the scope of this FAQ, however, below are some rather
|
|
simple examples:
|
|
|
|
If you want to create a simple CGI, you don't need to use
|
|
PERL, you can do it the UNIX way in ksh! (PS, PERL != CGI)
|
|
|
|
#!/bin/ksh
|
|
#
|
|
# My silly.cgi
|
|
#
|
|
echo Content-type: text/html
|
|
echo
|
|
echo "<title>my silly output</title>"
|
|
echo "<h3>my silly hello world.</h3>"
|
|
|
|
To create powerful CGIs using LISP, you can use OpenLISP on
|
|
SDF by simply:
|
|
|
|
#!/usr/pkg/uxlisp/uxlisp -quiet
|
|
;
|
|
; My powerful.cgi
|
|
;
|
|
(print "Content-type: text/html")
|
|
(print)
|
|
(print "<title>my powerful output</title>")
|
|
(print "<h3>my powerful hello world.</h3>")
|
|
|
|
For more information and a tutorial on using LISP on SDF
|
|
for the web, see http://lisp-p.org
|
|
|
|
While we don't directly support 'ASP' you can convert any
|
|
ASP format file to a PHP file using 'asp2php'
|
|
|
|
------------------------------------------------------------
|
|
|
|
Yes, use the extension '.cgi' for a script to be executed by
|
|
the webserver. You can run 'mkhomepg -p' to set proper file
|
|
permissions after you have uploaded or created new files. Also,
|
|
you don't need to keep scripts in a '.cgi-bin' directory; CGIs
|
|
can be run from any directory within your web directory.
|
|
|
|
Users are encouraged to educate themselves and take resposibility
|
|
to ensure their web content is properly formed, secure and not
|
|
using excessive system resources.
|