I am using netbeans 8.2 ide, Apache 2.4 with php7.
I have downloaded Bootstrap and am trying to link it into index.php i haven't far. When I test the example page on localhost I the error "css was not loaded because its MIME type, “text/html”, is not “text/css”"
Things I have tried (restarting the erver between each):
- "AddType text/css .css" in my httpd.conf file and also in vhost
- ensured php strict_mode is off (saw it in a post)
- checked mime.types for the type (which is there) text/css - css
changed default_mimetype = "text/html" to default_mimetype = "" in the php.ini file
I did a bit more research turns out PHP will parse .css as html for whatever reason and change its mime type ( not exactly sure how that all works but seems to be the case). So I renamed the .css files as .php files and added the code into each .css file
header('Content-type: text/css', true);
this did not work, I then added into index.php the following:
this just prevented the loading of the stylesheets because of lack of mime type at all! even in conjunction with Content-type.
also i have included a capture of the request and response headers to the serverenter image description here
thank you very much for any help this is very frustrating I'm trying to get into some basic web design but I can't even make it past the included Netbeans template. I have a feeling it's something to do with the configuration of PHP7 or Apache 2.4 but i have no idea were to go next