What’s the problem?
After theme installation, you receive PHP Fatal error similar to:
Fatal error: Maximum function nesting level of ‘100’ reached, aborting! in C:\wamp\www\kapitalprojetos\wp-content\themes\cleanstart\assets\wp-less\lib\vendor\lessphp\lib\Less\Tree\Ruleset.php on line 311
Why is this happening?
A PHP setting restriction is the case here. On 99% of the cases, this is an issue rising up on PHP installations that use the XDEBUG extension. By default, XDEBUG sets the maximum nesting level setting to 100, which apparently does not allow Plethora’s LESS compiler to complete its tasks.
What to do now?
The easy way: you can easily fix this issue by adding the following line on your functions.php file ( preferably on child theme’s functions.php file that you should be using! ) :
The php.ini way: please go with this only if the previous didn’t work! In this case you have to edit your php.ini file. If you don’t know where to find the php.ini file or if you are allowed to access it, please check this great article and follow the instructions included. If you still don’t find your way with it, you should contact your hosting provider support to ask for help with this issue.
After you find the php.ini file (or any other PHP settings override file) you go with the following:
1. Open the file with your notepad or any other simple text editor
2. Locate XDEBUG Extension settings on the file, usually on the end of the file (check IMG 1)
3. After the main XDEBUG extension line, edit OR add the line: xdebug.max_nesting_level = 500
4. Save php.ini file and restart your Apache server ( or any other server you use ) for the updated settings to be applied.
5. If you are still receiving the error, then apparently you should repeat steps 3 + 4 with a higher nesting level ( > 500 ).
6. Alternatively, if the problem insists, you could disable XDEBUG completely (check IMG 2 example)…don’t forget the step 4!
VALID FOR ALL VERSIONS OF CLEANSTART