Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: After php update mathcaptcha is not working anymore  (Read 476 times)

konga

  • Newbie
  • *
  • Karma: 0
  • Posts: 14
    • Naturschutz Seite
After php update mathcaptcha is not working anymore
« on: March 02, 2012, 01:48:54 PM »

Hi snews-Gurus,

my webspace provider changed recently from a quite old php4 version to php 5.2.11. Since then, for all snews sites I'm running it's impossible to log in again. I found out that the reason must be in mathcaptcha, as I just removed
"checkMathCaptcha() &&" from this line in default snews.php

   
Code: [Select]
if (checkMathCaptcha() && md5($user) === s('username') && md5($pass) === s('password')) {
and afterwards, it could log in again. So my feeling is that php5 is parsing the checkMathCaptcha function somehow different to older php version... Could one of you guys have a look into it? 

If it helps: I also changed default snews mathCaptcha function to the one done by Matt:
http://www.mdj.us/snews-cms/hacks-mods/image-math-hybrid-captcha-version-2-vastly-improved/

But no luck. So it might be just the checkMathCaptcha function, which causes my problem?

Any help is appreciated; let me know if you need more information.
Logged

konga

  • Newbie
  • *
  • Karma: 0
  • Posts: 14
    • Naturschutz Seite
Re: After php update mathcaptcha is not working anymore
« Reply #1 on: April 11, 2012, 11:56:02 AM »

No one else with the same issue? I checked it on all websites I'm using, always the same. But it's the same server anyway. I'm going to try it on another server, as I'm pretty sure it's a server related issue. But unfortunately I have no clue how to find out...
Logged

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
Re: After php update mathcaptcha is not working anymore
« Reply #2 on: April 11, 2012, 02:22:24 PM »

no issue login with checkMathCaptcha,
try looking in the error logs for the server.

konga

  • Newbie
  • *
  • Karma: 0
  • Posts: 14
    • Naturschutz Seite
Re: After php update mathcaptcha is not working anymore
« Reply #3 on: April 17, 2012, 02:19:02 PM »

Looks like a session issue:
[Tue Apr 17 12:46:35 2012] [error] [client 212.x.x.x] PHP Notice:  A session had already been started - ignoring session_start() in /srv/www/vhosts/cctv-digital.de/httpdocs/snews.php on line 11
[Tue Apr 17 12:53:12 2012] [error] [client 208.x.x.x] PHP Notice:  A session had already been started - ignoring session_start() in /srv/www/vhosts/cctv-digital.de/httpdocs/snews.php on line 11
[Tue Apr 17 13:06:06 2012] [error] [client 139.x.x.x] PHP Notice:  A session had already been started - ignoring session_start() in /srv/www/vhosts/cctv-digital.de/httpdocs/snews.php on line 11
[Tue Apr 17 13:16:40 2012] [error] [client 212.x.x.x] PHP Notice:  A session had already been started - ignoring session_start() in /srv/www/vhosts/cctv-digital.de/httpdocs/snews.php on line 11
[Tue Apr 17 13:20:51 2012] [error] [client x.x.x] PHP Notice:  A session had already been started - ignoring session_start() in /srv/www/vhosts/cctv-digital.de/httpdocs/snews.php on line 11
[Tue Apr 17 13:38:16 2012] [error] [client 95.x.x.x] PHP Notice:  A session had already been started - ignoring session_start() in /srv/www/vhosts/cctv-digital.de/httpdocs/snews.php on line 11,
Logged

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
Re: After php update mathcaptcha is not working anymore
« Reply #4 on: April 17, 2012, 03:01:21 PM »

Could be a mod you installed that have session_start() in it ?
more info http://www.codingforums.com/showthread.php?t=118900
« Last Edit: April 17, 2012, 03:06:56 PM by mosh »
Logged

konga

  • Newbie
  • *
  • Karma: 0
  • Posts: 14
    • Naturschutz Seite
Re: After php update mathcaptcha is not working anymore
« Reply #5 on: April 17, 2012, 04:48:47 PM »

I guess I'm on the wrong track... I tested on domain hlutz.de with a fresh snews installation - no errors in log files. But still no success when I try to login. Still no errors in log. As stated in first post, If I remove
Code: [Select]
"checkMathCaptcha() &&" in snews.php, login works fine...

Also, I tested it on another server - snews works fine. So now I'm sure it's not a bug in snews but a wrong server setting... I tried also Magic quotes on and off, as well as php safe mode on and off - without success... Any ideas to help tracking this issue are welcomed.

Regards
Harald
Logged