Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search method returns NULL #116

Closed
waldoj opened this issue Aug 5, 2014 · 19 comments
Closed

Search method returns NULL #116

waldoj opened this issue Aug 5, 2014 · 19 comments

Comments

@waldoj
Copy link

waldoj commented Aug 5, 2014

I'm having a puzzling problem with a website that uses Elasticsearch—Elasticsearch is returning results to elasticsearch-php, which is then mysteriously failing to output them. This is with Elasticsearch v0.90.9, elasticsearch-php v0.4.5, and PHP v5.3.10. (Just in case, I've also tried elasticsearch-php v1.2.0, despite its incompatibility with pre-v1.0 Elasticsearch, which presented precisely the same problem.)

When I directly query my Elasticsearch index, Elasticsearch happily returns the results. That's if I make the request via cURL. If I make the request via elasticsearch-php, Elasticsearch still returns the results, but they don't make it past elasticsearch-php.

For example, here I search for a term that I know will return a small number of results (Jaquith, my last name) from my index (business) of a couple of million records:

require 'vendor/autoload.php';
$config['logging'] = TRUE;
$client = new Elasticsearch\Client($config);
$params['index'] = 'business';
$params['body']['query']['match']['_all'] = 'Jaquith';
$result = $client->search($params);
var_dump($result);

The output of var_dump($result) is NULL. Not false, but NULL. If I I deliberately specify invalid options, such as an invalid index (e.g., $params['index'] = 'fake_index'), then it returns false, so it's not like it can only return NULL.

Where things get weird is when looking at elasticsearch.log. Here is what's logged from the execution of the above:

[2014-08-04 21:34:13] log.DEBUG: Request Body ["{\"query\":{\"match\":{\"_all\":\"Jaquith\"}}}"] {"file":"/vol/www/business.openva.com/htdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/AbstractConnection.php","line":113,"class":"Elasticsearch\\Connections\\AbstractConnection","function":"logRequestSuccess"}
[2014-08-04 21:34:13] log.INFO: Request Success: {"method":"POST","uri":"http://localhost:9200/business/_search","headers":{"host":["localhost:9200"],"user-agent":["Guzzle/3.9.1 curl/7.22.0 PHP/5.3.10-1ubuntu3.13"],"content-length":[38]},"HTTP code":200,"duration":0.009757} {"file":"/vol/www/business.openva.com/htdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/AbstractConnection.php","line":123,"class":"Elasticsearch\\Connections\\AbstractConnection","function":"logRequestSuccess"}
[2014-08-04 21:34:13] log.DEBUG: Response ["{\"took\":7,\"timed_out\":false,\"_shards\":{\"total\":5,\"successful\":5,\"failed\":0},\"hits\":{\"total\":4,\"max_score\":6.5482264,\"hits\":[{\"_index\":\"business\",\"_type\":\"5\",\"_id\":\"ZTU0BFYcSIWQWZYdCaNS1g\",\"_score\":6.5482264, \"_source\" : {\"first_name\": \"MARY\", \"last_name\": \"JAQUITH\", \"middle_name\": \"\", \"id\": \"0562703\", \"title\": \"PRESIDENT\"},},{\"_index\":\"business\",\"_type\":\"5\",\"_id\":\"L9PNiEdUSGmbZAq1bgPjQQ\",\"_score\":4.9117994, \"_source\" : {\"first_name\": \"MARY\", \"last_name\": \"JAQUITH\", \"middle_name\": \"T\", \"id\": \"0562703\", \"title\": \"S/T\"},},{\"_index\":\"business\",\"_type\":\"9\",\"_id\":\"C7Web8w6T0S1zhyUtbjaAw\",\"_score\":2.0459418, \"_source\" : {\"expiration-date\": null, \"agent-state\": \"VA\", \"agent_status\": \"1\", \"agent_court_locality\": \"LOUDOUN COUNTY\", \"state-formed\": \"VIRGINIA\", \"id\": \"S496907\", \"agent-name\": \"NATALIE ANDERSON JAQUITH\", \"city\": \"Sterling\", \"zip\": \"20164\", \"state\": \"VA\", \"agent-city\": \"STERLING\", \"status\": \"ACTIVE\", \"agent_zip\": \"20164\", \"street-2\": \"\", \"street-1\": \"206 Laura Anne Drive\", \"date\": \"2014-03-17\", \"agent-street-1\": \"206 LAURA ANNE DRIVE\", \"agent_date\": \"2014-03-17\", \"name\": \"Happy Little Paintings, LLC\", \"agent-street-2\": \"\", \"industry\": \"00\", \"status-date\": \"2014-03-17\", \"address-date\": null},},{\"_index\":\"business\",\"_type\":\"2\",\"_id\":\"0LYakZfaTaKj4lGxaF0hGw\",\"_score\":1.6373172, \"_source\" : {\"agent_name\": \"MARY G JAQUITH\", \"address_date\": null, \"stock_ind\": \"S\", \"agent_status\": \"OFFICER\", \"agent_court_locality\": \"VIRGINIA BEACH CITY\", \"total_shares\": \"00000005000\", \"incorporation_date\": \"2001-08-02\", \"stock_class\": \"00000000\", \"id\": \"0562703\", \"city\": \"VA BEACH\", \"zip\": \"23457\", \"state\": \"VA\", \"assessment\": \"NORMAL ASSESSMENT\", \"merged\": \"\", \"state_formed\": \"VIRGINIA\", \"status\": \"ACTIVE\", \"agent_zip\": \"23457\", \"agent_city\": \"VIRGINIA BEACH\", \"status_date\": \"2009-03-10\", \"street_1\": \"4166 CHARITY NECK ROAD\", \"street_2\": \"\", \"agent_date\": \"2013-04-29\", \"name\": \"CORNERSTONE FARMS, LTD.\", \"expiration_date\": null, \"industry\": \"GENERAL\", \"agent_street_1\": \"4166 CHARITY NECK RD.\", \"agent_street_2\": \"\", \"number_shares\": \"00000000000\", \"agent_state\": \"VA\"},}]}}"] {"file":"/vol/www/business.openva.com/htdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/AbstractConnection.php","line":124,"class":"Elasticsearch\\Connections\\AbstractConnection","function":"logRequestSuccess"}
[2014-08-04 21:34:13] trace.INFO: curl -XPOST 'http://localhost:9200/business/_search?pretty=true' -d '{"query":{"match":{"_all":"Jaquith"}}}' [] []
[2014-08-04 21:34:13] trace.DEBUG: Response: {"response":"{\"took\":7,\"timed_out\":false,\"_shards\":{\"total\":5,\"successful\":5,\"failed\":0},\"hits\":{\"total\":4,\"max_score\":6.5482264,\"hits\":[{\"_index\":\"business\",\"_type\":\"5\",\"_id\":\"ZTU0BFYcSIWQWZYdCaNS1g\",\"_score\":6.5482264, \"_source\" : {\"first_name\": \"MARY\", \"last_name\": \"JAQUITH\", \"middle_name\": \"\", \"id\": \"0562703\", \"title\": \"PRESIDENT\"},},{\"_index\":\"business\",\"_type\":\"5\",\"_id\":\"L9PNiEdUSGmbZAq1bgPjQQ\",\"_score\":4.9117994, \"_source\" : {\"first_name\": \"MARY\", \"last_name\": \"JAQUITH\", \"middle_name\": \"T\", \"id\": \"0562703\", \"title\": \"S/T\"},},{\"_index\":\"business\",\"_type\":\"9\",\"_id\":\"C7Web8w6T0S1zhyUtbjaAw\",\"_score\":2.0459418, \"_source\" : {\"expiration-date\": null, \"agent-state\": \"VA\", \"agent_status\": \"1\", \"agent_court_locality\": \"LOUDOUN COUNTY\", \"state-formed\": \"VIRGINIA\", \"id\": \"S496907\", \"agent-name\": \"NATALIE ANDERSON JAQUITH\", \"city\": \"Sterling\", \"zip\": \"20164\", \"state\": \"VA\", \"agent-city\": \"STERLING\", \"status\": \"ACTIVE\", \"agent_zip\": \"20164\", \"street-2\": \"\", \"street-1\": \"206 Laura Anne Drive\", \"date\": \"2014-03-17\", \"agent-street-1\": \"206 LAURA ANNE DRIVE\", \"agent_date\": \"2014-03-17\", \"name\": \"Happy Little Paintings, LLC\", \"agent-street-2\": \"\", \"industry\": \"00\", \"status-date\": \"2014-03-17\", \"address-date\": null},},{\"_index\":\"business\",\"_type\":\"2\",\"_id\":\"0LYakZfaTaKj4lGxaF0hGw\",\"_score\":1.6373172, \"_source\" : {\"agent_name\": \"MARY G JAQUITH\", \"address_date\": null, \"stock_ind\": \"S\", \"agent_status\": \"OFFICER\", \"agent_court_locality\": \"VIRGINIA BEACH CITY\", \"total_shares\": \"00000005000\", \"incorporation_date\": \"2001-08-02\", \"stock_class\": \"00000000\", \"id\": \"0562703\", \"city\": \"VA BEACH\", \"zip\": \"23457\", \"state\": \"VA\", \"assessment\": \"NORMAL ASSESSMENT\", \"merged\": \"\", \"state_formed\": \"VIRGINIA\", \"status\": \"ACTIVE\", \"agent_zip\": \"23457\", \"agent_city\": \"VIRGINIA BEACH\", \"status_date\": \"2009-03-10\", \"street_1\": \"4166 CHARITY NECK ROAD\", \"street_2\": \"\", \"agent_date\": \"2013-04-29\", \"name\": \"CORNERSTONE FARMS, LTD.\", \"expiration_date\": null, \"industry\": \"GENERAL\", \"agent_street_1\": \"4166 CHARITY NECK RD.\", \"agent_street_2\": \"\", \"number_shares\": \"00000000000\", \"agent_state\": \"VA\"},}]}}","method":"POST","uri":"http://localhost:9200/business/_search","HTTP code":200,"duration":0.009757} []

Elasticsearch returns results just fine. Somewhere between elasticsearch-php receiving that JSON and returning the content as PHP it's becoming, simply, NULL.

There's a non-trivial chance that I'm doing something stupid here, but I can't figure out what it is. Any ideas of what's going on?

@polyfractal
Copy link
Contributor

Bizarre...this looks like buggy behavior somehow (although I can't think of a reason yet). Your query looks fine, the trace logs look fine...there must be something about the output that is causing the JSON result parsing to choke in a non-fatal way.

I'll break out the debugger and take a look with your version of ES and the client.

@waldoj
Copy link
Author

waldoj commented Aug 5, 2014

Thank you, Zachary! If there's any testing I can do on my end, please don't be shy about letting me know.

@polyfractal
Copy link
Contributor

FYI, I peeked at this a little, but haven't had a chance to dig into it much (I'm in SF giving a training right now).

I'll be home on Thursday, and will either have a go at this on the flight home, or as soon as I get back. :)

@polyfractal
Copy link
Contributor

Well...I haven't been able to reproduce this yet. I'm trying to reproduce on Elasticsearch 0.90.9 + Elasticsearch-php 1.2.0, and loaded the documents that were returned in the debug log. Everything seems to parse and return correctly. I'm a bit stumped at the moment.

  • If you aren't already, can you report all errors in your script either via php.ini or:

    error_reporting(E_ALL);
    ini_set("display_errors", 1);
  • I see that there are multiple types being returned (5, 9, 2, etc). Can you try the search against just one type and see what happens?

    require 'vendor/autoload.php';
    $config['logging'] = TRUE;
    $client = new Elasticsearch\Client($config);
    $params['index'] = 'business';
    $params['type'] = '5';           // <==== add a type
    
    $params['body']['query']['match']['_all'] = 'Jaquith';
    $result = $client->search($params);
    var_dump($result);
  • Can you attach the output of your mappings and analyzers?

    curl -XGET localhost:9200/_mapping
    curl -XGET localhost:9200/_settings

@waldoj
Copy link
Author

waldoj commented Aug 12, 2014

No further errors are provided by dialing up PHP's verbosity, and narrowing the results against just one type (I tried several) doesn't make any difference. This would seem to point in the direction of me doing something dumb. :)

Here's my mapping file:

{
    "finance": {
        "1": {
            "properties": {
                "table-code": {
                    "type": "string"
                },
                "table-desc": {
                    "type": "string"
                },
                "table-identifier": {
                    "type": "string"
                }
            }
        },
        "2": {
            "properties": {
                "address-date": {
                    "type": "string"
                },
                "address_date": {
                    "type": "string"
                },
                "agent-city": {
                    "type": "string"
                },
                "agent-court-locality": {
                    "type": "string"
                },
                "agent-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent-name": {
                    "type": "string"
                },
                "agent-state": {
                    "type": "string"
                },
                "agent-status": {
                    "type": "string"
                },
                "agent-street-1": {
                    "type": "string"
                },
                "agent-street-2": {
                    "type": "string"
                },
                "agent-zip": {
                    "type": "string"
                },
                "agent_city": {
                    "type": "string"
                },
                "agent_court_locality": {
                    "type": "string"
                },
                "agent_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_name": {
                    "type": "string"
                },
                "agent_state": {
                    "type": "string"
                },
                "agent_status": {
                    "type": "string"
                },
                "agent_street_1": {
                    "type": "string"
                },
                "agent_street_2": {
                    "type": "string"
                },
                "agent_zip": {
                    "type": "string"
                },
                "assessment": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "corp-asmt-ind": {
                    "type": "string"
                },
                "corp-city": {
                    "type": "string"
                },
                "corp-id": {
                    "type": "string"
                },
                "corp-inc-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-ind-code": {
                    "type": "string"
                },
                "corp-merger-ind": {
                    "type": "string"
                },
                "corp-name": {
                    "type": "string"
                },
                "corp-per-dur": {
                    "type": "string"
                },
                "corp-po-eff-date": {
                    "type": "string"
                },
                "corp-ra-city": {
                    "type": "string"
                },
                "corp-ra-eff-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-ra-loc": {
                    "type": "string"
                },
                "corp-ra-name": {
                    "type": "string"
                },
                "corp-ra-state": {
                    "type": "string"
                },
                "corp-ra-status": {
                    "type": "string"
                },
                "corp-ra-street1": {
                    "type": "string"
                },
                "corp-ra-street2": {
                    "type": "string"
                },
                "corp-ra-zip": {
                    "type": "string"
                },
                "corp-state": {
                    "type": "string"
                },
                "corp-state-inc": {
                    "type": "string"
                },
                "corp-status": {
                    "type": "string"
                },
                "corp-status-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-stock-class": {
                    "type": "string"
                },
                "corp-stock-ind": {
                    "type": "string"
                },
                "corp-stock-share-auth": {
                    "type": "string"
                },
                "corp-street1": {
                    "type": "string"
                },
                "corp-street2": {
                    "type": "string"
                },
                "corp-total-shares": {
                    "type": "string"
                },
                "corp-zip": {
                    "type": "string"
                },
                "expiration-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "expiration_date": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "incorporation-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "incorporation_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "industry": {
                    "type": "string"
                },
                "merged": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "number-shares": {
                    "type": "string"
                },
                "number_shares": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "state-formed": {
                    "type": "string"
                },
                "state_formed": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "status-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "status_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "stock-class": {
                    "type": "string"
                },
                "stock-ind": {
                    "type": "string"
                },
                "stock_class": {
                    "type": "string"
                },
                "stock_ind": {
                    "type": "string"
                },
                "street-1": {
                    "type": "string"
                },
                "street-2": {
                    "type": "string"
                },
                "street_1": {
                    "type": "string"
                },
                "street_2": {
                    "type": "string"
                },
                "total-shares": {
                    "type": "string"
                },
                "total_shares": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "3": {
            "properties": {
                "address_date": {
                    "type": "string"
                },
                "agent_city": {
                    "type": "string"
                },
                "agent_court_locality": {
                    "type": "string"
                },
                "agent_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_name": {
                    "type": "string"
                },
                "agent_state": {
                    "type": "string"
                },
                "agent_status": {
                    "type": "string"
                },
                "agent_street_1": {
                    "type": "string"
                },
                "agent_street_2": {
                    "type": "string"
                },
                "agent_zip": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "corp-city": {
                    "type": "string"
                },
                "corp-formed": {
                    "type": "string"
                },
                "corp-id": {
                    "type": "string"
                },
                "corp-inc-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-ind-code": {
                    "type": "string"
                },
                "corp-name": {
                    "type": "string"
                },
                "corp-per-dur": {
                    "type": "string"
                },
                "corp-po-eff-date": {
                    "type": "string"
                },
                "corp-ra-ZIP": {
                    "type": "string"
                },
                "corp-ra-city": {
                    "type": "string"
                },
                "corp-ra-eff-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-ra-loc": {
                    "type": "string"
                },
                "corp-ra-name": {
                    "type": "string"
                },
                "corp-ra-state": {
                    "type": "string"
                },
                "corp-ra-status": {
                    "type": "string"
                },
                "corp-ra-street1": {
                    "type": "string"
                },
                "corp-ra-street2": {
                    "type": "string"
                },
                "corp-state": {
                    "type": "string"
                },
                "corp-state-inc": {
                    "type": "string"
                },
                "corp-status": {
                    "type": "string"
                },
                "corp-status-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-street1": {
                    "type": "string"
                },
                "corp-street2": {
                    "type": "string"
                },
                "corp-zip": {
                    "type": "string"
                },
                "domestic": {
                    "type": "string"
                },
                "expiration_date": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "incorporation_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "industry": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "state_formed": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "status_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "street_1": {
                    "type": "string"
                },
                "street_2": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "4": {
            "properties": {
                "amended": {
                    "type": "string"
                },
                "amendment_type": {
                    "type": "string"
                },
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "hist-amend-date": {
                    "type": "string"
                },
                "hist-amend-ind": {
                    "type": "string"
                },
                "hist-amend-type": {
                    "type": "string"
                },
                "hist-corp-id": {
                    "type": "string"
                },
                "hist-old-shares-auth": {
                    "type": "string"
                },
                "hist-old-stock-class": {
                    "type": "string"
                },
                "hist-stock-info": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "shares_auth": {
                    "type": "string"
                },
                "stock_class": {
                    "type": "string"
                },
                "stock_info": {
                    "type": "string"
                }
            }
        },
        "5": {
            "properties": {
                "dirc-corp-id": {
                    "type": "string"
                },
                "dirc-first-name": {
                    "type": "string"
                },
                "dirc-last-name": {
                    "type": "string"
                },
                "dirc-middle-name": {
                    "type": "string"
                },
                "dirc-title": {
                    "type": "string"
                },
                "first_name": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "last_name": {
                    "type": "string"
                },
                "middle_name": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "6": {
            "properties": {
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "name-corp-id": {
                    "type": "string"
                },
                "name-corp-name": {
                    "type": "string"
                },
                "name-eff-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "name-status": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "7": {
            "properties": {
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "merg-corp-id": {
                    "type": "string"
                },
                "merg-eff-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "merg-for-corp-name": {
                    "type": "string"
                },
                "merg-surv-id": {
                    "type": "string"
                },
                "merg-surv-qualified": {
                    "type": "string"
                },
                "merg-type": {
                    "type": "string"
                },
                "survivor_id": {
                    "type": "string"
                },
                "survivor_qualified": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "unqualified_name": {
                    "type": "string"
                }
            }
        },
        "8": {
            "properties": {
                "city": {
                    "type": "string"
                },
                "date_expires": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "requestor": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "street_1": {
                    "type": "string"
                },
                "street_2": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "9": {
            "properties": {
                "address-date": {
                    "type": "string"
                },
                "agent-city": {
                    "type": "string"
                },
                "agent-name": {
                    "type": "string"
                },
                "agent-state": {
                    "type": "string"
                },
                "agent-street-1": {
                    "type": "string"
                },
                "agent-street-2": {
                    "type": "string"
                },
                "agent_court_locality": {
                    "type": "string"
                },
                "agent_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_status": {
                    "type": "string"
                },
                "agent_zip": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "corp-city": {
                    "type": "string"
                },
                "corp-id": {
                    "type": "string"
                },
                "corp-inc-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-ind-code": {
                    "type": "string"
                },
                "corp-name": {
                    "type": "string"
                },
                "corp-per-dur": {
                    "type": "string"
                },
                "corp-po-eff-date": {
                    "type": "string"
                },
                "corp-ra-city": {
                    "type": "string"
                },
                "corp-ra-eff-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-ra-loc": {
                    "type": "string"
                },
                "corp-ra-name": {
                    "type": "string"
                },
                "corp-ra-state": {
                    "type": "string"
                },
                "corp-ra-status": {
                    "type": "string"
                },
                "corp-ra-street1": {
                    "type": "string"
                },
                "corp-ra-street2": {
                    "type": "string"
                },
                "corp-ra-zip": {
                    "type": "string"
                },
                "corp-state": {
                    "type": "string"
                },
                "corp-state-inc": {
                    "type": "string"
                },
                "corp-status": {
                    "type": "string"
                },
                "corp-status-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "corp-street1": {
                    "type": "string"
                },
                "corp-street2": {
                    "type": "string"
                },
                "corp-zip": {
                    "type": "string"
                },
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "expiration-date": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "industry": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "state-formed": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "status-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "street-1": {
                    "type": "string"
                },
                "street-2": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "lp": {
            "properties": {
                "corp-asmt-ind": {
                    "type": "string"
                },
                "corp-city": {
                    "type": "string"
                },
                "corp-id": {
                    "type": "string"
                },
                "corp-inc-date": {
                    "type": "string"
                },
                "corp-ind-code": {
                    "type": "string"
                },
                "corp-merger-ind": {
                    "type": "string"
                },
                "corp-name": {
                    "type": "string"
                },
                "corp-per-dur": {
                    "type": "string"
                },
                "corp-po-eff-date": {
                    "type": "string"
                },
                "corp-ra-city": {
                    "type": "string"
                },
                "corp-ra-eff-date": {
                    "type": "string"
                },
                "corp-ra-loc": {
                    "type": "string"
                },
                "corp-ra-name": {
                    "type": "string"
                },
                "corp-ra-state": {
                    "type": "string"
                },
                "corp-ra-status": {
                    "type": "string"
                },
                "corp-ra-street1": {
                    "type": "string"
                },
                "corp-ra-street2": {
                    "type": "string"
                },
                "corp-ra-zip": {
                    "type": "string"
                },
                "corp-state": {
                    "type": "string"
                },
                "corp-state-inc": {
                    "type": "string"
                },
                "corp-status": {
                    "type": "string"
                },
                "corp-status-date": {
                    "type": "string"
                },
                "corp-stock-class": {
                    "type": "string"
                },
                "corp-stock-ind": {
                    "type": "string"
                },
                "corp-stock-share-auth": {
                    "type": "string"
                },
                "corp-street1": {
                    "type": "string"
                },
                "corp-street2": {
                    "type": "string"
                },
                "corp-total-shares": {
                    "type": "string"
                },
                "corp-zip": {
                    "type": "string"
                }
            }
        }
    },
    "richmondsunlight": {
        "finance": {
            "properties": {
                "@attributes": {
                    "properties": {
                        "IsIndividual": {
                            "type": "string",
                            "index": "not_analyzed",
                            "omit_norms": true,
                            "index_options": "docs"
                        }
                    }
                },
                "Address": {
                    "properties": {
                        "City": {
                            "type": "string"
                        },
                        "Line1": {
                            "type": "string"
                        },
                        "Line2": {
                            "type": "string"
                        },
                        "State": {
                            "type": "string"
                        },
                        "ZipCode": {
                            "type": "string"
                        }
                    }
                },
                "Amount": {
                    "type": "string",
                    "index": "not_analyzed",
                    "omit_norms": true,
                    "index_options": "docs"
                },
                "AuthorizingName": {
                    "type": "string"
                },
                "CandidateName": {
                    "type": "string"
                },
                "CommitteeCode": {
                    "type": "string",
                    "index": "not_analyzed",
                    "omit_norms": true,
                    "index_options": "docs"
                },
                "CommitteeName": {
                    "type": "string"
                },
                "Contributor": {
                    "properties": {
                        "@attributes": {
                            "properties": {
                                "IsIndividual": {
                                    "type": "string",
                                    "index": "not_analyzed",
                                    "omit_norms": true,
                                    "index_options": "docs"
                                }
                            }
                        },
                        "Address": {
                            "properties": {
                                "City": {
                                    "type": "string"
                                },
                                "Line1": {
                                    "type": "string"
                                },
                                "Line2": {
                                    "type": "string"
                                },
                                "State": {
                                    "type": "string"
                                },
                                "ZipCode": {
                                    "type": "string"
                                }
                            }
                        },
                        "FirstName": {
                            "type": "string"
                        },
                        "LastName": {
                            "type": "string"
                        },
                        "MiddleName": {
                            "type": "string"
                        },
                        "NameOfEmployer": {
                            "type": "string"
                        },
                        "OccupationOrTypeOfBusiness": {
                            "type": "string"
                        },
                        "Prefix": {
                            "type": "string"
                        },
                        "PrimaryCityAndStateOfEmploymentOrBusiness": {
                            "type": "string"
                        },
                        "Suffix": {
                            "type": "string"
                        }
                    }
                },
                "FirstName": {
                    "type": "string"
                },
                "ItemOrService": {
                    "type": "string"
                },
                "LastName": {
                    "type": "string"
                },
                "MiddleName": {
                    "type": "string"
                },
                "Payee": {
                    "properties": {
                        "@attributes": {
                            "properties": {
                                "IsIndividual": {
                                    "type": "string",
                                    "index": "not_analyzed",
                                    "omit_norms": true,
                                    "index_options": "docs"
                                }
                            }
                        },
                        "Address": {
                            "properties": {
                                "City": {
                                    "type": "string"
                                },
                                "Line1": {
                                    "type": "string"
                                },
                                "Line2": {
                                    "type": "string"
                                },
                                "State": {
                                    "type": "string"
                                },
                                "ZipCode": {
                                    "type": "string"
                                }
                            }
                        },
                        "FirstName": {
                            "type": "string"
                        },
                        "LastName": {
                            "type": "string"
                        },
                        "MiddleName": {
                            "type": "string"
                        },
                        "Prefix": {
                            "type": "string"
                        },
                        "Suffix": {
                            "type": "string"
                        }
                    }
                },
                "Prefix": {
                    "type": "string"
                },
                "ReportId": {
                    "type": "string",
                    "index": "not_analyzed",
                    "omit_norms": true,
                    "index_options": "docs"
                },
                "Suffix": {
                    "type": "string"
                },
                "TotalToDate": {
                    "type": "string",
                    "index": "not_analyzed",
                    "omit_norms": true,
                    "index_options": "docs"
                },
                "TransactionDate": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "type": {
                    "type": "string",
                    "index": "not_analyzed",
                    "omit_norms": true,
                    "index_options": "docs"
                }
            }
        }
    },
    "business": {
        "1": {
            "properties": {
                "table-code": {
                    "type": "string"
                },
                "table-desc": {
                    "type": "string"
                },
                "table-identifier": {
                    "type": "string"
                }
            }
        },
        "2": {
            "properties": {
                "address_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_city": {
                    "type": "string"
                },
                "agent_court_locality": {
                    "type": "string"
                },
                "agent_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_name": {
                    "type": "string"
                },
                "agent_state": {
                    "type": "string"
                },
                "agent_status": {
                    "type": "string"
                },
                "agent_street_1": {
                    "type": "string"
                },
                "agent_street_2": {
                    "type": "string"
                },
                "agent_zip": {
                    "type": "string"
                },
                "assessment": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "expiration_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "incorporation_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "industry": {
                    "type": "string"
                },
                "merged": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "number_shares": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "state_formed": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "status_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "stock_class": {
                    "type": "string"
                },
                "stock_ind": {
                    "type": "string"
                },
                "street_1": {
                    "type": "string"
                },
                "street_2": {
                    "type": "string"
                },
                "total_shares": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "3": {
            "properties": {
                "agent_city": {
                    "type": "string"
                },
                "agent_court_locality": {
                    "type": "string"
                },
                "agent_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_name": {
                    "type": "string"
                },
                "agent_state": {
                    "type": "string"
                },
                "agent_status": {
                    "type": "string"
                },
                "agent_street_1": {
                    "type": "string"
                },
                "agent_street_2": {
                    "type": "string"
                },
                "agent_zip": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "domestic": {
                    "type": "string"
                },
                "expiration_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "incorporation_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "industry": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "state_formed": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "status_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "street_1": {
                    "type": "string"
                },
                "street_2": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "4": {
            "properties": {
                "amended": {
                    "type": "string"
                },
                "amendment_type": {
                    "type": "string"
                },
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "shares_auth": {
                    "type": "string"
                },
                "stock_class": {
                    "type": "string"
                },
                "stock_info": {
                    "type": "string"
                }
            }
        },
        "5": {
            "properties": {
                "first_name": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "last_name": {
                    "type": "string"
                },
                "middle_name": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
        },
        "6": {
            "properties": {
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "7": {
            "properties": {
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "survivor_id": {
                    "type": "string"
                },
                "survivor_qualified": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "unqualified_name": {
                    "type": "string"
                }
            }
        },
        "8": {
            "properties": {
                "city": {
                    "type": "string"
                },
                "date_expires": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "id": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "requestor": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "street_1": {
                    "type": "string"
                },
                "street_2": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        },
        "9": {
            "properties": {
                "address-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent-city": {
                    "type": "string"
                },
                "agent-name": {
                    "type": "string"
                },
                "agent-state": {
                    "type": "string"
                },
                "agent-street-1": {
                    "type": "string"
                },
                "agent-street-2": {
                    "type": "string"
                },
                "agent_court_locality": {
                    "type": "string"
                },
                "agent_date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "agent_status": {
                    "type": "string"
                },
                "agent_zip": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "expiration-date": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "industry": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "state-formed": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "status-date": {
                    "type": "date",
                    "format": "dateOptionalTime"
                },
                "street-1": {
                    "type": "string"
                },
                "street-2": {
                    "type": "string"
                },
                "zip": {
                    "type": "string"
                }
            }
        }
    }
}

And here are my settings:

{
    "finance": {
        "settings": {
            "index.number_of_replicas": "1",
            "index.version.created": "900999",
            "index.number_of_shards": "5",
            "index.uuid": "xMd_9DxRTuSxU8Pp4lOmOw"
        }
    },
    "richmondsunlight": {
        "settings": {
            "index.version.created": "900999",
            "index.number_of_replicas": "1",
            "index.uuid": "TgxWfglFRLu0UCw5l9bOlQ",
            "index.number_of_shards": "5"
        }
    },
    "business": {
        "settings": {
            "index.number_of_replicas": "1",
            "index.version.created": "900999",
            "index.number_of_shards": "5",
            "index.uuid": "FASi4Hx1RIKNiPnjnm_E2A"
        }
    }
}

I'm generating the mapping dynamically in Python from YAML files. The JSON is valid, it looks fine to me, and Elasticsearch doesn't complain about it at all when indexing the data, but it's certainly possible that I'm doing something that elasticsearch-php isn't expecting.

Is anything useful to be found there, or does everything look A-OK?

@waldoj
Copy link
Author

waldoj commented Aug 16, 2014

FWIW, I've tried emptying out all indices and loading just a small subset of the data (anywhere from 220 KB to 30 MB; the total dataset is about 1 GB), trying out several different chunks of data from different indices, and it's made no difference. NULL is returned every time.

@polyfractal
Copy link
Contributor

Would it be possible to zip up the data directory and send it to me somehow (dropbox, email, etc)? I've tried a few combinations and am either setting up the test such that it doesn't mirror your setup, or there is something unique about your data that is causing the error.

If I could use your actual data it would help debugging a ton.

@waldoj
Copy link
Author

waldoj commented Aug 19, 2014

Well, sure! It's awfully kind of you to pursue this as far as you have. :) I've made a tarball out of the contents of /var/lib/elasticsearch/elasticsearch/nodes/0/indices/business/ (which I hope is the directory that you had in mind), and put it at http://business.openva.com/business.tar.gz.

@polyfractal
Copy link
Contributor

Great, thanks! I'll start digging into this with a debugger and see if I can reproduce :)

@waldoj
Copy link
Author

waldoj commented Sep 6, 2014

I've also tried indexing everything without the custom mapping files. It still doesn't work. And just to verify the elasticsearch.log claim that results are being served up by Elasticsearch, I tried a query at the command line (e.g., curl http://localhost:9200/business/_search?q=Virginia), and results are returned as expected. Finally, to combine these tests, I tried indexing only a very small amount of data (751 records, 239k in size), without a custom map, and re-ran my test searches—results are returned just fine at the command line, but elasticsearch-php returns NULL.

I tried one more thing, and that yielded an interesting result. I tried including just one record in my index, one consisting of only a dozen short fields. That still returns NULL (surely ruling out errors in the data), but only when my search includes a word found in the indexed document. That is, if the business record I indexed is "Microsoft, Inc.," and I search for "Microsoft," then I get NULL from elasticsearch-php. But if I search for "Apple," then I get a proper result back from elasticsearch-php.

In short, NULL is returned only when valid results are found. If no valid results are found, then elasticsearch-php returns a proper results array.

@polyfractal
Copy link
Contributor

Hey @waldoj, really sorry for this huge delay. I'm co-authoring the Elasticsearch book, and we had a big deadline that I was frantically trying to make :)

So I've loaded your data into Elasticsearch 0.90.9 using Elasticsearch-PHP v0.4.5 on PHP 5.3.10. It should be identical. But it seems to work on my end:

date_default_timezone_set('UTC');  // To make PHP happy

echo "Version:".phpversion()."\n\n";

$config['logging'] = TRUE;
$client = new Elasticsearch\Client($config);
$params['index'] = 'business';
$params['body']['query']['match']['_all'] = 'Jaquith';
$result = $client->search($params);

print_r($result);

Which emits (result list truncated for brevity):

Version:5.3.10

Array
(
    [took] => 1
    [timed_out] => 
    [_shards] => Array
        (
            [total] => 5
            [successful] => 5
            [failed] => 0
        )
    [hits] => Array
        (
            [total] => 4
            [max_score] => 0.15342641
            [hits] => Array
                (
                    [0] => Array
                        (
                            [_index] => business
                            [_type] => 5
                            [_id] => ZTU0BFYcSIWQWZYdCaNS1g
                            [_score] => 0.15342641
                            [_source] => Array
                                (
                                    [first_name] => MARY
                                    [last_name] => JAQUITH
                                    [middle_name] => 
                                    [id] => 0562703
                                    [title] => PRESIDENT
                                )
                        )
                    ...
                )
        )
)

Frankly, I have no idea what is going on at your end, since I just can't recreate it. Would you be willing to start mucking around with the Elasticsearch-php code and adding debug prints? I can give you a few locations to add which might help us figure out what's going on.

Could you:

  • run composer update to make sure all your dependencies are current?
  • paste the output of phpinfo()

@waldoj
Copy link
Author

waldoj commented Sep 10, 2014

Oh, so you're so busy with your fancy Elasticsearch book, you don't have time to provide free technical support to a stranger? ;)

If you can't recreate the bug, then there's not a thing that you can do. I've been in your position many times. I've run composer update, which didn't make any difference. At this point, I might just nuke Elasticsearch entirely and start over again. Alternately, I might start from scratch on a new server to try to debug this. If it'd be useful to you, I'm happy to muck around with the Elasticsearch-php code. OTOH, as I am (apparently) the only person in the world experiencing any trouble with this, you're also welcome to categorize this as "wontfix" and move on with your life. :)

phpinfo() output is pasted in below.

PHP Version 5.3.10-1ubuntu3.13

System Linux ip-10-0-0-240 3.2.0-54-virtual #82-Ubuntu SMP Tue Sep 10 20:31:18 UTC 2013 x86_64
Build Date Jul 7 2014 18:33:22
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/apache2/conf.d
Additional .ini files parsed /etc/php5/apache2/conf.d/apc.ini, /etc/php5/apache2/conf.d/curl.ini, /etc/php5/apache2/conf.d/memcached.ini, /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,NTS
PHP Extension Build API20090626,NTS
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, zip, phar
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, tls
Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This server is protected with the Suhosin Patch 0.9.10
Copyright (c) 2006-2007 Hardened-PHP Project Copyright (c) 2007-2009 SektionEins GmbH

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies


Configuration

apache2handler

Apache Version Apache/2.2.22 (Ubuntu)
Apache API Version 20051115
Server Administrator [no address given]
Hostname:Port business.openva.com:0
User/Group www-data(33)/33
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 5
Virtual Server Yes
Server Root /etc/apache2
Loaded Modules core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_deflate mod_dir mod_env mod_expires mod_mime mod_negotiation mod_version mod_instaweb mod_php5 mod_reqtimeout mod_rewrite mod_setenvif mod_ssl mod_status

DirectiveLocal ValueMaster Value
engine11
last_modified00
xbithack00

Apache Environment

VariableValue
HTTP_HOST business.openva.com
HTTP_CONNECTION keep-alive
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36
HTTP_ACCEPT_ENCODING gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.8
HTTP_COOKIE __utma=175311356.1644389473.1391382240.1404002180.1407262509.6; __utmc=175311356; __utmz=175311356.1398696554.4.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); _GPSLSC=
PATH /usr/local/bin:/usr/bin:/bin
SERVER_SIGNATURE <address>Apache/2.2.22 (Ubuntu) Server at business.openva.com Port 80</address>
SERVER_SOFTWARE Apache/2.2.22 (Ubuntu)
SERVER_NAME business.openva.com
SERVER_ADDR 10.0.0.240
SERVER_PORT 80
REMOTE_ADDR 67.233.74.37
DOCUMENT_ROOT /vol/www/business.openva.com/htdocs/
SERVER_ADMIN [no address given]
SCRIPT_FILENAME /vol/www/business.openva.com/htdocs/phpinfo.php
REMOTE_PORT 18804
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING ModPagespeed=off
REQUEST_URI /phpinfo.php?ModPagespeed=off
SCRIPT_NAME /phpinfo.php

HTTP Headers Information

HTTP Request Headers
HTTP Request GET /phpinfo.php?ModPagespeed=off HTTP/1.1
Host business.openva.com
Connection keep-alive
Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36
Accept-Encoding gzip,deflate,sdch
Accept-Language en-US,en;q=0.8
Cookie __utma=175311356.1644389473.1391382240.1404002180.1407262509.6; __utmc=175311356; __utmz=175311356.1398696554.4.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); _GPSLSC=
HTTP Response Headers
X-Powered-By PHP/5.3.10-1ubuntu3.13
Vary Accept-Encoding
Content-Encoding gzip

apc

APC Support enabled
Version 3.1.7
APC Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Locking type pthread mutex Locks
Serialization Support php
Revision $Revision: 307215 $
Build Date May 2 2011 19:00:42

DirectiveLocal ValueMaster Value
apc.cache_by_defaultOnOn
apc.canonicalizeOnOn
apc.coredump_unmapOffOff
apc.enable_cliOffOff
apc.enabledOnOn
apc.file_md5OffOff
apc.file_update_protection22
apc.filtersno valueno value
apc.gc_ttl36003600
apc.include_once_overrideOffOff
apc.lazy_classesOffOff
apc.lazy_functionsOffOff
apc.max_file_size1M1M
apc.mmap_file_maskno valueno value
apc.num_files_hint10001000
apc.preload_pathno valueno value
apc.report_autofilterOffOff
apc.rfc1867OffOff
apc.rfc1867_freq00
apc.rfc1867_nameAPC_UPLOAD_PROGRESSAPC_UPLOAD_PROGRESS
apc.rfc1867_prefixupload_upload_
apc.rfc1867_ttl36003600
apc.serializerdefaultdefault
apc.shm_segments11
apc.shm_size32M32M
apc.slam_defenseOnOn
apc.statOnOn
apc.stat_ctimeOffOff
apc.ttl00
apc.use_request_timeOnOn
apc.user_entries_hint40964096
apc.user_ttl00
apc.write_lockOnOn

bcmath

BCMath support enabled

DirectiveLocal ValueMaster Value
bcmath.scale00

bz2

BZip2 Support Enabled
Stream Wrapper support compress.bzip2://
Stream Filter support bzip2.decompress, bzip2.compress
BZip2 Version 1.0.6, 6-Sept-2010

calendar

Calendar support enabled

Core

PHP Version 5.3.10-1ubuntu3.13

DirectiveLocal ValueMaster Value
allow_call_time_pass_referenceOffOff
allow_url_fopenOnOn
allow_url_includeOffOff
always_populate_raw_post_dataOffOff
arg_separator.input&&
arg_separator.output&&
asp_tagsOffOff
auto_append_fileno valueno value
auto_globals_jitOnOn
auto_prepend_fileno valueno value
browscapno valueno value
default_charsetno valueno value
default_mimetypetext/htmltext/html
define_syslog_variablesOffOff
disable_classesno valueno value
disable_functionspcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
display_errorsOffOff
display_startup_errorsOffOff
doc_rootno valueno value
docref_extno valueno value
docref_rootno valueno value
enable_dlOffOff
error_append_stringno valueno value
error_logno valueno value
error_prepend_stringno valueno value
error_reporting2252722527
exit_on_timeoutOffOff
expose_phpOnOn
extension_dir/usr/lib/php5/20090626/usr/lib/php5/20090626
file_uploadsOnOn
highlight.bg#FFFFFF#FFFFFF
highlight.comment#FF8000#FF8000
highlight.default#0000BB#0000BB
highlight.html#000000#000000
highlight.keyword#007700#007700
highlight.string#DD0000#DD0000
html_errorsOffOff
ignore_repeated_errorsOffOff
ignore_repeated_sourceOffOff
ignore_user_abortOffOff
implicit_flushOffOff
include_path.:/usr/share/php:/usr/share/pear.:/usr/share/php:/usr/share/pear
log_errorsOnOn
log_errors_max_len10241024
magic_quotes_gpcOffOff
magic_quotes_runtimeOffOff
magic_quotes_sybaseOffOff
mail.add_x_headerOnOn
mail.force_extra_parametersno valueno value
mail.logno valueno value
max_execution_time3030
max_file_uploads2020
max_input_nesting_level6464
max_input_time6060
max_input_vars10001000
memory_limit128M128M
open_basedirno valueno value
output_buffering40964096
output_handlerno valueno value
post_max_size8M8M
precision1414
realpath_cache_size16K16K
realpath_cache_ttl120120
register_argc_argvOffOff
register_globalsOffOff
register_long_arraysOffOff
report_memleaksOnOn
report_zend_debugOnOn
request_orderGPGP
safe_modeOffOff
safe_mode_exec_dirno valueno value
safe_mode_gidOffOff
safe_mode_include_dirno valueno value
sendmail_fromno valueno value
sendmail_path/usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i 
serialize_precision1717
short_open_tagOnOn
SMTPlocalhostlocalhost
smtp_port2525
sql.safe_modeOffOff
track_errorsOffOff
unserialize_callback_funcno valueno value
upload_max_filesize2M2M
upload_tmp_dirno valueno value
user_dirno valueno value
user_ini.cache_ttl300300
user_ini.filename.user.ini.user.ini
variables_orderGPCSGPCS
xmlrpc_error_number00
xmlrpc_errorsOffOff
y2k_complianceOnOn
zend.enable_gcOnOn

ctype

ctype functions enabled

curl

cURL support enabled
cURL Information 7.22.0
Age 3
Features
AsynchDNS No
Debug No
GSS-Negotiate Yes
IDN Yes
IPv6 Yes
Largefile Yes
NTLM Yes
SPNEGO No
SSL Yes
SSPI No
krb4 No
libz Yes
CharConv No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp
Host x86_64-pc-linux-gnu
SSL Version OpenSSL/1.0.1
ZLib Version 1.2.3.4

date

date/time support enabled
"Olson" Timezone Database Version 0.system
Timezone Database internal
Default timezone America/New_York

DirectiveLocal ValueMaster Value
date.default_latitude31.766731.7667
date.default_longitude35.233335.2333
date.sunrise_zenith90.58333390.583333
date.sunset_zenith90.58333390.583333
date.timezoneno valueno value

dba

DBA support enabled
Supported handlers cdb cdb_make db4 inifile flatfile

DirectiveLocal ValueMaster Value
dba.default_handlerflatfileflatfile

dom

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.7.8
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

ereg

Regex Library Bundled library enabled

exif

EXIF Support enabled
EXIF Version 1.4 $Id: exif.c 321634 2012-01-01 13:15:04Z felipe $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

DirectiveLocal ValueMaster Value
exif.decode_jis_intelJISJIS
exif.decode_jis_motorolaJISJIS
exif.decode_unicode_intelUCS-2LEUCS-2LE
exif.decode_unicode_motorolaUCS-2BEUCS-2BE
exif.encode_jisno valueno value
exif.encode_unicodeISO-8859-15ISO-8859-15

fileinfo

fileinfo supportenabled
version 1.0.5-dev

filter

Input Validation and Filtering enabled
Revision $Revision: 321634 $

DirectiveLocal ValueMaster Value
filter.defaultunsafe_rawunsafe_raw
filter.default_flagsno valueno value

ftp

FTP support enabled

gettext

GetText Support enabled

hash

hash support enabled
Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support enabled
iconv implementation glibc
iconv library version 2.15

DirectiveLocal ValueMaster Value
iconv.input_encodingISO-8859-1ISO-8859-1
iconv.internal_encodingISO-8859-1ISO-8859-1
iconv.output_encodingISO-8859-1ISO-8859-1

json

json support enabled
json version 1.2.1

libxml

libXML support active
libXML Compiled Version 2.7.8
libXML Loaded Version 20708
libXML streams enabled

mbstring

Multibyte Support enabled
Multibyte string engine libmbfl
HTTP input encoding translation disabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) backtrack check On
Multibyte regex (oniguruma) version 4.7.1

DirectiveLocal ValueMaster Value
mbstring.detect_orderno valueno value
mbstring.encoding_translationOffOff
mbstring.func_overload00
mbstring.http_inputpasspass
mbstring.http_outputpasspass
mbstring.http_output_conv_mimetypes^(text/|application/xhtml\+xml)^(text/|application/xhtml\+xml)
mbstring.internal_encodingno valueno value
mbstring.languageneutralneutral
mbstring.strict_detectionOffOff
mbstring.substitute_characterno valueno value

memcached

memcached supportenabled
Version 1.0.2
libmemcached version 0.44
Session support yes
igbinary support no

mhash

MHASH support Enabled
MHASH API Version Emulated Support

mysql

MySQL Supportenabled
Active Persistent Links 0
Active Links 0
Client API version 5.5.38
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r

DirectiveLocal ValueMaster Value
mysql.allow_local_infileOnOn
mysql.allow_persistentOnOn
mysql.connect_timeout6060
mysql.default_hostno valueno value
mysql.default_passwordno valueno value
mysql.default_portno valueno value
mysql.default_socket/var/run/mysqld/mysqld.sock/var/run/mysqld/mysqld.sock
mysql.default_userno valueno value
mysql.max_linksUnlimitedUnlimited
mysql.max_persistentUnlimitedUnlimited
mysql.trace_modeOffOff

mysqli

MysqlI Supportenabled
Client API library version 5.5.38
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Client API header version 5.5.37
MYSQLI_SOCKET /var/run/mysqld/mysqld.sock

DirectiveLocal ValueMaster Value
mysqli.allow_local_infileOnOn
mysqli.allow_persistentOnOn
mysqli.default_hostno valueno value
mysqli.default_port33063306
mysqli.default_pwno valueno value
mysqli.default_socket/var/run/mysqld/mysqld.sock/var/run/mysqld/mysqld.sock
mysqli.default_userno valueno value
mysqli.max_linksUnlimitedUnlimited
mysqli.max_persistentUnlimitedUnlimited
mysqli.reconnectOffOff

openssl

OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.0.1 14 Mar 2012
OpenSSL Header Version OpenSSL 1.0.1 14 Mar 2012

pcre

PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 8.12 2011-01-15

DirectiveLocal ValueMaster Value
pcre.backtrack_limit10000001000000
pcre.recursion_limit100000100000

PDO

PDO supportenabled
PDO drivers mysql

pdo_mysql

PDO Driver for MySQLenabled
Client API version 5.5.38

DirectiveLocal ValueMaster Value
pdo_mysql.default_socket/var/run/mysqld/mysqld.sock/var/run/mysqld/mysqld.sock

Phar

Phar: PHP Archive support enabled
Phar EXT version 2.0.1
Phar API version 1.1.1
SVN revision $Revision: 321634 $
Phar-based phar archives enabled
Tar-based phar archives enabled
ZIP-based phar archives enabled
gzip compression enabled
bzip2 compression enabled
Native OpenSSL support enabled

Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.

DirectiveLocal ValueMaster Value
phar.cache_listno valueno value
phar.readonlyOnOn
phar.require_hashOnOn

posix

Revision $Revision: 321634 $

Reflection

Reflection enabled
Version $Revision: 321634 $

session

Session Support enabled
Registered save handlers files user memcached
Registered serializer handlers php php_binary wddx

DirectiveLocal ValueMaster Value
session.auto_startOffOff
session.bug_compat_42OffOff
session.bug_compat_warnOffOff
session.cache_expire180180
session.cache_limiternocachenocache
session.cookie_domainno valueno value
session.cookie_httponlyOffOff
session.cookie_lifetime00
session.cookie_path//
session.cookie_secureOffOff
session.entropy_fileno valueno value
session.entropy_length00
session.gc_divisor10001000
session.gc_maxlifetime14401440
session.gc_probability00
session.hash_bits_per_character55
session.hash_function00
session.namePHPSESSIDPHPSESSID
session.referer_checkno valueno value
session.save_handlerfilesfiles
session.save_path/var/lib/php5/var/lib/php5
session.serialize_handlerphpphp
session.use_cookiesOnOn
session.use_only_cookiesOnOn
session.use_trans_sid00

shmop

shmop support enabled

SimpleXML

Simplexml support enabled
Revision $Revision: 321634 $
Schema support enabled

soap

Soap Client enabled
Soap Server enabled

DirectiveLocal ValueMaster Value
soap.wsdl_cache11
soap.wsdl_cache_dir/tmp/tmp
soap.wsdl_cache_enabled11
soap.wsdl_cache_limit55
soap.wsdl_cache_ttl8640086400

sockets

Sockets Support enabled

SPL

SPL supportenabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

DirectiveLocal ValueMaster Value
assert.active11
assert.bail00
assert.callbackno valueno value
assert.quiet_eval00
assert.warning11
auto_detect_line_endings00
default_socket_timeout6060
fromno valueno value
safe_mode_allowed_env_varsPHP_PHP_
safe_mode_protected_env_varsLD_LIBRARY_PATHLD_LIBRARY_PATH
url_rewriter.tagsa=href,area=href,frame=src,input=src,form=fakeentrya=href,area=href,frame=src,input=src,form=fakeentry
user_agentno valueno value

sysvmsg

sysvmsg support enabled
Revision $Revision: 321634 $

tokenizer

Tokenizer Support enabled

wddx

WDDX Supportenabled
WDDX Session Serializer enabled

xml

XML Support active
XML Namespace Support active
libxml2 Version 2.7.8

xmlreader

XMLReader enabled

xmlwriter

XMLWriter enabled

zip

Zip enabled
Extension Version $Id: php_zip.c 321634 2012-01-01 13:15:04Z felipe $
Zip version 1.9.1
Libzip version 0.9.0

zlib

ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.1.1
Linked Version 1.2.3.4

DirectiveLocal ValueMaster Value
zlib.output_compressionOffOff
zlib.output_compression_level-1-1
zlib.output_handlerno valueno value

Additional Modules

Module Name
sysvsem
sysvshm

Environment

VariableValue
APACHE_RUN_DIR /var/run/apache2
APACHE_PID_FILE /var/run/apache2.pid
PATH /usr/local/bin:/usr/bin:/bin
APACHE_LOCK_DIR /var/lock/apache2
LANG C
APACHE_RUN_USER www-data
APACHE_RUN_GROUP www-data
APACHE_LOG_DIR /var/log/apache2
PWD /

PHP Variables

VariableValue
_REQUEST["ModPagespeed"]off
_GET["ModPagespeed"]off
_COOKIE["__utma"]175311356.1644389473.1391382240.1404002180.1407262509.6
_COOKIE["__utmc"]175311356
_COOKIE["__utmz"]175311356.1398696554.4.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not provided)
_COOKIE["_GPSLSC"]no value
_SERVER["HTTP_HOST"]business.openva.com
_SERVER["HTTP_CONNECTION"]keep-alive
_SERVER["HTTP_ACCEPT"]text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
_SERVER["HTTP_USER_AGENT"]Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36
_SERVER["HTTP_ACCEPT_ENCODING"]gzip,deflate,sdch
_SERVER["HTTP_ACCEPT_LANGUAGE"]en-US,en;q=0.8
_SERVER["HTTP_COOKIE"]__utma=175311356.1644389473.1391382240.1404002180.1407262509.6; __utmc=175311356; __utmz=175311356.1398696554.4.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); _GPSLSC=
_SERVER["PATH"]/usr/local/bin:/usr/bin:/bin
_SERVER["SERVER_SIGNATURE"]<address>Apache/2.2.22 (Ubuntu) Server at business.openva.com Port 80</address>
_SERVER["SERVER_SOFTWARE"]Apache/2.2.22 (Ubuntu)
_SERVER["SERVER_NAME"]business.openva.com
_SERVER["SERVER_ADDR"]10.0.0.240
_SERVER["SERVER_PORT"]80
_SERVER["REMOTE_ADDR"]67.233.74.37
_SERVER["DOCUMENT_ROOT"]/vol/www/business.openva.com/htdocs/
_SERVER["SERVER_ADMIN"][no address given]
_SERVER["SCRIPT_FILENAME"]/vol/www/business.openva.com/htdocs/phpinfo.php
_SERVER["REMOTE_PORT"]18804
_SERVER["GATEWAY_INTERFACE"]CGI/1.1
_SERVER["SERVER_PROTOCOL"]HTTP/1.1
_SERVER["REQUEST_METHOD"]GET
_SERVER["QUERY_STRING"]ModPagespeed=off
_SERVER["REQUEST_URI"]/phpinfo.php?ModPagespeed=off
_SERVER["SCRIPT_NAME"]/phpinfo.php
_SERVER["PHP_SELF"]/phpinfo.php
_SERVER["REQUEST_TIME"]1410316998

@clintongormley
Copy link

@waldoj I've seen similar issues in the Perl client when bad JSON or bad UTF8 has been inserted into ES directly (ie not via the client). Could this be the case?

@waldoj
Copy link
Author

waldoj commented Sep 10, 2014

@clintongormley Do you mean the data being ingested contains mis-formatted JSON or UTF-8? If so, then I'm afraid that's not the case here. That was my initial suspicion, but unfortunately it wasn't borne out by my testing. This is the totality of the data being ingested (via a POST request directly to ElasticSearch, as you intuited):

[
    {
        "status": "60",
        "city": "IRVINE",
        "name": "IN-N-OUT BURGERS",
        "zip": "A9261-2000",
        "street-2": "",
        "street-1": "4199 CAMPUS DRIVE 9TH FL",
        "requestor": "ARNOLD WENSINGER          (CA)                    IN-N-OUT BURGERS",
        "state": "C",
        "date-expires": "2014-12-26",
        "type": "C",
        "id": "R000089"
    }
]

Obviously, the goal is to ingest much more, but this is my test record. It's valid JSON, and has no encoding errors, at least not that I can find. :) Though, now that you mention it, I think I'll try chopping this down to a single field (e.g., "name": "IN-N-OUT BURGERS"), to simplify further still. Thanks, though!

@clintongormley
Copy link

@waldoj do you wrap it in an array, as you show it there? The body should be an object only (ie {..}) not an array([..])

@waldoj
Copy link
Author

waldoj commented Sep 10, 2014

Hmm, that's interesting. I use the bulk API format, which I've been providing like such:

[{"index": {"_type": "8", "_index": "business"}},
{"status": "60", "city": "IRVINE", "name": "IN-N-OUT BURGERS", "zip": "A9261-2000", "requestor": "ARNOLD WENSINGER          (CA)                    IN-N-OUT BURGERS", "date_expires": "2014-12-26", "state": "C", "street_1": "4199 CAMPUS DRIVE 9TH FL", "street_2": "", "type": "C", "id": "R000089"}]

Now that you mention it, looking at the Bulk API documentation, there is no mention whatsoever of representing the entire request as an array. Elasticsearch itself happily indexes this data, which is why I figured that everything was A-OK with it. Perhaps, though, it's so liberal in what it's accepting that it winds up being a bug, not a feature. I'll try importing data again and see if that fixes it!

@waldoj
Copy link
Author

waldoj commented Sep 10, 2014

Fixed! @clintongormley, you were 99% of the way there. (Or 100%, and I didn't get it. :) The problem wasn't the array enclosures (removing the enclosing [] brackets didn't fix the problem), but instead the array structure—the existence of commas between each line. Ingesting the data into Elasticsearch went exactly the same as the other 100 times I've done it with this data—as always, Elasticsearch says everything's fine and, as always, Elasticsearch works great via cURL.

But now Elasticsearch-php works. I'm not quite sure what's going on here—how Elasticsearch was happy with invalid JSON that Elasticsearch-php balked at, but now it's fixed. Seems to me like this is primarily a bug in my own JSON, secondarily a bug-as-feature in Elasticsearch, and in no way a bug in Elasticsearch-php. As I wrote in the initial ticket:

There's a non-trivial chance that I'm doing something stupid here, but I can't figure out what it is.

Thanks for IDing the stupid thing I was doing, Clinton. :)

@waldoj waldoj closed this as completed Sep 10, 2014
@polyfractal
Copy link
Contributor

Leave it to a Perl guy to find the problem :)

Glad you got it working! @clintongormley had mentioned the illegal JSON syntax to me a while ago, but I didn't think it was a problem because your dataset worked just fine on my end (and I didn't see any invalid JSON). Still not sure why the problem didn't reproduce itself, perhaps ES was polling a different set of documents on my computer so it never showed up. Oh well.

Funnily enough, I have a bug report open at ES about this very issue: elastic/elasticsearch#7299

Elasticsearch only parses the first JSON object that it encounters. If that first JSON object is valid, the document is considered a success. The "gotcha" is that ES will still index the entire request body into the _source field, which can include invalid JSON.

Technically this isn't a problem for ES, since it only displays the _source in the response. All operations go against the indexed data structure. But for clients that have to parse JSON responses...it explodes.

I thought I was checking for invalid JSON and throwing an exception, but sure enough, it's just returning the output of json_decode: https://github.com/elasticsearch/elasticsearch-php/blob/master/src/Elasticsearch/Serializers/EverythingToJSONSerializer.php#L49

...which happens to be NULL if the JSON was invalid. Sigh. Should have noticed this. I definitely count this as a bug, so we'll get this fixed to throw a real exception and helpful text :)

Thanks again for the report and sticking through this whole time!

@waldoj
Copy link
Author

waldoj commented Sep 10, 2014

Oh, good—I'm glad this wasn't all for nothing, and that I wasn't 100% at fault. :) Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants