<rss version="2.0">
		<channel>
			<title>Plogger Support Forum - Comments not working correctly</title>
			<lastBuildDate>Mon, 13 Apr 2026 23:38:52 +0000</lastBuildDate>
			<link>http://www.plogger.org/forum/</link>
			<description></description>
			<generator>Lussumo Vanilla 1.1.10</generator>
			<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11167#Comment_11167</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11167#Comment_11167</guid>
		<pubDate>Thu, 30 Jul 2009 15:21:12 +0000</pubDate>
		<author>joshua.s.belanger</author>
		<description>
			<![CDATA[I am having a weird issue. If I try to post a comment from the plogger page:<br /><br />http://northlakesfireandrescue.org/beta/pics/?level=picture&amp;id=40<br /><br />It will work fine. But I use my embeded page like:<br /><br />http://www.northlakesfireandrescue.org/beta/photos.php?level=picture&amp;id=40<br /><br />It errors out with:<br /><br />Notice: Undefined index: plogger-token in C:\sites\accounts\northlakesfire\northlakesfireandrescue.org\www\beta\pics\plog-comment.php on line 52<br /><br />Warning: Cannot modify header information - headers already sent by (output started at C:\sites\accounts\northlakesfire\northlakesfireandrescue.org\www\beta\pics\plog-comment.php:52) in C:\sites\accounts\northlakesfire\northlakesfireandrescue.org\www\beta\pics\plog-comment.php on line 147<br /><br />Can someone help with this please? Atleast let me know if it is something to do with my PHP setup.]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11169#Comment_11169</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11169#Comment_11169</guid>
		<pubDate>Thu, 30 Jul 2009 15:40:53 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[joshua,<br /><br />What is the code for your page <strong >http://www.northlakesfireandrescue.org/beta/photos.php</strong>?  Can you post it here please?]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11170#Comment_11170</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11170#Comment_11170</guid>
		<pubDate>Thu, 30 Jul 2009 15:48:38 +0000</pubDate>
		<author>joshua.s.belanger</author>
		<description>
			<![CDATA[&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />&lt;?php require(&quot;pics/gallery.php&quot;); ?&gt;<br />&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />&lt;head&gt;<br />&lt;?php the_plogger_head(); ?&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;<br />&lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />&lt;title&gt;North Lakes Fire &amp; Rescue&lt;/title&gt;<br />&lt;/head&gt;<br /><br />&lt;body&gt;<br />&lt;div id=&quot;container&quot;&gt;<br />	&lt;div id=&quot;header&quot;&gt;<br />	  &lt;ul&gt;<br />	    &lt;li&gt;&lt;?php include 'links.xml';?&gt;&lt;/li&gt;<br />		&lt;/ul&gt;<br />	&lt;/div&gt;<br />	&lt;div id=&quot;content&quot;&gt;<br />		&lt;div id=&quot;left_noright&quot;&gt;<br />			&lt;?php the_plogger_gallery(); ?&gt;<br />		&lt;/div&gt;<br />		&lt;div id=&quot;footerline&quot;&gt;<br />		&lt;/div&gt;<br />	&lt;/div&gt;<br />&lt;?php include 'footer.php';?&gt;<br />&lt;/div&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11171#Comment_11171</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11171#Comment_11171</guid>
		<pubDate>Thu, 30 Jul 2009 15:55:07 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[Your first two lines should be switched:<br /><code >&lt;?php require(&quot;pics/gallery.php&quot;); ?&gt;<br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</code><br /><br />Plogger cannot start the session for session the spam token session variable if there is any output before it is called (i.e. your doctype declaration output stops the session from being created).]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11176#Comment_11176</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11176#Comment_11176</guid>
		<pubDate>Thu, 30 Jul 2009 16:07:49 +0000</pubDate>
		<author>joshua.s.belanger</author>
		<description>
			<![CDATA[Didn't help :/<br /><br />I even completely deleted everything from my page but the plogger stuff...<br /><br />&lt;?php require(&quot;pics/gallery.php&quot;); ?&gt;<br />&lt;html&gt;<br />&lt;head&gt;<br />&lt;?php the_plogger_head(); ?&gt;<br />&lt;/head&gt;<br /><br />&lt;body&gt;<br />&lt;?php the_plogger_gallery(); ?&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /><br /><br />and I still get the same error. I can also go into the plog-functions to plogger_get_form_token and change this line:<br />	return '&lt;input type=&quot;hidden&quot; name=&quot;plogger-token&quot; value=&quot;'.$token.'&quot; /&gt;'.&quot;\n&quot;;<br />to<br />	return '&lt;input type=&quot;text&quot; name=&quot;plogger-token&quot; value=&quot;'.$token.'&quot; /&gt;'.&quot;\n&quot;;<br /><br />and I see a token being generated. It's like it doesn't know how to get the variable for some reason when it asks for plogger-token.]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11181#Comment_11181</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11181#Comment_11181</guid>
		<pubDate>Thu, 30 Jul 2009 19:33:59 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[Okay, I just tested on my server and received the same error.  The only thing I can think of is that the session_start is being called from different locations on the server (the first from the root folder with photos.php and the second from plog-comment.php).  I don't know why this is an issue as I swear I've used this in scripts in the past.<br /><br />However, I was able to get it to work correctly by opening plog-globals.php and adding the <strong >session_name('Plogger'</strong>) code as seen below (should be around lines 37-44(5)):<br /><code >// Start the session<br />if (!headers_sent() &amp;&amp; !session_id()) {<br />	// Set the session.save_path if user defined in plog-config<br />	if (defined('PLOGGER_SESSION_SAVE_PATH') &amp;&amp; PLOGGER_SESSION_SAVE_PATH != '') {<br />		session_save_path(PLOGGER_SESSION_SAVE_PATH);<br />	}<br />	session_name('Plogger');<br />	session_start();<br />}</code><br /><br />ETA:  Here's another code that also seems to work by defining the session.cookie_domain (which may be better than session_name) and only falls back on the generic session_name if the $_SERVER['SERVER_NAME'] variable is not set:<br /><code >// Start the session<br />if (!headers_sent() &amp;&amp; !session_id()) {<br />	// Set the session.save_path if user defined in plog-config<br />	if (defined('PLOGGER_SESSION_SAVE_PATH') &amp;&amp; PLOGGER_SESSION_SAVE_PATH != '') {<br />		session_save_path(PLOGGER_SESSION_SAVE_PATH);<br />	}<br />	// Set the session.cookie_domain if not already set<br />	if (!ini_get('session.cookie_domain')) {<br />		// To clear up any embed issues we set the cookie domain to the SERVER_NAME (if set)<br />		if (isset($_SERVER['SERVER_NAME'])) {<br />			$server_name = @ini_set(&quot;session.cookie_domain&quot;, $_SERVER['SERVER_NAME']);<br />		} else {<br />			$server_name = false;<br />		}<br />		// Otherwise, we just create a generic session name<br />		if ($server_name === false) {<br />			session_name('Plogger');<br />		}<br /> }<br />	session_start();<br />}</code>]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11188#Comment_11188</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11188#Comment_11188</guid>
		<pubDate>Fri, 31 Jul 2009 13:45:33 +0000</pubDate>
		<author>joshua.s.belanger</author>
		<description>
			<![CDATA[Well, still not working. I tried both things. Do I need to also change something else?]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11189#Comment_11189</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11189#Comment_11189</guid>
		<pubDate>Fri, 31 Jul 2009 15:36:28 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[You can try hard-coding it in like this:<br /><code >// Start the session<br />if (!headers_sent() &amp;&amp; !session_id()) {<br />	// Set the session.save_path if user defined in plog-config<br />	if (defined('PLOGGER_SESSION_SAVE_PATH') &amp;&amp; PLOGGER_SESSION_SAVE_PATH != '') {<br />		session_save_path(PLOGGER_SESSION_SAVE_PATH);<br />	}<br />	ini_set('session.cookie_domain', '.northlakesfireandrescue.org');<br />	session_start();<br />}</code><br /><br />Let me know if that's still causing issues.]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11190#Comment_11190</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11190#Comment_11190</guid>
		<pubDate>Fri, 31 Jul 2009 15:43:23 +0000</pubDate>
		<author>joshua.s.belanger</author>
		<description>
			<![CDATA[Still nothing.<br /><br />I cheated it. In plog-comments I deleted:<br /><code >	if (isset($_POST['plogger-token']) &amp;&amp; $_POST['plogger-token'] === $_SESSION['plogger-token']) { </code><br /><br />along with the end bracket and the else statement:<br /><code >} else {<br />		// Missing form token<br />		$errors = array(plog_tr('Spam token missing or does not match!'));<br />	}</code><br /><br />This allows me to post comments. I have the comments set to admin approve only so spam in the comments won't be a issue, I will just have to sort it out in the approve thing. The last thing I had to do was to fix the redirect so it would go back to my photos.php. I did that by changing the last line:<br /><code >header('Location: '.$redirect);</code><br />to<br /><code >header('Location: http://www.northlakesfireandrescue.org/beta/photos.php?level=picture&amp;id='.$parent_id);</code>]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11191#Comment_11191</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11191#Comment_11191</guid>
		<pubDate>Fri, 31 Jul 2009 18:32:55 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[That works too! :D  However, just to let you know that was in place to keep spammers from flooding your comments by submitting a form not located on your server.<br /><br />Also, if you want to redirect back to the same page, you can hard-code that in or you can use a hidden redirect input (see the example themes included in Plogger).  Those should work to redirect back to the page you were commenting on.]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11202#Comment_11202</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11202#Comment_11202</guid>
		<pubDate>Sun, 02 Aug 2009 12:53:20 +0000</pubDate>
		<author>supertelugu</author>
		<description>
			<![CDATA[Hello sid <br />me too facing problems with posting comments in my gallery..<br />when i try to post a comment error displays 'Comment did not post! Please fill in required fields.'(even though i filled all the fields)<br />i changed it from moderated to public but no use.<br />i also changed code in plog-globals.php and added session name but still not working<br /><br />url of my gallery<a href="http://www.supertelugu.com/gallery/" > http://www.supertelugu.com/gallery/</a><br /><br />waiting for ur help]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11211#Comment_11211</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11211#Comment_11211</guid>
		<pubDate>Tue, 04 Aug 2009 01:18:07 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[Alright, this may work, so I'll need some other people willing to test (hopefully some of you can help me out).  It works on my server, but so does just declaring the session_name().<br /><br /><code >// Start the session<br />if (!headers_sent() &amp;&amp; !session_id()) {<br />	// Set the session.save_path if user defined in plog-config<br />	if (defined('PLOGGER_SESSION_SAVE_PATH') &amp;&amp; PLOGGER_SESSION_SAVE_PATH != '') {<br />		session_save_path(PLOGGER_SESSION_SAVE_PATH);<br />	}<br />	session_name('Plogger');<br />	session_set_cookie_params(0, '\', $_SERVER['SERVER_NAME']);<br />	session_start();<br />}</code>]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11219#Comment_11219</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11219#Comment_11219</guid>
		<pubDate>Tue, 04 Aug 2009 14:30:54 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[Just to double-check as well, what .zip extraction software are you using after downloading the SVN trunk?  WinZip?  WinRAR?  7-ZIP? Built-in Windows .ZIP extractor?]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11223#Comment_11223</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11223#Comment_11223</guid>
		<pubDate>Tue, 04 Aug 2009 16:51:43 +0000</pubDate>
		<author>Nanflexal</author>
		<description>
			<![CDATA[i have the same problem, i can't add comment<br /><br />pleaase take a look.  Thanks<br />http://picture.adamos.org/plog-comment.php?level=picture&amp;id=0]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11224#Comment_11224</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11224#Comment_11224</guid>
		<pubDate>Tue, 04 Aug 2009 16:57:58 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[Nanflexal,<br /><br />It looks like you are missing the code <code >&lt;?php echo plogger_get_form_token(); ?&gt;</code> from your comments.php file.  You need to include this between the &lt;form&gt; and &lt;/form&gt; elements if you are upgrading and using an old theme file (this is displayed if you go to your Admin -> Themes tab).  This should clear things up for you.<br /><br />Also, if you are using an old theme that has the whole comment form code wrapped in quotes with a "print" function before it, you will need to add <code >'.plogger_get_form_token().'</code> instead (assuming that the quotes are single quotes and not double quotes).<br /><br />An example from the old default theme comments.php file should look like this:<br /><code >print  '&lt;a name=&quot;comment-post&quot;&gt;&lt;/a&gt;&lt;h2 class=&quot;comment-heading&quot;&gt;Post a comment:&lt;/h2&gt;<br />		      &lt;form action=&quot;' . $config[&quot;gallery_url&quot;] . 'plog-comment.php&quot; method=&quot;post&quot; id=&quot;commentform&quot;&gt;<br />		      &lt;p&gt;<br />			&lt;input type=&quot;text&quot; name=&quot;author&quot; id=&quot;author&quot; class=&quot;textarea&quot; value=&quot;&quot; size=&quot;28&quot; tabindex=&quot;1&quot; /&gt;<br />			&lt;label for=&quot;author&quot;&gt;Name&lt;/label&gt; (required) &lt;input type=&quot;hidden&quot; name=&quot;comment_post_ID&quot; value=&quot;40&quot; /&gt;<br />			&lt;input type=&quot;hidden&quot; name=&quot;parent&quot; value=&quot;'.plogger_get_picture_id().'&quot; /&gt;<br />		      &lt;/p&gt;<br />		      &lt;p&gt;<br />			&lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&quot; size=&quot;28&quot; tabindex=&quot;2&quot; /&gt;<br />			&lt;label for=&quot;email&quot;&gt;E-mail&lt;/label&gt; (required, but not publicly displayed)<br />		      &lt;/p&gt;<br />		      &lt;p&gt;<br />			&lt;input type=&quot;text&quot; name=&quot;url&quot; id=&quot;url&quot; value=&quot;&quot; size=&quot;28&quot; tabindex=&quot;3&quot; /&gt;<br />			&lt;label for=&quot;url&quot;&gt;Your Website (optional)&lt;/label&gt;<br />		      &lt;/p&gt;<br />		      &lt;p&gt;<br />			&lt;label for=&quot;comment&quot;&gt;Your Comment&lt;/label&gt;<br />			&lt;br /&gt;&lt;textarea name=&quot;comment&quot; id=&quot;comment&quot; cols=&quot;70&quot; rows=&quot;4&quot; tabindex=&quot;4&quot;&gt;&lt;/textarea&gt;<br />		      &lt;/p&gt;<br />		      &lt;p&gt;<br />			&lt;input class=&quot;submit&quot; name=&quot;submit&quot; type=&quot;submit&quot; tabindex=&quot;5&quot; value=&quot;Post Comment!&quot; /&gt;<br />		      &lt;/p&gt;<br />		      '.plogger_get_form_token().'<br />		      &lt;/form&gt;';</code>]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11372#Comment_11372</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11372#Comment_11372</guid>
		<pubDate>Tue, 15 Sep 2009 18:28:55 +0000</pubDate>
		<author>becket</author>
		<description>
			<![CDATA[Hi sidtheduck !<br /><br />I have the same problem on http://www.gdvteam.com/motos/galeries.php?level=picture&amp;id=12.<br /><br />I have tried change the start session part, but nothing change (now plog-global.php is back to default). <br /><br />Thank you for your help !!<br /><br />ps: I use winrar.]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11549#Comment_11549</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=11549#Comment_11549</guid>
		<pubDate>Thu, 22 Oct 2009 18:11:57 +0000</pubDate>
		<author>sidtheduck</author>
		<description>
			<![CDATA[<blockquote ><cite >Posted By: sidtheduck</cite>Okay, I just tested on my server and received the same error.  The only thing I can think of is that the session_start is being called from different locations on the server (the first from the root folder with photos.php and the second from plog-comment.php).  I don't know why this is an issue as I swear I've used this in scripts in the past.</blockquote>I think I finally have a solution to this.  I was running into issues within an embedded gallery, but only ON THE FIRST ATTEMPT.  After I received the error, I was able to successfully post a comment.<br /><br />The reason I found was the redirect rules in the Plogger .htaccess, most notably forcing a trailing slash and/or the leading 'www'.  I was accessing the indexed page as http://mysite.com/embed-test.php which was then being sent to http://mysite.com/plogger/plog-comment.php to process the comment form.  However, the redirect rules came into effect then and redirected to http://<strong >www.</strong>mysite.com/plogger/plog-comment.php which reset the session ID since PHP thinks <em >www.mysite.com</em> and <em >mysite.com</em> are different domains (one with www. and the other without).  Because it resets the session_id, there is no form_token session variable anymore and throws an error.  It works the second time, because plog-comment.php redirects back to the image page with the leading 'www.' added, so it works when you send the form again.<br /><br />Moral of the story, do 1 of 3 things:<br />1. Make sure all of your links to embedded galleries match the domain structure (www or non-www) that is set in your Admin -> Options -> Gallery URL setting.<br />2. Have the 'www' and/or trailing slash forced in your root directory .htaccess file, not just in the Plogger directory.<br />3. Completely remove the 'www' and/or trailing slash rewrite rules in your Plogger .htaccess file (you will most likely have to change your permissions on your .htaccess file to read only as saving any Admin -> Options will rewrite the rules if the .htaccess has write access).<br /><br />Hope that helps some people!]]>
		</description>
	</item>
	<item>
		<title>Comments not working correctly</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=14023#Comment_14023</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=2814&amp;Focus=14023#Comment_14023</guid>
		<pubDate>Tue, 04 Oct 2011 01:40:45 +0000</pubDate>
		<author>inters0911</author>
		<description>
			<![CDATA[If anyone get the solution  for the above issue.let me know also.please..<a href="http://www.intersalto.com" >diseņo web navarra</a>]]>
		</description>
	</item>
	
		</channel>
	</rss>