Trouble posting comments with captchas enabled on Mac

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
robw
Regular
Posts: 20
Joined: Thu Mar 30, 2006 3:05 pm
Contact:

Post by robw »

I am seeing the same issue with captchas on Safari. Spamblock log shows:

Code: Select all

?	1151546815	REJECTED	Invalid captcha (Entered: 9bfqr, Expected: )	1	martin	me@email.com	www.somesite.com	Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) Apple...	82.34.120.181	http://www.heidiandrob.com/blog/	test
As previous poster mentioned, the log shows that expected captcha as blank. Again, using spamblock 1.51

Cheers
Rob
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Was that safari browser using Cookies? If "Expected:" is empty this usually means that the browser did not have a valid PHP session, which can happen if no cookies were accepted.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robw
Regular
Posts: 20
Joined: Thu Mar 30, 2006 3:05 pm
Contact:

Post by robw »

Hi Garvin,

Safari shows a cookie set - PHPSESSID - and remembers other cookie related info (such as if you are signed in as admin).

Cheers
Rob
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

In fact this seems to be a non-working PHP session site. To verify try this:

1. Log into the blog. Do NOT check the "remember me" function for the admin.
2. Go to the "new entry" page. If you are now not logged in it means your server is NOT storing the session, and instead creating a new session everytime.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robw
Regular
Posts: 20
Joined: Thu Mar 30, 2006 3:05 pm
Contact:

Post by robw »

Hi Garvin,

I tried this on my heidiandrob site, and I stay logged in just fine, even after deleting all the cookies for the site, closing the browser, and starting again.

If I have logged in, I can go to the new entry page, as well as going to the main blog, where I have the admin 'edit entry' option. So, looks like no issue with the PHP sessions?

Cheers
Rob
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, I would need to investigate this, but at least the PHP session values I can view with the LiveHTTP Headers extension in my browser change for every request. Changing PHP Session IDs usually only can mean cookie rejection or non-working PHP sessions on the server...

Might you be able to show me the output of a phpinfo() snippet on that server?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I Got it!

The captcha comes from a different domain, thus a different cookie.

Go to the blog's config and set "Autodetect HTTP-Host" to "true". Or change the blog Url to "www.heidiandrob.com". It currently points only to "heidandraob.com".

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robw
Regular
Posts: 20
Joined: Thu Mar 30, 2006 3:05 pm
Contact:

Post by robw »

Blimey, that was a good spot! I had competely overlooked this. You are absolutely right - I redirect the home page to the www version of the domain, but missed the www in the config. Fixing this in the config means that captchas work once again in Safari.

I thought it was strange that they worked fine in my other blogs, but not this one!

Thanks very much for your help!

Cheers
Rob
sorar
Regular
Posts: 12
Joined: Sat Oct 28, 2006 4:41 pm

Post by sorar »

Hi,

i do have exactly the same problem. But i already checked the session thing (i had some trouble with this before and now everyhting is working fine since i added

Code: Select all

 php_value session.use_cookies 1  
to my virtualhost of apache) and i enabled the autodetect http_host in my blog configuration.

when i look into my spamblock.log i see that the expected captcha is alwats blank.

it would be great if you could help me fix this.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Sorary!
when i look into my spamblock.log i see that the expected captcha is alwats blank.
What's the URL of your blog? And did you check the spamblocklog for normal comments or trackbacks?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
sorar
Regular
Posts: 12
Joined: Sat Oct 28, 2006 4:41 pm

Post by sorar »

the url is www.gedankendesigner.de (currently is disabled the captchas because without them it works).

i inserted the right and whole url (www....) in the serendipity configuration.

i just checked the spamblock.log for comments and it was always the same, some test users do report the same problem too.

thx for the reply :-)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Maybe you could temporarily enable the captchas so that I could see them and try some things?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
sorar
Regular
Posts: 12
Joined: Sat Oct 28, 2006 4:41 pm

Post by sorar »

i enabled them for you.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi sorar!

Your PHP server is not utilizing PHP cookie sessions. Can you check your phpinfo() output?

You should also note that if you login to your admin panel without checking the "Remember me" feature that you will be forced to login after every page request. This is a clear indicator of malconfigured PHP Sessions on the server.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
sorar
Regular
Posts: 12
Joined: Sat Oct 28, 2006 4:41 pm

Post by sorar »

Hi Mr. Hicking,

now i successfully solved the whole problem with the captchas and some other new problems. They all were caused by the often discussed cookie problem.

I found out that is not enough to enable the session.use_cookies when there running several different pages on one server.

It is my own server so i was able to edit php.ini and vhost etc.
I had in my php.ini another domain for session.cookie_domain than the blog is running on

so now i edited my vhost and added this:

Code: Select all

<VirtualHost *:80>

ServerName www.blogdomain.com
  <Directory "/path/to/serendipity/installation">
    AllowOverride All
        php_value session.use_cookies 1
        php_value session.cookie_domain blogdomain.com
  </Directory>

</VirtualHost>
this overrides the master option from the php.ini and adds a "local" value for the php module of the apache webserver.

because i found out that the .htaccess is overwritten if change some particular options in the admin panel so i added it to the vhost and this really works now. it solved the captchas problem and it also solved my problems when editing or submitting new entries that there was always a new login screen even dough in it worked in all other admin panel sections.

So i was able to configure and do anything i wanted to but when submitting an entry s9y always aksed me for the login.

so maybe you should add this to the FAQ or something like this because it is a really common problem i think.

but now i am happy :-)
Post Reply