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

commentics and subdomain problem

Hi everybody,

First, Thanks for this comment system. it's very nice.

My problem is, i have install commentics on my web site. and it's work perfectly.

i have a lot of subdomain like:

the problem is the script doesn't work at this url ( but it's work with the url

if i call the page by my subdomain name, it doesn't work. the page stop loading after the lorem ipsum <br/>.

How can i resolve that ??

i put the code like the instruction:

$cmtx_page_id = "56";
$cmtx_reference = "Page 56";
$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

thanks for your help.

Is there a solution aviable now? Habe the exact same problem. The Script works fine ( but not on any subdomain ( Still get a error "Access Denied." when i include commentics on my mobile subdomain:

Quote:require '/www/htdocs/path/to/commentics/includes/commentics.php';

Any ideas?

The Files are on the same phisical server.

I think the issue that the original poster had was that their "require" wasn't pointing to where the commentics.php file was. It was likely resulting in a fatal error but their server probably wasn't displaying the error.

With yours it seems like it's requiring the file successfully, because it's showing the "Access Denied" message which is from the commentics.php file. However it looks like the PHP variable $cmtx_path isn't set which is why it's showing that message. Maybe you removed that variable from the integration code?

Have you completed the interview?

You where right Smile

This works fine:

PHP Code:
$cmtx_path ''/www/htdocs/path/to/commentics/';
require $cmtx_path.'
includes/commentics.php'; //don't edit this line 


Ok Back again Big Grin

Found the subdomain-issue today again. the commentics.php is includet fine. The boxes are already there. But without css an javascript. the sourcecode showed me the issues. all pathes are wrong. the files are not existant on my subdomain so the script cant find them under




so i need to change the urls to



is there a function? do i have to copy them? whats the best solution?

In /upload/includes/functions/page.php, try replacing this (two instances, lines 778 and 793):

PHP Code:

With this:

PHP Code: 

Have you completed the interview?

Hey Steven, thats exactly what i have looked for. works finde for me. the last problem is about the submit button. now i will be redirected to the main-domain because of the cmtx_commentics_url() and cmtx_current_page() function. especially in the case when the script generates an error - the user on the subdomain can't read the errors because he will directly to the main domain.

can i use an iframe instead?

Sorry I thought I had already replied to this. If you undo what I suggested and then edit the links to the JavaScript and CSS files in /upload/includes/template/head.php to point to your main domain then I think it should fix it. I'm going to test the use of subdomains more thoroughly for the next version.

Have you completed the interview?

Hey Steven, no problem Wink

i solved the problem in a other way. added some code to the /comments/include/template/form.php

PHP Code:
if ((strtolower($_SERVER['HTTP_HOST'])) == '') {
<form name="commentics" id="commentics" class="cmtx_form" action="<?php echo cmtx_url_encode(cmtx_url_decode(''.$_SERVER['REQUEST_URI'])).CMTX_ANCHOR_FORM?>" method="post">
<?php } else { ?>
<form name="commentics" id="commentics" class="cmtx_form" action="<?php echo cmtx_url_encode(cmtx_url_decode(''.$_SERVER['REQUEST_URI'])).CMTX_ANCHOR_FORM?>" method="post">
<?php ?>

That works fine too.

I will test your solution too, thx   Smile

Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by kbadmin
28-May-2019, 07:16 PM
Last Post by daniel
20-Jan-2017, 06:32 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)