<?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>x-pose.org &#187; php</title> <atom:link href="http://x-pose.org/tag/php/feed/" rel="self" type="application/rss+xml" /><link>http://x-pose.org</link> <description>Tech Geek and Web Developer</description> <lastBuildDate>Tue, 31 Jan 2012 06:17:27 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>How to restart Apache with PHP</title><link>http://x-pose.org/2010/01/how-to-restart-apache-with-php/</link> <comments>http://x-pose.org/2010/01/how-to-restart-apache-with-php/#comments</comments> <pubDate>Wed, 13 Jan 2010 16:21:43 +0000</pubDate> <dc:creator>brant</dc:creator> <category><![CDATA[apache]]></category> <category><![CDATA[php]]></category> <category><![CDATA[tricks]]></category><guid isPermaLink="false">http://x-pose.org/?p=10</guid> <description><![CDATA[If you ever need to restart Apache via PHP, you&#8217;ll notice that the &#8220;passthru&#8221; command doesn&#8217;t quite work out like you thought it would. For those of you who have cpanel and WHM installed, this will be an easy solution.  cpanelmatt at the cpanel forums created an XML-API PHP class to be able to handle [...] No related posts.]]></description> <content:encoded><![CDATA[<p>If you ever need to restart Apache via PHP, you&#8217;ll notice that the &#8220;passthru&#8221; command doesn&#8217;t quite work out like you thought it would.  For those of you who have cpanel and WHM installed, this will be an easy solution.  <a href="http://forums.cpanel.net/f42/xml-api-php-class-version-1-0-a-136449.html" target="_blank">cpanelmatt at the cpanel forums</a> created an XML-API PHP class to be able to handle situations like this.</p><p>First download the <a href="http://sdk.cpanel.net/utils/xmlapi_php_v1.0.tar.gz" target="_blank">XML-API PHP class</a>.</p><p>Next, follow the code example below:</p><pre name="code" class="php">include("xmlapi.php");

$ip = "127.0.0.1";
$root_pass = "somepass";

$xmlapi = new xmlapi($ip);
$xmlapi-&gt;password_auth("root",$root_pass);

$xmlapi-&gt;set_debug(1);

print $xmlapi-&gt;restartsrv('httpd');</pre><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://x-pose.org/2010/01/how-to-restart-apache-with-php/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/12 queries in 0.004 seconds using disk: basic
Object Caching 404/425 objects using disk: basic

Served from: x-pose.org @ 2012-02-05 00:59:19 -->
