Cleanup PHP warnings, better query support

- values with spaces were not handled correctly, quote the value
- if the field is empty, allow passing a full query string
- drop timeout