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

Commentics down my site
#1

Hi Steven, i today encounter a strange stuffs.

When i click Manage -> Page its keep loading and my site went down.

I don't know what is the issue, whenever i click page/comments edit it takes sometimes to load or today simply site went down till Commentic -> Manage -> Page timeout then my site is up again. You mind help me check ?
Reply
#2

Hi gongong,

How many pages do you have? Do you have a lot of pages without any comments?

What's your 'Limit Results' setting in 'Settings -> System'?

Do you know what your server's values are for 'memory_limit' and 'max_execution_time'?

Have you completed the interview?
Reply
#3

(21-Jan-2017, 04:59 PM)Steven Wrote:  Hi gongong,

How many pages do you have? Do you have a lot of pages without any comments?

What's your 'Limit Results' setting in 'Settings -> System'?

Do you know what your server's values are for 'memory_limit' and 'max_execution_time'?

I have alot of funny funny page name after switching..

Limit Results 1500.

I don't know, maybe you want help me take a look again? Because whenever i click Manage > Page, the site went down. Sad
Reply
#4

Sure, I don't mind taking a look, but your 'Limit Results' setting is extremely high. The default is only 15 but if you set it to 1500 then it's trying to load 1500 results onto one page which would understandably be too much data for a server to handle. Try changing it back to 15, or even 50, to see if it improves. If there's still a problem I'll take a look.

Have you completed the interview?
Reply
#5

(07-Feb-2017, 12:43 PM)Steven Wrote:  Sure, I don't mind taking a look, but your 'Limit Results' setting is extremely high. The default is only 15 but if you set it to 1500 then it's trying to load 1500 results onto one page which would understandably be too much data for a server to handle. Try changing it back to 15, or even 50, to see if it improves. If there's still a problem I'll take a look.

Ops Steven, sorry its 15 for limit result.

I will PM you my details, please help me take a look. Big Grin
Reply
#6

I've optimized the database query. It seems to load very quickly now.

Have you completed the interview?
Reply
#7

(08-Feb-2017, 09:13 PM)Steven Wrote:  I've optimized the database query. It seems to load very quickly now.

Hi Steven, thanks alot.

Anyway why it's seems so many unwanted pages?

index.phpwp-content/themes/weiwei_60
index.phpwp-content/uploads/2016/04/chunchun_39
index.phpwp-content/uploads/2015/10/yaoyao_93

media/logo_img
mobile/amanda_57
m/amanda_57
index.phpwp-content/uploads/2016/03/candy_16
zoominfoweb/qingqing_01
Reply
#8

That's because your website's .htaccess file has a rewrite rule which sends all of your traffic to your profile_details.php page where you've integrated Commentics. But the way that you've integrated Commentics means that your profile_details.php page gets the identifier from whatever it finds in the URL. I'll try to explain using an example:

Code:
RewriteRule (.*).php profile_details.php?pid=$1 [QSA]

The above is your rewrite rule. It means that if I visit your-domain.com/test123.php your server will serve the page your-domain.com/profile_details.php?pid=test123. The test123 part can be anything. In your profile_details.php file you've integrated Commentics like this:

Code:
$cmtx_identifier = $_REQUEST['pid'];

In the above example this gets test123 from the URL and supplies it to Commentics. Commentics then creates this page.

The solution is you need to validate $_REQUEST['pid'] before supplying it to Commentics. Make sure it's a valid profile first. Currently you're supplying Commentics with unwanted data.

Have you completed the interview?
Reply
#9

(09-Feb-2017, 10:30 PM)Steven Wrote:  That's because your website's .htaccess file has a rewrite rule which sends all of your traffic to your profile_details.php page where you've integrated Commentics. But the way that you've integrated Commentics means that your profile_details.php page gets the identifier from whatever it finds in the URL. I'll try to explain using an example:

Code:
RewriteRule (.*).php profile_details.php?pid=$1 [QSA]

The above is your rewrite rule. It means that if I visit your-domain.com/test123.php your server will serve the page your-domain.com/profile_details.php?pid=test123. The test123 part can be anything. In your profile_details.php file you've integrated Commentics like this:

Code:
$cmtx_identifier = $_REQUEST['pid'];

In the above example this gets test123 from the URL and supplies it to Commentics. Commentics then creates this page.

The solution is you need to validate $_REQUEST['pid'] before supplying it to Commentics. Make sure it's a valid profile first. Currently you're supplying Commentics with unwanted data.

Hi Steven,

Do you mind helping me as am a code idiot.

Anyway whenever now i click Edit Page to the profile, its hang or down the site. Sad
Reply
#10

Sure, I've added the validation for you. I clicked to edit a few of your pages and they all loaded very quickly for me.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
07-Jul-2015, 05:57 PM
Last Post by Steven
29-May-2015, 08:51 PM
Last Post by roger
14-Nov-2012, 10:48 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)