This is a placeholder, I'll update more information later... checking all places where fsockopen is used.

For now: fsockopen in common.inc could log the error to watchdog with more information about the parameters passed to drupal_http_request

The idea: report as much information as possible about the context of the error/notice ...than the one actually reported by PHP. fsockopen always report E_NOTICE when something goes wrong, but it also reports information that the programmer could use to try to draw more light into the cause of the issue.

Thoughts are welcome.

CommentFileSizeAuthor
#1 common.inc.patch-45338a1.71 KBmarkus_petrux
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markus_petrux’s picture

Status: Active » Reviewed & tested by the community
FileSize
1.71 KB

The attached patch tries to obtain as much information as possible in case of failed fsockopen attempts. Also, it logs the error message to watchdog.

Thoughts about this approach.

Dries’s picture

Category: bug » feature

This is a new feature imo.

Gerhard Killesreiter’s picture

Status: Reviewed & tested by the community » Needs work

patch badly formatted (dos paths)

Steven’s picture

And no proper input validation either. Use theme('placeholder'), it's there for a reason.

markus_petrux’s picture

Does that mean the overall approach looks good? If so, I'll try to reroll a proper patch. Thanks

LAsan’s picture

Version: x.y.z » 7.x-dev

Any news about this issue?

casey’s picture

Version: 7.x-dev » 8.x-dev

D7 is in alpha fase already.

valthebald’s picture

Status: Needs work » Closed (duplicate)