Developer Guide: General Troubleshooting

From Mothership
Jump to: navigation, search


Below is a list of common issues developers may face when setting up their Mothership installation. We will populate this list as more issues get reported on our Github repositories or as we receive more feedback from other channels.

PHP setting issues

Some issues with Mothership can be resolved by adjusting PHP configurations in your php.ini file. To find the location of this file, enter php --ini into your terminal. This will bring up a list of all PHP config files. It is possible that your command line interface and your server use different PHP configurations. To confirm which one is used by your server, create a file called phpinfo.php in your main sites folder, and add this to it:



Open this file in your browser (e.g. http://localhost/phpinfo.php). This should render a large, purple table, full of information about your PHP configurations. Look for the row labelled Loaded Configuration File, this will let you know where to find the correct php.ini file.

Here are some common issues and how to solve them:

A page in the admin panel won't load

Github issue:

If you have xDebug installed, it's possible that the max_nesting_level is too low. It is set to 100 by default, but Symfony Form can have problems rendering more complex forms with this limitation. It is recommended that you set xdebug.max_nesting_level to at least 250 (although it's worth bearing in in mind that Symfony developers generally have theirs set to 1000).

Note: This config setting might be in a file called ext-xdebug.ini

Installer runs out of memory

Github issue:

When running the installer, you may see an error show up that looks something like:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /var/www/mothership/mothership/vendor/twig/twig/lib/Twig/Node/Expression/Array.php on line 17

This error should not have actually broken the installation process and the installation should complete. This error was caused because the memory_limit was too low, and Cog could not copy the HTML views, CSS and JavaScript files over to the public directory. To prevent this issue, set the memory_limit to at least 256M.

You can also run the commands manually in the terminal to copy over the views and minify the assets:

  • bin/cog asset:generate
  • bin/cog asset:dump