warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
fxarte - January 19, 2009 - 20:27
| Project: | Http Headers |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi
After on the content type section I get this Drupal warning
warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /srv/www/upgrades/drupal5.modules/all/modules/httpHeaders/http_headers.module on line 106.
I'm using Drupal 5.14, on a LAMP server with PHP 5.2.5, and MySQL database 5.0.26,
Thank you

#1
Can you tell me is this for a content-type you have configured?
#2
Yes!
but, is there any other possible configuration?
thank you
#3
The following error also occurs when using httpHeaders-6.x-1.x-dev and with any content type:
warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in {root}/sites/all/modules/httpHeaders/http_headers.module on line 113.Apparently, the db_query string in line 113 contains the bug. That line is the third one:
//Gets the header properties of the contentType from the node_type table and returns the two values in an arrayfunction http_headers_getType($type){
$result = db_query("SELECT header_expires, header_lastmod FROM {node_type} WHERE type = '%s'", $type);
return mysql_fetch_array($result);
}
NB: In the 'node_type' table:
1) the 'header_lastmod' column remains empty (???) for all unchanged content types and
2) the 'header_expires' is '0' for all content types (as long as this value remains unaltered by the user).