This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

No comments form appears despite many avenues explored...
#1

Hello-- After much ado, I've gotten to the point where I can access the Commentics admin panel on the server. I've pretty thoroughly perused previous forum threads about this problem; have checked with my web host to ensure that all parameters needed are in their configuration; have gone over and over the 3 webpage codings necessary... to no avail - no form shows up on the one page I've put the codes into (in the right places, I would swear).

[My WYSIWYG editor (BlueGriffon) refuses to save the pre-<!DOCTYPE html> code, drat it - but I added it to the page via my cPanel editor - and will presumably have to do this every single time I update this page, which I expect to do often - aargh! The editor likewise will not allow the stacked-lines php coding - keeps running it all together on one line, no matter what I think of to try - but I've repaired -that- in the cPanel editor too... just in case that was quirking things up.]

I've added the "AddHandler" coding to an .htaccess file in /public_html/, which the /comments/ directory is under - have tried -both- versions given in your "Integration" documentation under "HTML Pages". Your documentation doesn't tell explicitly how to structure this file, so I just put that line like this (copying the example):
# secure .htaccess files
<Files .htaccess>
AddHandler x-httpd-php5-cgi .html .htm .shtml
</Files>
(I really wanted to add ".xhtml" to the end of that string ;^) - rather, I did...and then I took it out again, -just in case-!)

Still, I've even tried renaming the page (ideas.html) to ideas.php - but when I then typed the page URL into my browser, it merely showed a blank white screen instead of the full-of-stuff page. ??

I've also tried putting the "../" before "comments/", in case I was misinterpreting your statements about files being "in a directory" (because your definition of "root" as "public_html" was different from my understanding, so who knows)... But as this didn't change anything, I took those back out again.

One trouble may be that there are so many interrelated bits and pieces, I may have not truly scientifically tested every possibility, or had -2- things out of whack at once... If the mistake lies there, I'm sorry - I truly didn't want to have to bother you with this. (Have already spent a few days going back and forth with my webhost to get to the point of accessing the admin panel - darn, I thought I was home free! But, during that painful episode, I checked and rechecked all those files - so hopefully they're all there and okay. In any case, the admin panel is still working.)

I wondered whether there could be a -conflict- between the -2- meta-http-equiv lines that are now in this page:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../comments/css/stylesheet.css" />
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
The second one was already there, and your documentation doesn't mention that situation, so there are now both. (I believe I even did try removing it, though at this point I wouldn't swear to that one.)

Do you have an inkling of what is holding this up? (I'm not a coder - big surprise.) The URL is www.weekendofnoblame.info/ideas.html

Thank you so much for your help!
Reply
#2

Hi sherry,

If you look at the source code of your page, it shows these two parts:

Code:
<?php
session_start();
ob_start();
?>

Code:
<?php
$cmtx_page_id = '1';
$cmtx_reference = 'Great Ideas for the Weekend of No Blame';          
$cmtx_topic = 'Great Ideas!'          
$cmtx_path = 'comments/';          
define('IN_COMMENTICS', 'true'); //no need to edit this line          
require $cmtx_path . 'includes/commentics.php'; //no need to edit this line          
?>

This indicates that the PHP code isn't being executed. I think your "AddHandler" code needs adjusting, as I can see at least one issue with it. Using the "<Files .htaccess>" command is instructing the server to apply the AddHandler command afterwards to only .htaccess files, when you actually want it to apply to the files .html .htm .shtml. I understand why you did this, because the documentation points to this an an example, but the intention was to show an example .htaccess file rather than example .htaccess code. If you remove the "<Files .htaccess>" line and the "</Files>" line so you just have the AddHandler line then it should work.

When you renamed the file extension from .html to .php I would have expected it to work. It may be that there's a PHP error somewhere which is causing the blank white screen.

Try adding the following two lines to the very top of your page, so it's like this:

@error_reporting(-1); //show every possible error
@ini_set('display_errors', 1); //display errors

<?php
session_start();
ob_start();
?>

If there's still a blank white screen then check your server's error log.

Have you completed the interview?
Reply
#3

Steven, thank you so much for the engagement! - though I can't say that I've gotten farther along with this yet...

I changed the .htaccess file as you mentioned, to simply say "# secure .htaccess files" [new line] "AddHandler x-httpd-php5-cgi .html .htm .shtml" - didn't make a difference, either with the .html version or when I tried again changing it to .php. (Was I supposed to take out "# secure .htaccess files" too? - I just tried that... also didn't make a difference, sigh. I've put it back.)

I also added the 2 lines about errors to the top of the page... (When it was an .html page, those lines appeared at the top of the page online - urgh. It also made the footer jump up to overlay the middle of the page - ! But fine for a test. :^) This is what it says in my cPanel Error Log for today:

[Wed Apr 24 06:38:00 2013] [error] [client 86.150.107.204] File does not exist: /home/weekendo/public_html/404.shtml
[Wed Apr 24 06:38:00 2013] [error] [client 86.150.107.204] File does not exist: /home/weekendo/public_html/favicon.ico
[Wed Apr 24 02:51:25 2013] [error] [client 193.189.160.24] File does not exist: /home/weekendo/public_html/404.shtml, referer: http://www.weekendofnoblame.info/ideas.html
[Wed Apr 24 02:51:25 2013] [error] [client 193.189.160.24] File does not exist: /home/weekendo/public_html/favicon.ico, referer: http://www.weekendofnoblame.info/ideas.html

...The earlier 2 lines were from when it was .html, the later ones presumably from when it was .php. I finally found a "favicon.ico" file in /comments/admin/table/images/ [I ended up fascinatedly looking through -all- the Commentics files... oh my God! - so -that's- what is entailed in script programming... incredible! - I bow to you], but there isn't one directly under /public_html/ - ?? (Clearly, I don't know how to interpret the error log.) Interestingly, trying the page after deleting the "# secure..." from the .htaccess file didn't add to the errors list, even though it certainly was "wrong".

One thing I found out: I'd left the AddHandler line from yesterday's last try at the alternate "AddHandler x-httpd-php5-cgi..." When I last turned the page back into an .html file, -the page was blank-. When I tried reusing the first "AddHandler application/x-httpd-php5...", it reverted to the full screen. ...Does that happen to tell you something that provides a clue to this problem?

And then I was wondering: Did the fact that I employed -both- your solutions at once - extra php code at top of page when I also tried changing the page to .php - mean that they were fighting each other? ...Apparently not, because when I tried deleting that coding and then renaming the file to .php, the same blank screen resulted. So once again, I put everything back.)

I can't think of anything else to try... I so hope you can! So near yet so far...
Reply
#4

The "# secure .htaccess files" line is just a .htaccess comment so it doesn't make any difference whether it's there or not, but best to remove it as it serves no purpose.

Sorry, it should have been this at the top of your page:

<?php
@error_reporting(-1); //show every possible error
@ini_set('display_errors', 1); //display errors

session_start();
ob_start();
?>

(Note that the <?php tag is now at the top.)

Unfortunately the error log doesn't show anything helpful.

Instead of trying to figure out the correct 'AddHandler' line to use for ideas.html, it would be better to focus on getting ideas.php to work first.

Can you change ideas.html to ideas.php again and post a link to it here. Keep an original of ideas.html where it is so that your visitors won't notice any difference. Just to clarify, you could do this by downloading ideas.html to your computer using your FTP software, changing its file extension to .php, and uploading it back to the site.

Add the 2 lines about errors to the top of ideas.php, but as above with the <?php tag at the top.

Have you completed the interview?
Reply
#5

Yes, I've made the correction and have both .php and .html files up. PHP = http://www.weekendofnoblame.info/ideas.php
Thanks!
Reply
#6

What happens if you remove the whole section of code from the top of the page:

<?php
@error_reporting(-1); //show every possible error
@ini_set('display_errors', 1); //display errors
session_start();
ob_start();
?>

Have you completed the interview?
Reply
#7

I think I had tried that - it still just shows a blank white screen, sorry to say.
Reply
#8

Afterthought: Also, I tried removing the 2 other scripts on the page (LoveClaw and ShareThis)... but that didn't help either - so I put them back again. Ah well!
Reply
#9

I think you need to get your host involved. This isn't really an issue with Commentics, but rather that your server isn't able to handle some basic PHP code. As the host, they can look at your files and examine your server logs to fix the issue far quicker than I can from a public forum.

Have you completed the interview?
Reply
#10

(25-Apr-2013, 11:41 AM)Steven Wrote:  I think you need to get your host involved. This isn't really an issue with Commentics, but rather that your server isn't able to handle some basic PHP code. As the host, they can look at your files and examine your server logs to fix the issue far quicker than I can from a public forum.

Steven, thank you-- I asked them to read this thread and then see if they could find out what's wrong at the server end. The reply I received was that it appears to be a scripting issue on or around line 182 ("PHP Parse error: syntax error, unexpected T_VARIABLE in /home/weekendo/public_html/ideas.php on line 182")... which is this:
$cmtx_path = 'comments/';

...So I tried it as './comments/' - and it works. YAY!!! (and oh for heaven's sake... the one combination not tried, -with the php file-; major lesson: I should have used a spreadsheet to keep track of them all). And so I apologize - and thank you again for your time. (I would have preferred to keep the html page, and it would be nice to know why it won't work... but forget it! - this does.)

[I wish I could say that everything about the form works as planned... various things don't show up (Terms & Cond. page, social button graphics), and using apostrophes or quotes results in "\\\" added before them, Topic isn't as I'd input) - but I will diligently search out the details on the forum.]

Meanwhile, it looks very, very nice! - and it does work. :^) Many blessings.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
29-Jul-2020, 08:34 AM
Last Post by MattyP
13-Apr-2020, 08:33 PM
Last Post by Steven
23-Apr-2019, 09:22 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)