Title: plugin saving options crashes apache with xampp
Last modified: August 22, 2016

---

# plugin saving options crashes apache with xampp

 *  [Michael](https://wordpress.org/support/users/lilmike/)
 * (@lilmike)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-saving-options-crashes-apache-with-xampp/)
 * Hi,
    I’m currently working on a plugin, and whenever I go to save its options
   apache on xampp crashes. I can’t really test my option saving method any other
   way, so I was wondering if anyone had run across this or might be able to look
   at my code (it’s not much, yet) to see what could possibly be causing it? If 
   not, can someone recommend a good way to debug what line of php is causing it
   to crash — the only thing in the error log is it segfaulting. For reference, 
   when I save options from a normal wordpress default page, it doesn’t crash, only
   when I save options from my plugin. Thanks, -Michael. P.S. almost forgot… dropbox
   link: [https://www.dropbox.com/s/jhhrv5f1wf4zo8v/2mb-autocode.zip?dl=0](https://www.dropbox.com/s/jhhrv5f1wf4zo8v/2mb-autocode.zip?dl=0)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-saving-options-crashes-apache-with-xampp/#post-5238849)
 * QRZ
 * You are discovering that developing code in this server and browser environment
   can be tricky, often several different languages in use, and in environments 
   that keep you at arm’s length.
 * What I do is output a running narrative of how the code is executing, where it
   has got to, and what values it has calculated. Because of the segfault, you will
   be examining where you got to before the fault, and commenting out crucial calls.
   This will identify just which call and what arguments are causing the segfault.
   I wish there was an easier way.
 * I have checked, your code has no syntax errors.
    [http://www.piliapp.com/php-syntax-check/](http://www.piliapp.com/php-syntax-check/)
 * I notice that many of your id fields and names have a leading digit (“2”), is
   this good practice ?
 *  Thread Starter [Michael](https://wordpress.org/support/users/lilmike/)
 * (@lilmike)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-saving-options-crashes-apache-with-xampp/#post-5238874)
 * Hi,
    I guess that’s the problem. It never actually gets to the next page. I enter
   my data, and then press save, it waits for a few seconds, then comes up with 
   this program has stopped working message for apache. My only thoughts are the
   sanitization functions I defined are doing it, unless it’s something in wordpress
   itself. I’ll definitely see what I can figure out with your suggestions though.
   As for 2mb with 2 in front, I’m not sure if it’s good practice or not, I just
   did it because that’s the beginning of our website. Thanks, -Michael.
 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-saving-options-crashes-apache-with-xampp/#post-5238883)
 * You are crashing in one of:
    * WordPress functions * PHP functions * underlying
   mySQL functions I don’t see many other options.
 * So progressively comment out various categories of function call. Take out more
   and more until it no longer crashes, then re-enable functions until it starts
   crashing again. You will end up with a minimal functional program which does 
   not crash, one in which un-commenting any function causes it to crash again.
 * Then the question can be re focused onto why.
 *  Thread Starter [Michael](https://wordpress.org/support/users/lilmike/)
 * (@lilmike)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-saving-options-crashes-apache-with-xampp/#post-5238895)
 * Hi,
    Thanks for your advice. I will go ahead and start doing this. -Michael.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘plugin saving options crashes apache with xampp’ is closed to new replies.

## Tags

 * [Crash](https://wordpress.org/support/topic-tag/crash/)
 * [custom plugin](https://wordpress.org/support/topic-tag/custom-plugin/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/lilmike/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-saving-options-crashes-apache-with-xampp/#post-5238895)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
