I’m using MAMP Pro to drive the servers so I can develop a Magento site locally. I am new to Magento development and ended up starting over because of several errors I coded. I deleted the previous database out, created a new url in MAMP Pro (i.e devmagento.com:8888) which pointed to a new folder I created, dropped the Magento Community edition in the folder, went through the install process, and everything installed perfectly. Right after installation, I tried going to the Manage Categories page and noticed that it loads part of the header until it gets to “Logged in as bassplayer7”. After that there is nothing – just grey. All other admin pages work (I haven’t tried every single one, but the ones I’ve tried have).
Other then reindexing and turning the cache off I did not make ANY changes before going to the categories page. No uploads, no config changes, etc.
In troubleshooting the problem, I turned on logging (in Admin>Config) and the Profiler. The logging seems to only log the front end.
I’m at a bit of a loss as to what to look for. I also went into var/cache, and cleared that.
Any help is appreciated!!
One of the first things to do on a fresh Magento development host is to switch on the developer mode.
The reason is, that by default Magento will try to hide all error messages, unless the developer mode is enabled.
How to enable the Developer Mode
There are several ways to accomplish this. The first two options can only be considered quick hacks because they are not upgrade safe. The third option is the right way to do it.
Option 1
In the Magento root directory you will see a file called
.htaccessPut the following code at the top or bottom of that file.
The reload the backend page and hopefully you will see an error message.
Warning: The .htaccess file is part of the Magento core and it will be overwritten during upgrades. Also do not deploy it to a live server with that setting in place.
Option 2
Open the file
index.phpin the Magento root directory.Around line 66 you will see the following code:
Change that so the developer mode is enabled regardless of the
MAGE_IS_DEVELOPER_MODEsetting.Warning: The index.php file is also part of the Magento core and it will be overwritten during upgrades, just like the .htaccess file. Also do not deploy it to a live server with that setting in place.
Option 3
The right way to enable the developer mode is to place the setting in the apache configuration, e.g. the vhost declaration. I don’t know where MAMP Pro keeps them, but for a regular apache on OS X I use the /etc/apache2/extra/httpd-vhosts.conf to configure my development hosts. Here is a sample entry:
The benefit of doing it this way is that you can deploy all files unchanged from the development server to the staging server, and from the staging server to the live server.
Further debugging
Once the developer mode is enabled you will hopefully see an error message instead of just a grey screen.
If that doesn’t help (still no message), check the Magento log files. They are inside the Magento root directory in the subfolder
Check them for any error messages like “Invalid block class”, or “invalid template…”.
Still no luck?
Check the Apache or PHP error logs. They are outside of the Magento installation, and the location depends on the system configuration. Maybe PHP error logging still needs to be enabled. Check with MAMP Pro how to do that with that bundle.
The PHP setting in question is
log_errors.Speaking of PHP settings… You will also want to make sure that
display_errorsis set toOn. Otherwise the most hardcore errors (e.g. syntax error that abort compilation) won’t be visible, regardless of the developer mode.