[wp-hackers] preg_match_all() Crashes Server

Mike Little wordpress at zed1.com
Wed Mar 13 15:58:09 UTC 2013


On 13 March 2013 15:01, Mike Walsh <mpwalsh8 at gmail.com> wrote:

> A user of my WordPress Google Form plugin has run into an odd problem where
> visiting the Plugin Settings page results in a server crash.  I can't
> replicate it but he provided me access to a test site where I was able to
> determine that a call to preg_match_all() is what is crashing the server.
>
> I am not sure how to resolve this.  What I am doing is using
> wp_remote_get() to scrape the FAQ and Usage content for my plugin from the
> WordPress Plugin Repository (the content from the ReadMe file), extract
> what I want, and put the content on a tab on my Settings Page.  Doing this
> allowed me an easy way to add Help to my plugin within the Settings Page.
>
>
Wouldn't it be just as easy to read that info from the ReadMe file included
with the plugin? It would certainly save the remote call and the storage of
the retrieved file, headers, statuses etc. You could probably run the
standard the_content filter on it to turn it into basic HTML.

Mike
-- 
Mike Little
http://zed1.com/


More information about the wp-hackers mailing list