# Runs locally, crashes on Apache



## drhowarddrfine (Nov 7, 2011)

I'm stuck in a hotel for a few weeks so I brought a FreeBSD box with me to tinker with. I installed Apache 2.2 on it and hooked it up through a router to my laptop. I wrote some code in C to output a simple web page and all works fine, I do this all the time, but I added some more code to the program and it crashed on Apache.

If I run the code and just print to standard output, it works great. If I copy it back to cgi-bin in Apache, it crashes. What's really strange is, if I remove the new code, it still crashes in Apache. 

To make matters worse, I created another simple program to do the same simple stuff the first one did, and it worked on Apache.

Does any of this ring a bell with anyone that can point me in the right direction to solve this? I know it's not a lot to go on but I've been beating my head against the wall since yesterday.

EDIT: Now I can't even get a simple program to run. Now it prints on the screen 
	
	



```
/usr file system is full
```
 yet I don't read/write anything. I'm questioning whether I might have corrupted Apache on some of my tests before.

EDIT: Oh wait! Filesystem full!


----------



## drhowarddrfine (Nov 7, 2011)

Ok. So apparently some of my confusion was induced by not noticing the size of the core files being dumped. So when I tried executing the file, it would work after I deleted some of those but not work if I put it off (cause I used them for debugging).

But if that doesn't work, I'll be back.

EDIT: Still having problems but my simple program now works. However, I'm back to the original issue where the added functionality works locally but hangs Apache. iow, it runs continuously as shown in top along with a STATE of wdrain (at times).


----------



## drhowarddrfine (Nov 7, 2011)

So I went for a drive. Came back. Didn't do nothin'. And now everything works. Go figure. I'm sure it won't work later.


----------

