<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Cacti: Ubuntu 8.04 Cacti Plugin &#8211; Invalid PHP_SELF Path problem</title>
	<atom:link href="http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html</link>
	<description></description>
	<lastBuildDate>Sat, 06 Mar 2010 12:36:36 +0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: donal</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-16060</link>
		<dc:creator>donal</dc:creator>
		<pubDate>Wed, 11 Nov 2009 14:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-16060</guid>
		<description>Hi,
I have used your guide above both with 9.04 and now with 9.10.
When I upgraded Ubuntu, cacti got upgraded to 0.8.7.d
however the PA was fried.
So I reinstalled the latest PA 2.5 which had the global.php saved in dos format and had to use &quot;fromdos&quot; to correct it.

Above everything is still basically valid except that the comment at line 128 is no longer needed.

Once again. Thanks for this great page. It&#039;s super work.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have used your guide above both with 9.04 and now with 9.10.<br />
When I upgraded Ubuntu, cacti got upgraded to 0.8.7.d<br />
however the PA was fried.<br />
So I reinstalled the latest PA 2.5 which had the global.php saved in dos format and had to use &#8220;fromdos&#8221; to correct it.</p>
<p>Above everything is still basically valid except that the comment at line 128 is no longer needed.</p>
<p>Once again. Thanks for this great page. It&#8217;s super work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-5397</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 16 Jan 2009 06:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-5397</guid>
		<description>Excellent.  I followed your instructions to the T and it worked.  All my old data is still there</description>
		<content:encoded><![CDATA[<p>Excellent.  I followed your instructions to the T and it worked.  All my old data is still there</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kosta P</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-4337</link>
		<dc:creator>Kosta P</dc:creator>
		<pubDate>Mon, 01 Dec 2008 20:07:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-4337</guid>
		<description>I am running ubuntu 8.04 LTS and this didn&#039;t work for my configuration of cacti 0.8.7b installed as a package.

The problem remains in the global.php and it looks like the regular expression on lines 86-87 are not always working and it breaks very quickly. I had to restart the apache server all the time.
In order to fix that temporary, I replaced them with static paths, I hope they will fix that in the next release.

#REMOVED LINES:
$config[&quot;base_path&quot;] = strtr(ereg_replace(&quot;(.*)[\/\\]include&quot;, &quot;\\1&quot;, dirname(__FILE__)), &quot;\\&quot;, &quot;/&quot;);
$config[&quot;library_path&quot;] = ereg_replace(&quot;(.*[\/\\])include&quot;, &quot;\\1lib&quot;, dirname(__FILE__));

#ADDED LINES:
$config[&quot;base_path&quot;] = &#039;/usr/share/cacti/site&#039;;
$config[&quot;library_path&quot;] = &#039;/usr/share/cacti/site/lib&#039;;</description>
		<content:encoded><![CDATA[<p>I am running ubuntu 8.04 LTS and this didn&#8217;t work for my configuration of cacti 0.8.7b installed as a package.</p>
<p>The problem remains in the global.php and it looks like the regular expression on lines 86-87 are not always working and it breaks very quickly. I had to restart the apache server all the time.<br />
In order to fix that temporary, I replaced them with static paths, I hope they will fix that in the next release.</p>
<p>#REMOVED LINES:<br />
$config["base_path"] = strtr(ereg_replace(&#8221;(.*)[\/\\]include&#8221;, &#8220;\\1&#8243;, dirname(__FILE__)), &#8220;\\&#8221;, &#8220;/&#8221;);<br />
$config["library_path"] = ereg_replace(&#8221;(.*[\/\\])include&#8221;, &#8220;\\1lib&#8221;, dirname(__FILE__));</p>
<p>#ADDED LINES:<br />
$config["base_path"] = &#8216;/usr/share/cacti/site&#8217;;<br />
$config["library_path"] = &#8216;/usr/share/cacti/site/lib&#8217;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TFC</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-3191</link>
		<dc:creator>TFC</dc:creator>
		<pubDate>Thu, 30 Oct 2008 12:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-3191</guid>
		<description>Hi,
I did it all using patch...
But spine not worked after plugin arc. installed.
any idea?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I did it all using patch&#8230;<br />
But spine not worked after plugin arc. installed.<br />
any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Still Getting Errors</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-2222</link>
		<dc:creator>Still Getting Errors</dc:creator>
		<pubDate>Mon, 29 Sep 2008 16:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-2222</guid>
		<description>Gents

I am getring this error after following you quide

Parse error: syntax error, unexpected T_VARIABLE in /usr/share/cacti/site/include/global.php on line 107</description>
		<content:encoded><![CDATA[<p>Gents</p>
<p>I am getring this error after following you quide</p>
<p>Parse error: syntax error, unexpected T_VARIABLE in /usr/share/cacti/site/include/global.php on line 107</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-1147</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Fri, 22 Aug 2008 02:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-1147</guid>
		<description>I&#039;m confused.  I ran the patch and found this article with all the updates I need to make to global.php, but when I look at the lines, they are already in there and it still doesn&#039;t work.  The patch looked like it ran with no errors.  Could I have another problem??</description>
		<content:encoded><![CDATA[<p>I&#8217;m confused.  I ran the patch and found this article with all the updates I need to make to global.php, but when I look at the lines, they are already in there and it still doesn&#8217;t work.  The patch looked like it ran with no errors.  Could I have another problem??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: webmaster</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-1112</link>
		<dc:creator>webmaster</dc:creator>
		<pubDate>Wed, 20 Aug 2008 08:31:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-1112</guid>
		<description>Thanks Tom and Brian for your comments. I&#039;ve updated the post with your feedback.</description>
		<content:encoded><![CDATA[<p>Thanks Tom and Brian for your comments. I&#8217;ve updated the post with your feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-1092</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Mon, 18 Aug 2008 22:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-1092</guid>
		<description>thanks for this lil snippet of help
however i had a bit of an issue adding the code you provide:
firstly 1 small typo
    $config[&quot;rra_path&quot;] = &quot;/var/lib/cacti/rra&quot;;
this should read:
    $config[&quot;rra_path&quot;] = &quot;/var/lib/cacti/rra&quot;;
secondly is line 128
i add what you provided but it appeard to give the error &#039;unexpected { on line 128 so after looking at the line of code &amp; taking in what it&#039;s neighbouring lines contained i added an extra ) this helped fix the issue but if you would rather replace the entire line use this:
			if (!((is_file($_SERVER[&quot;SCRIPT_FILENAME&quot;])) &amp;&amp; (substr_count($_SERVER[&quot;SCRIPT_FILENAME&quot;], basename($_SERVER[&quot;PHP_SELF&quot;]))))) {

again thanks alot for giving me the spring board to fix this little bug</description>
		<content:encoded><![CDATA[<p>thanks for this lil snippet of help<br />
however i had a bit of an issue adding the code you provide:<br />
firstly 1 small typo<br />
    $config["rra_path"] = &#8220;/var/lib/cacti/rra&#8221;;<br />
this should read:<br />
    $config["rra_path"] = &#8220;/var/lib/cacti/rra&#8221;;<br />
secondly is line 128<br />
i add what you provided but it appeard to give the error &#8216;unexpected { on line 128 so after looking at the line of code &amp; taking in what it&#8217;s neighbouring lines contained i added an extra ) this helped fix the issue but if you would rather replace the entire line use this:<br />
			if (!((is_file($_SERVER["SCRIPT_FILENAME"])) &amp;&amp; (substr_count($_SERVER["SCRIPT_FILENAME"], basename($_SERVER["PHP_SELF"]))))) {</p>
<p>again thanks alot for giving me the spring board to fix this little bug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-1030</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 14 Aug 2008 23:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-1030</guid>
		<description>I figured I&#039;d find the culprit...

On line 56 Change:

$config[&#039;url_path&#039;] = &#039;/&#039;;

to:

$config[&#039;url_path&#039;] = &#039;/cacti/&#039;;

That did it!!!
Thanks for your hard work.</description>
		<content:encoded><![CDATA[<p>I figured I&#8217;d find the culprit&#8230;</p>
<p>On line 56 Change:</p>
<p>$config['url_path'] = &#8216;/&#8217;;</p>
<p>to:</p>
<p>$config['url_path'] = &#8216;/cacti/&#8217;;</p>
<p>That did it!!!<br />
Thanks for your hard work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.askaboutphp.com/42/cacti-ubuntu-cacti-plugin-invalid-php_self-path.html/comment-page-1#comment-1029</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 14 Aug 2008 23:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.askaboutphp.com/?p=42#comment-1029</guid>
		<description>Thank you so much for this fix.  I&#039;m almost there.  When I add in all the prepatched files, and make the above changes to /usr/share/cacti/site/include/global.php the site does come back...almost.

I lose all text formatting and graphics.  All of the links on the left also have dropped the /cacti/ directory and are attempting to link the php files to the root of the directory.

If you have any recommendations, they are greatly welcomed.  I will continue tweaking and post any updates as I am successful.

Thanks</description>
		<content:encoded><![CDATA[<p>Thank you so much for this fix.  I&#8217;m almost there.  When I add in all the prepatched files, and make the above changes to /usr/share/cacti/site/include/global.php the site does come back&#8230;almost.</p>
<p>I lose all text formatting and graphics.  All of the links on the left also have dropped the /cacti/ directory and are attempting to link the php files to the root of the directory.</p>
<p>If you have any recommendations, they are greatly welcomed.  I will continue tweaking and post any updates as I am successful.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
