{"id":1928,"date":"2020-11-20T06:06:30","date_gmt":"2020-11-20T06:06:30","guid":{"rendered":"https:\/\/domains.stanford.edu\/support\/?p=1928"},"modified":"2020-11-20T06:31:58","modified_gmt":"2020-11-20T06:31:58","slug":"what-is-cgi","status":"publish","type":"post","link":"https:\/\/domains.stanford.edu\/support\/getting-started\/what-is-cgi\/","title":{"rendered":"Getting Started with CGI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Common Gateway Interface (CGI)<\/em>&nbsp;is method of extending web server functionality by executing scripts on a Web server.&nbsp; A common use of CGI is in form processing, where the Web browser sends form data to a CGI script on the server, the script retrieve the data from a database, and sends back the results as a Web page.&nbsp; You can think WordPress is form of CGI with hundred of complex CGI scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can run cgi scripts on su.domains using <em>perl, php, unix-shell<\/em> scripts.&nbsp; All you need is to upload your scripts to the public_html\/cgi-bin folder using cPanel\u2019s FileManager.&nbsp; Please see the \u201cAccessing your files though the File Manager\u201d article for more detail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a sample of the hello worlds in perl cgi.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/usr\/bin\/perl\n## example of a cgi script called helloworld.pl\nuse strict;\nuse warnings;\n\nprint \"Content-type: text\/html\\n\\n\";\nprint \"Hello World!\";<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After uploaded the above script to your public_html\/cgi-bin folder, you can goto <a href=\"https:\/\/yourdomain.su.domains\/cgi-bin\/helloworld.pl\">https:\/\/yourdomain.su.domains\/cgi-bin\/helloworld.pl<\/a> to see it in action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While su.domains platform support cgi as well as static html for your website, we encourage you to use content manager systems (CMS) such as WordPress, Drupal, Joomla, etc.,.  These CMS system is much more easy to maintain and manage for years to come.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Common Gateway Interface (CGI)&nbsp;is method of extending web server functionality by executing scripts on a Web server.&nbsp; A common use of CGI is in form processing, where the Web browser sends form data to a CGI script on the server, the script retrieve the data from a database, and sends back the results as a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1928","post","type-post","status-publish","format-standard","hentry","category-getting-started"],"_links":{"self":[{"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/posts\/1928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/comments?post=1928"}],"version-history":[{"count":5,"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/posts\/1928\/revisions"}],"predecessor-version":[{"id":1933,"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/posts\/1928\/revisions\/1933"}],"wp:attachment":[{"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/media?parent=1928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/categories?post=1928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/domains.stanford.edu\/support\/wp-json\/wp\/v2\/tags?post=1928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}