Hope anybody could help me. I have a, in my opionion, strange problem. I have installed, modified plogger in 2 of my websites. The only thing I couldn't do is write comments.
If I use the view from the Adminpanel I could write! So the first thing to checked is how I included plogger. I use it with the url index.php?seite=bilder. So I tried different things but I couldn't find a solution. But the strange thing, on one of four Webserver the code works! In my opinion it is a problem of the Webserver. 3 Linux Server -> No comments. Windows IIS -> WORKS! Perhaps, PHP Version, but I don't think so?
Let's have a look:
I use for local tests WebServer2Go.
System Windows NT X61T 6.1 build 7600 ((null)) i586 Server API Apache PHP Version 5.3.2
Could not post comments...
First domain:
System Linux sh8-XX-server #1 SMP Wed Nov 24 09:30:54 UTC 2010 x86_64 Server API CGI/FastCGI PHP Version 5.2.17-0.dotdeb.0
No Comments...
Second Domain, different Provider:
System Linux XX #1 SMP Tue Mar 30 17:22:31 MSD 2010 i686 Server API Apache 2.0 Handler PHP Version 4.4.7-0.dotdeb.0
And now my Wondermachine:
System Windows NT X61T 6.1 build 7600 Server API CGI/FastCGI PHP Version 5.2.17 --> with IIS as Server
Not an Apache and look, it works!
4 Times, same Code but on one machine I could post comments. The code is almost the original from default theme.
Edit: I forgot tho say:
The Form links to plog-comment.php I suppose the problem is there. Here I have an Error:
<code><b>Notice</b>: Undefined index: parent in <b>D:\Users\Schdoi\Desktop\Web\Juca\pgalerie\plog-comment.php</b> on line <b>46</b><br /> </code>
This is here: <code> // Set up all the necessary variables 46: $parent_id = intval($_POST['parent']); 47: $author = $email = $url = $comment = '';</code>
I know some problems because of includes, so I copied the lines on the beginning of the php site. Before: <code>include_once(dirname(__FILE__).'/plog-load-config.php');</code> So I haven't this Error, but $parent_id is after this line still empty. $_POST['parent'] is always empty too. The same as on my IIS machine, but there it works...
Does anybody have an idea how I could solve my problem? Or how I best debug it?
The comments work on the view sight, so I don't think it's a problem with the server, it's a problem with the server and the included galerie (and my menu - GET vars) and a correct/incorrect interpretation of my code on the iis. but i can't find the mistake. I reckon, that the post vars redirect and parent are not properly transferred to post-comment.php and so the script doesn't know which picture for commenting.
EDIT: okay, i forgot that php error messages create outputs and result in header errors... --> But now, I tried to give "parent" the correct Id of the image I want to comment and even this does not work. this makes me crazy...
If I go from the admin panel to view: I have sometimes this message:
Spam token missing or does not match!
Then, if I click Comment the normal error Messages appear.
Perhaps the session helps:
plogger_sortby|s:4:"date";plogger_sortdir|s:3:"ASC";plogger_details|i:0;plogger-token|s:32:"6285fd3d96994d3f713cee302e953e18";comment_post_error|a:1:{i:0;s:37:"Spam token missing or does not match!";}plogger-form|a:4:{s:6:"author";s:0:"";s:5:"email";s:0:"";s:3:"url";s:0:"";s:7:"comment";s:0:"";}plogger-form-error|a:0:{}plogger_logged_in|b:1;
Could that be a problem? Because on my IIS Machine there is no Session Save Path. (By "show server info" from the admin panel) This is the only difference I found on the machines...
I was refering to chmod permissions. I wish I could hlep but I have no experience on anything but a mac server. My only suggestion would be on the IIS machine can you set up a LAMP stack? and see if that works?
I checked already the CHMOD rights and this wasn't helping.
The IIS is on my local machine, a LAMP Envorinment I only have online:
System Linux XX #1 SMP Tue Mar 30 17:22:31 MSD 2010 i686 Server API Apache 2.0 Handler PHP Version 4.4.7-0.dotdeb.0
But there is the same problem as local on Windows with Apache.
It is a problem on transferring the POST Vars to plog-comment.php. But I have absolutely no idea why. If I use the gallery alone (galerie/index.php) it works...
If you google save path and IIS this seems like a problem some other CMS like Joomla have run into and a wealth of information there. I would say give that a shot rather then me basically reposting whats in there discussions.
The problem is not the IIS, this is the only machine where my comments work. On IIS there is no Savepath and it works, on my Sites and my local Apache Server there is a Savepath and it doesn't work...
#$%$%$§#$§#§$§#§§$§ damn. I solved my problem. And it was sooooooo easy. And it was not the problem of plogger... I figured out, that on my Apaches the session was not working correctly. The Header was always sent. On Windows the session worked. So I found a thread on a other Forum which meant, (of course) that is a problem with Lines and Tabs and Outputs BEFORE the header was sent. (these facts know all who work/worked with sessions). So I looked through my php files and found no output and no whitespace or line before the php tag. then, tadaratatataaaaaa, I checked my index.php with a hex editor. And there were 3 chars BEFORE my <?php. Not seen in Texteditor, not seen on pages. But in the Hex Editor. Deleted the three chars and booom, my comments are working -.-
Great Galery script, thanks for it. Damn PHP and it's strange behaviors ^^
So, I had time to translate the pot in german. Hope it could helps someone: German Plogger Translation File There are few Sentences which were very hard to translate without knowing the correct syntax. And I am not good at Photography language. So the translations of the technical terms may not always be correct.