Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | common.inc.patch-45338a | 1.71 KB | markus_petrux |
Comments
Comment #1
markus_petrux CreditAttribution: markus_petrux commentedThe 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.
Comment #2
Dries CreditAttribution: Dries commentedThis is a new feature imo.
Comment #3
Gerhard Killesreiter CreditAttribution: Gerhard Killesreiter commentedpatch badly formatted (dos paths)
Comment #4
Steven CreditAttribution: Steven commentedAnd no proper input validation either. Use theme('placeholder'), it's there for a reason.
Comment #5
markus_petrux CreditAttribution: markus_petrux commentedDoes that mean the overall approach looks good? If so, I'll try to reroll a proper patch. Thanks
Comment #6
LAsan CreditAttribution: LAsan commentedAny news about this issue?
Comment #7
casey CreditAttribution: casey commentedD7 is in alpha fase already.
Comment #8
valthebaldI believe this is covered by #965078: HTTP request checking is unreliable and should be removed in favor of watchdog() calls