NetBSD and problem with rendering php under apache2.4

If you install Apache2.4 with php5 on NetBSD and having trouble rendering php files (the php code is shown when opening a php document from the website) try running the httpd binary manually and you might recieve this error:

[:crit] [pid 3793:tid 140187728347136] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
AH00013: Pre-configuration failed

Assuming you already have these lines in the httpd.conf:

LoadModule php5_module lib/httpd/mod_php5.so
AddHandler application/x-httpd-php .php

Comment out the following line in httpd.conf:
# LoadModule mpm_event_module lib/httpd/mod_mpm_event.so

Insert this line:
LoadModule mpm_prefork_module lib/httpd/mod_mpm_prefork.so

start/restart your httpd:
/etc/rc.d/httpd restart

Hopefully this fixes it, otherwise debug running the httpd command alone.