DrupalDork.com was shut down on September 18, 2013. This is just a snapshot of the site as it appeared then.

QuickPost Bookmarklet on Dreamhost VPS with Suhosin

This is probably the third time I've fixed this problem, so it seemed time to write down the solution.

On my personal sites, I make use of one my own modules, QuickPost Bookmarklet. The module geenrates a bookmarklet that allows you highlight text on a page and begin a new blog post on your own site from it.

My sites are hosted on a Dreamhost VPS, and once in a while, this bookmarklet stops working on me: if I select a longer piece of text, it won't pre-fill the body text area on the node add form. The title value still works, but not the body, suggesting that the server was ignoring (rather than truncating) that query value if it's too long.

The problem lies with Suhosin, which is enabled (I think?) by default. The offending setting is suhosin.get.max_value_length, which keeps getting set back to 512. I'm not exactly sure how it works, because I found that the values in the query string actually stopped working somewhere around 700 characters, but no matter.

The fix was just to add a line to my php.ini file. On my VPS, this is located at /etc/php53/php.ini.

suhosin.get.max_value_length = 10000

Restart Apache, and you're good to go.

Category:

Add new comment