<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>webRulon &#187; cPanel Tricks</title>
	<atom:link href="http://webrulon.com/blog/hosting/cpanel-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://webrulon.com</link>
	<description></description>
	<lastBuildDate>Mon, 23 Aug 2010 14:44:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
			<item>
		<title>Creating CGI Scripts in cPanel</title>
		<link>http://webrulon.com/creating-cgi-scripts-in-cpanel/</link>
		<comments>http://webrulon.com/creating-cgi-scripts-in-cpanel/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 21:14:44 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[cPanel Tricks]]></category>

		<guid isPermaLink="false">http://webrulon.com/new/?p=879</guid>
		<description><![CDATA[<a href="http://webrulon.com/creating-cgi-scripts-in-cpanel/"><img align="left" hspace="5" width="150" src="http://webrulon.com/wp-content/uploads/2009/11/Creating-cPanel-CGI-Scripts.PNG" class="alignleft wp-post-image tfe" alt="Creating cPanel CGI Scripts" title="Creating cPanel CGI Scripts" /></a>]]></description>
			<content:encoded><![CDATA[<!-- google_ad_section_start --><p>Building CGI applications can be a fast and flexible solution for working within cPanel.  Working around limitation of perl versions, standard CGI scripts are quite useful.</p>
<p>To get started with the CGI scripts, there are few basics to cover.  Scripts should be located in the path /usr/local/cpanel/base/3rdparty/.  Permissions should be set so that the user can execute but it is not writable with global permission.  If not located in the correct directory, the files will only be downloadable and not executable.  To access the script, navigate to $IP:2083/3rdparty/scriptnamed.cgi.  During execution, the permissions are limited by the user that initiates.</p>
<p>Now if you are trying to use cPanel APIs within CGI scripts, there are a few options.  You can use the cPanel::XML module to implement XML-API calls while bypassing HTTP altogether.  XMLs API&#8217;s Fast Mode can be used with cpanel_fast_exec to initiate a perl interface into API1 and API2 from outside cPanel.  This mimics the use of fast mode.  Here is an example of calling a list email addresses:<br />
<img class="aligncenter size-full wp-image-936" title="Creating cPanel CGI Scripts" src="http://webrulon.com/wp-content/uploads/2009/11/Creating-cPanel-CGI-Scripts.PNG" alt="Creating cPanel CGI Scripts" width="509" height="125" /><br />
Now the $xml is a hash reference containing the information returned by the call.</p>
<p>Another way to access the APIs are through the JSON API.  This is using javascript to manage the communications.  The session is already authenticated so this is an easy way to go.</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://webrulon.com/creating-cgi-scripts-in-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
