achingbrain / achingbrain/php5-akismet

no exception when a tiMe out occurs

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
122
Forks
18
PR merge metrics
No merged PRs in 30d

Description

hi

I use your class php5-akismet with a hoMe Made plugin for zenphoto.
soMetiMes, I have this error in My log

fsockopen() [function.fsockopen]: unable to connect to c8aac5f27f47.rest.akismet.com:80 (Connection timed out) in /home/xxxx/public_html/zenphoto/zp-core/zp-extensions/spamfilters/akismet_php5.php on line 518

as far I understand, there is no exception when a tiMeout occurs during connexion to akisMet server.

in that case, fsockopen seeMs to returns false, with errno=0. so there is no exception generated line 364.
it seeMs to be an issue in you akisMet class

you can have a look on php doc for fsockopen function
http://www.php.net/manual/en/function.fsockopen.php

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with akismet_php5.php at lines 364 and 518, then review how fsockopen handles a connection timeout and a false return with errno 0. Confirm the timeout path and ensure the Akismet class handles it consistently rather than missing the failure; verify the resulting behavior against the reported log message.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.