I have Googled my heart out looking for an answer to this but cannot find one! I know it seems like a Stack Overflow sort of question but I didn't have these problems before I ran it through fastCGI which makes me think it is server related.
I have followed this tutorial: https://gist.github.com/gmodarelli/5887778 to use PHPFarm to set a different version of PHP for a specific vhost file.
The vhost file is as follows:
NameVirtualHost *:80 <VirtualHost *:80> ServerName dev.[site name] ServerAlias *.[site name] VirtualDocumentRoot /files/web/%1/public_html </VirtualHost> <Directory /files/web> AddHandler php-cgi .php Action php-cgi /cgi-bin-php/php-cgi-5.6.25 <FilesMatch "\.php"> SetHandler php-cgi </FilesMatch> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order deny,allow Allow from all Require all granted </Directory>
I am trying to run Magento, something I have done many times before, but CSS is not being loaded and am getting the following in the dev console:
Resource interpreted as Stylesheet but transferred with MIME type text/html
The response header for the file is:
Connection:Keep-Alive Content-Type:text/html; charset=UTF-8 Date:Fri, 06 Jan 2017 02:26:28 GMT Keep-Alive:timeout=5, max=99 Server:Apache/2.4.18 (Ubuntu) Transfer-Encoding:chunked X-Powered-By:PHP/5.6.25
Accept:text/css,*/*;q=0.1 Accept-Encoding:gzip, deflate, sdch Accept-Language:en-AU,en;q=0.8 Cache-Control:no-cache Connection:keep-alive Cookie:magento_downloader_session... blah blah Host:magento.[site name] Pragma:no-cache Referer:http://magento.[site name]/downloader/ User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
I have tried adding
SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|ico|png)$ \ no-gzip dont-vary SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ \no-gzip dont-vary SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0 no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
But this didn't work.
I have tried setting
zlib.output_compression=Off zlib.output_compression_level = -1
zlib.output_compression=On zlib.output_compression_level = 6
in php.ini. No dice.
I have added
AddType text/css css to the root htaccess file but, again, no luck.
I am running thin on Google search terms and patience! Can anyone help me with this please?
I have just tried setting all of the permissions to files: 664 and folders 775 but still not working.
Just as a test i have commented out the lines
AddHandler php-cgi .php Action php-cgi /cgi-bin-php/php-cgi-5.6.25 <FilesMatch "\.php"> SetHandler php-cgi </FilesMatch>
This fixed the issue but, obviously, stops using the version of PHP I need
Any help at all on this would be amazing. Please!