S
snowman
Guest
The following C code, when compiled will produce a 500 error when ran through Apache (if ran through an SSH session, it's fine).
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Content-type: text/plain\n\n");
printf("Hello world
\n");
system("whoami");
return 0;
}
If I remove the system() call, it works fine. If I change it to system(""), it also works. Just... having something in there causes it to fall over. Any idea why this would be?
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Content-type: text/plain\n\n");
printf("Hello world

system("whoami");
return 0;
}
If I remove the system() call, it works fine. If I change it to system(""), it also works. Just... having something in there causes it to fall over. Any idea why this would be?