Broken Images / CSS or "Forbidden: PHP engine is disable" in Magento 2.0

If you see the error "Forbidden: PHP engine is disable." or a page without images or CSS after you installed Magento 2.0, here's what you need to do:-


1. Open the following file:-
/pub/static/.htaccess

2. Comment out the following by adding a "#" in front of it:-
<IfModule mod_php5.c&gt;
php_flag engine 0
</IfModule&dt;

<IfModule mod_php7.c&gt;
php_flag engine 0
</IfModule&dt;

3. So they will look like this:-
<IfModule mod_php5.c&gt;
#php_flag engine 0
</IfModule&dt;

<IfModule mod_php7.c&gt;
#php_flag engine 0
</IfModule&dt;


You may also need to set the correct file permissions for Magento.


  • 10 Users Found This Useful
Was this answer helpful?

Related Articles

What PHP version to use for Magento 2?

The best PHP version to use for Magento 2 (for now) is PHP 5.6. If you are using our Web Hosting...

How to change the Admin Path for Magento 2.0?

To change the Admin Path for Magento, please open up the file below:- /app/etc/env.php Look for...

How to change the Database for Magento 2.0?

To change the Admin Path for Magento, please open up the file below:- /app/etc/env.php Look for...

How do I set the correct file permissions for Magento?

Magento installation out of the box does not use the correct and safe file permissions for our...

Issue when switching to Production mode in Magento 2

When trying to switch from Developer mode to Production mode:- php bin/magento deploy:mode:set...