"Session invalid" error when testing demo on my own server #3

Closed
opened 2 years ago by kromonos · 5 comments

I'm trying to deploy captcheck on my own server, but I only get following with the test.html:

Form fields:
array (
  'form_field' => '',
  'captcheck_selected_answer' => '7233eb672151bc45105b',
  'captcheck_session_code' => '000ac2f449df7750ab3498fe6a8ac152c406861e1da6066c6e4.42884292',
)

API request fields:
array (
  'session_id' => '000ac2f449df7750ab3498fe6a8ac152c406861e1da6066c6e4.42884292',
  'answer_id' => '7233eb672151bc45105b',
  'action' => 'verify',
)

API response (JSON):
{
    "session": "000ac2f449df7750ab3498fe6a8ac152c406861e1da6066c6e4.42884292",
    "result": false,
    "msg": "Session invalid."
}

CAPTCHA did not verify: Session invalid.

First I thought it was because of MySQL 8, but I've same issue with MySQL 5.7 and MariaDB 10 with PHP 7.4 FPM. The session id was successfully written into the session table and can be found when searched manually in the database.

I'm trying to deploy captcheck on my own server, but I only get following with the `test.html`: ``` Form fields: array ( 'form_field' => '', 'captcheck_selected_answer' => '7233eb672151bc45105b', 'captcheck_session_code' => '000ac2f449df7750ab3498fe6a8ac152c406861e1da6066c6e4.42884292', ) API request fields: array ( 'session_id' => '000ac2f449df7750ab3498fe6a8ac152c406861e1da6066c6e4.42884292', 'answer_id' => '7233eb672151bc45105b', 'action' => 'verify', ) API response (JSON): { "session": "000ac2f449df7750ab3498fe6a8ac152c406861e1da6066c6e4.42884292", "result": false, "msg": "Session invalid." } CAPTCHA did not verify: Session invalid. ``` First I thought it was because of MySQL 8, but I've same issue with MySQL 5.7 and MariaDB 10 with PHP 7.4 FPM. The session id was successfully written into the session table and can be found when searched manually in the database.
Owner

If you're playing with the test/sample code, test.php needs the correct API url too, or it'll try to validate your form against my server instead of yours! :)

https://source.netsyms.com/Netsyms/Captcheck/src/branch/master/test.php#L5

If you're playing with the test/sample code, `test.php` needs the correct API url too, or it'll try to validate your form against my server instead of yours! :) https://source.netsyms.com/Netsyms/Captcheck/src/branch/master/test.php#L5
skylarmt closed this issue 2 years ago
skylarmt added the
question
label 2 years ago
skylarmt changed title from Trying to deploy to "Session invalid" error when testing demo on my own server 2 years ago
Poster

The API url is correctly set. You can find the installation at https://captcha.bka.li

The API url is correctly set. You can find the installation at https://captcha.bka.li
Owner

Check your test.php as I said. It's trying to validate the submitted captcha against captcheck.netsyms.com instead of your server. I can see it in the HTTP access logs for captcheck.netsyms.com.

Your captcheck.js is fine though.

Check your `test.php` as I said. It's trying to validate the submitted captcha against captcheck.netsyms.com instead of your server. I can see it in the HTTP access logs for captcheck.netsyms.com. Your captcheck.js is fine though.
Poster

oh damn. Thanks for the hint. I totally forgot about the URL in test.php.

Edit: Even after your first hint ?

oh damn. Thanks for the hint. I totally forgot about the URL in `test.php`. Edit: Even after your first hint ?
Owner

No problem :)

No problem :)
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Netsyms/Captcheck#3
Loading…
There is no content yet.