All my code works except for loading or executing hello.php. When running GDB it seemed like I got seg fault in the fread line of my code. The same piece of code works fine for html and jpg, thou.
bool load(FILE* file, BYTE** content, size_t* length)
{
fseek(file, 0, SEEK_END);
long fsize = ftell(file);
fseek(file, 0, SEEK_SET);
char* buffer = malloc(fsize+1);
fread(buffer, fsize, 1, file);
*content = buffer;
*length = fsize;
return true;
}