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

Magic quotes detection
#1

Install Magic Quotes detection
--------------------------------------------

1. Magic Quotes install test, http:domain/comments/installer/ , passes as True:

Pass
Magic Quotes is disabled

2. phpinfo() shows next configuration:

magic_quotes_gpc On
magic_quotes_runtime Off
magic_quotes_sybase Off

Questions:
- can this configuration cause any problems
- is detection showing correct status?

I'm asking because of problems while adding new comment. I'm getting 'Could not open socket' response and I can not find a way to trace or locate problem.

But simple database writes are working well. I can normaly vote for a comment. Database parameters are correct and writing is possible in simple cases.

I've tried:
- changed mysql_connect to mysql_pconnect
- disabled parts of code, where Curl is used
- added PHP code to disable magic_quotes
- all javascript code removed - blank page with comments on left.

thank you!

lp, stariocek
Reply
#2

The 'Could not open socket' error is usually related to ReCaptcha.

What did the Installer say about fsockopen being enabled?

Have you completed the interview?
Reply
#3

fsockopen is enabled
Pass

Please excuse me. I must correct myself. I've mixed everything, statuses and needs. Please see screenshot for correct data about install prerequests status.

lp, stariocek


Attached Files Thumbnail(s)
   
Reply
#4

Okay. I'm not sure why the checks are displayed like that. It might be that the width needs to be bigger in /comments/installer/css/stylesheet.css:

Code:
label.system_item {
float: left;
width: 190px;
}

I think the 'Could not open socket' error is coming from /comments/includes/recaptcha/recaptchalib.php, line 81:

PHP Code:
<?php 
if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
die (
'Could not open socket');
}

You have fsockopen enabled, so it must be something else which is wrong.

I'll try to find out the problem now.

Have you completed the interview?
Reply
#5

Couple of things you could try:

1. In recaptchalib.php, replace:

PHP Code:
<?php 
define
("RECAPTCHA_VERIFY_SERVER", "www.google.com");

With:

PHP Code:
<?php 
define
("RECAPTCHA_VERIFY_SERVER", gethostbyname("www.google.com"));

2. Ask your host if port 80 is open

Have you completed the interview?
Reply
#6

//define("RECAPTCHA_VERIFY_SERVER", "www.google.com");
define("RECAPTCHA_VERIFY_SERVER", gethostbyname("www.google.com"));

Oooo, yes it is! Big GrinBig GrinBig Grin It works!

What is wrong - why IP instead of url? I've tried next, returns TRUE ...

if (checkdnsrr('www.google.com'))
{
echo "TRUE, resolved" ;
}
else
{
echo "FALSE" ;
}

Thank you!

stariocek
Reply
#7

I'm glad that worked!

I'm not sure why it needs an IP Address instead of a URL.

I got the fix from here:
http://code.google.com/p/recaptcha/issues/detail?id=26

Have you completed the interview?
Reply
#8

Commentics 1.8 works normal on same server!

Comment 37 on http://code.google.com/p/recaptcha/issues/detail?id=26 says:

"... I solved it by closing the php code after recaptha section, then immediately reopening it!".

My hosting service provider is using Varnish. Who knows ... FYI only. I'm guessing ...

Thanks again!

lp, stariocek
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by stariocek
09-Jul-2012, 06:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)