{"id":336,"date":"2013-05-17T09:37:41","date_gmt":"2013-05-17T09:37:41","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2013\/05\/17\/introduction-of-cgi\/"},"modified":"2021-02-27T09:52:52","modified_gmt":"2021-02-27T09:52:52","slug":"introduction-of-cgi","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/","title":{"rendered":"Introduction of CGI | What is Common Gateway Interface (CGI)?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3777 aligncenter\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png\" alt=\"cgi-introduction\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>Any Server will (mostly) do\u00a0\u00a0\u00a0<\/strong><\/p>\n<ul>\n<li>CGI will not work without a server<\/li>\n<li>Your Server must allow CGI<\/li>\n<li>Your CGI application must be written in a language supported by your server<\/li>\n<li>You can use probably your existing web server<\/li>\n<li>If you need to test on your local computer, you may install WAMP\/XAMPP<\/li>\n<li>Each Server has a particular requirements about running\u00a0 CGI Applications<\/li>\n<\/ul>\n<p><strong>Prerequisties<\/strong><br \/>\nExperience in relevant programming language<\/p>\n<ul>\n<li>Perl<\/li>\n<li>Php<\/li>\n<li>Unix Shell<\/li>\n<li>c\/c++<\/li>\n<li>HTML\/CSS<\/li>\n<\/ul>\n<p><strong>What is CGI<\/strong><br \/>\nCommon Interface Gateway<\/p>\n<ul>\n<li>How web browsers submit forms and interact with programs on the server<\/li>\n<li>Used for simple interaction applications<\/li>\n<li>Can be used with any programming language<\/li>\n<li>Often called \u201cCGI Scripts\u201d<\/li>\n<li>Can be written in any language<\/li>\n<li>Run in the server, not in a web browser<\/li>\n<li>Must follow server requirements for running applocations<\/li>\n<\/ul>\n<p><strong>ANY SERVER WILL (MOSTLY) do<\/strong><\/p>\n<ul>\n<li>CGI will not work without a web server<\/li>\n<li>Your Server must allow CGI<\/li>\n<li>Your CGI application must be written in a language supported by your server<\/li>\n<li>You can use\u00a0 your existing web server<\/li>\n<li>If you need to test on your local computer, you may install WAMP\/XAMPP<\/li>\n<\/ul>\n<p><strong>Some Guidelines for Unix\/Apapche users<\/strong><\/p>\n<ol>\n<li>Permission \u2013 755 ( aka rwxr-xr-x)<\/li>\n<li>Filename associates<\/li>\n<li>.cgi, .pl, .php \u2026etc<\/li>\n<li>.httaccess<\/li>\n<li>Options+ExecCGI<\/li>\n<li>AddHandle cgi-scripts .cgi<\/li>\n<li>SetHander cgi-script<\/li>\n<li>Access to server log<\/li>\n<\/ol>\n<p><strong>Some Guidelines for Windows Servers<\/strong><br \/>\nMany Windows servers do not support perl or PHP<br \/>\nMay require ASP or C#<br \/>\nUsually require specific filename extension<br \/>\n.pl for perl<br \/>\n.php for php<br \/>\n.asp or .aspx for ASP<br \/>\nAccess to error log<br \/>\nCheck with your server web site or support staff<\/p>\n<p><strong>How CGI works<\/strong><\/p>\n<ol>\n<li>Browser Communicates with server over HTTP<\/li>\n<li>Browser sends a request to the server consisting of header and optional body<\/li>\n<li>Server sends information to the CGI application<\/li>\n<li>Environment variables<\/li>\n<li>Body may be sent in the STDIN stream<\/li>\n<li>Server sends a response consisting of a header and a body<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Any Server will (mostly) do\u00a0\u00a0\u00a0 CGI will not work without a server Your Server must allow CGI Your CGI application [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":3777,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[67],"tags":[2372,2377,2369,2371,2370,2373,2376,2379,2375,719,2378,2374],"class_list":["post-336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-web-servers","tag-about-cgi","tag-about-common-gateway-interface","tag-cgi","tag-cgi-introduction","tag-cgi-overview","tag-common-gateway-interface","tag-introduction-of-common-gateway-interface","tag-know-about-cgi","tag-servers","tag-start","tag-understand-cgi","tag-what-is-cgi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction of CGI | What is Common Gateway Interface (CGI)? - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction of CGI | What is Common Gateway Interface (CGI)? - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Any Server will (mostly) do\u00a0\u00a0\u00a0 CGI will not work without a server Your Server must allow CGI Your CGI application [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-17T09:37:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:52:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Introduction of CGI | What is Common Gateway Interface (CGI)?\",\"datePublished\":\"2013-05-17T09:37:41+00:00\",\"dateModified\":\"2021-02-27T09:52:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/\"},\"wordCount\":318,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/cgi-introduction.png\",\"keywords\":[\"About CGI\",\"About Common Gateway Interface\",\"CGI\",\"CGI Introduction\",\"CGI Overview\",\"Common Gateway Interface\",\"Introduction of Common Gateway Interface\",\"Know about CGI\",\"Servers\",\"Start\",\"Understand CGI\",\"What is CGI\"],\"articleSection\":[\"App \\\/ Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/\",\"name\":\"Introduction of CGI | What is Common Gateway Interface (CGI)? - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/cgi-introduction.png\",\"datePublished\":\"2013-05-17T09:37:41+00:00\",\"dateModified\":\"2021-02-27T09:52:52+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/cgi-introduction.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/cgi-introduction.png\",\"width\":600,\"height\":400,\"caption\":\"cgi-introduction\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-of-cgi\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction of CGI | What is Common Gateway Interface (CGI)?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction of CGI | What is Common Gateway Interface (CGI)? - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/","og_locale":"en_US","og_type":"article","og_title":"Introduction of CGI | What is Common Gateway Interface (CGI)? - scmGalaxy","og_description":"Any Server will (mostly) do\u00a0\u00a0\u00a0 CGI will not work without a server Your Server must allow CGI Your CGI application [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/","og_site_name":"scmGalaxy","article_published_time":"2013-05-17T09:37:41+00:00","article_modified_time":"2021-02-27T09:52:52+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Introduction of CGI | What is Common Gateway Interface (CGI)?","datePublished":"2013-05-17T09:37:41+00:00","dateModified":"2021-02-27T09:52:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/"},"wordCount":318,"commentCount":1,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png","keywords":["About CGI","About Common Gateway Interface","CGI","CGI Introduction","CGI Overview","Common Gateway Interface","Introduction of Common Gateway Interface","Know about CGI","Servers","Start","Understand CGI","What is CGI"],"articleSection":["App \/ Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/","name":"Introduction of CGI | What is Common Gateway Interface (CGI)? - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png","datePublished":"2013-05-17T09:37:41+00:00","dateModified":"2021-02-27T09:52:52+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2013\/05\/cgi-introduction.png","width":600,"height":400,"caption":"cgi-introduction"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-of-cgi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Introduction of CGI | What is Common Gateway Interface (CGI)?"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=336"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/336\/revisions"}],"predecessor-version":[{"id":3778,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/336\/revisions\/3778"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/3777"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}