Where is the CCK autocomplete widget field php configuration code stored? I have run myself into a serious problem. I have a custom CCK datatype in Drupal6 in combination with an autocomplete widget on a text field. I have defined php code in the web configuration for the "allowed values list", but the code I wrote is faulty and uses up all memory (three nested foreach loops, returned array gets way too large, 2G mem limit reached).

Unfortunately, I cannot access the Drupal6 instance at all, as it seems the faulty php code is executed on all pages (not sure about this, but did reboot the server and still could not log in).

I guess it would be best just to delete the faulty PHP code for the Autocomplete widget from the backend, but I am unable to find it in the Postgres database. Can anyone give me a hint as to where in the database this code is stored?  

Any other hint as to how to resolve this problem will be highly appreciated.
Try looking in the content_node_field table, under the global settings value:

mysql&gt; desc content_node_field;
+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| field_name      | varchar(32)  | NO   | PRI |         |       |
| type            | varchar(127) | NO   |     |         |       |
| global_settings | mediumtext   | NO   |     | NULL    |       |
| required        | tinyint(4)   | NO   |     | 0       |       |
| multiple        | tinyint(4)   | NO   |     | 0       |       |
| db_storage      | tinyint(4)   | NO   |     | 1       |       |
| module          | varchar(127) | NO   |     |         |       |
| db_columns      | mediumtext   | NO   |     | NULL    |       |
| active          | tinyint(4)   | NO   |     | 0       |       |
| locked          | tinyint(4)   | NO   |     | 0       |       |
+-----------------+--------------+------+-----+---------+-------+


I just did a test, defining an arbitrary PHP string (print "Hello Stack Exchange";) under allowed values for a field (field_test2) and found the following: 

mysql&gt; select global_settings from content_node_field where field_name = "field_test2";

+----------------------------------------------------------------------------------------------------------------------------------------------------+
| global_settings                                                                                                                                    |
+----------------------------------------------------------------------------------------------------------------------------------------------------+
| a:4:{s:15:"text_processing";s:1:"0";s:10:"max_length";s:0:"";s:14:"allowed_values";s:0:"";s:18:"allowed_values_php";s:31:"print "Hello Stack Exchange";";} |
+----------------------------------------------------------------------------------------------------------------------------------------------------+


The string you are looking for is at the end (s:31:"print "Hello Stack Exchange";";) and it's serialized with the character count at the front. If you want to zero this out, it would look like: 

a:4:{s:15:"text_processing";s:1:"0";s:10:"max_length";s:0:"";s:14:"allowed_values";s:0:"";s:18:"allowed_values_php";s:0:"";}