Struggling to get a magento install up and running - i've been using magento for years and never had this issue before.

Running ubuntu 16.04 on a vagrant box with php 5.6, trying to install either CE or EE, install appears to run correctly, all tables created etc, but no data is being added to core_config_data so any attempts to log in are getting an 'invalid form key' error.

I've checked apache and mysql logs and there's nothing in there to help. What am i missing?

  • Hello @Andy, welcome! Other tables (such as core_resource for example) contain proper entries in your setup? Did you maybe install sample data as well? – Christoph Farnleitner Jan 20 '18 at 17:14
  • yes, core resource is populated and looks normal as far as i can see. the only table that i've seen that isn't populated correctly is core config - could there be something server level stopping it - a missing extension? – Andy Jan 20 '18 at 17:16
  • Sample data installed? – Christoph Farnleitner Jan 20 '18 at 17:21
  • no, im just trying to do a completely clean install. I've got other installs of magento that i've cloned from live servers and they're running fine as the core_config_table is already populated. – Andy Jan 20 '18 at 17:22

After running yet another fresh install i got the first 8 entries mentioned in @christoph-farnleitner, but nothing more. Still couldn't get the site to load. As a last ditch effort, i copied the code over to a wamp server on the same machine and it fired up first time, so issue definitely seems to be server related. When i tried copying over the DB from wamp to vagrant, I ran into some mysql errors that weren't being logged/displayed on the installer. So after going round the houses several times, it appears that the issue was actually to do with the mysql conf settings.

I'm using mysql 5.7 which out of the box doesn't seem to like the default date values from the magento installer and it was these dates that were causing the data to be missed. It affected several tables, not just core_config_data, but that was the most obvious one.

Running the install from command line worked, so this told me that it was a server config issue.

After more digging around, it appears that strict mode on MYsql 5.7 doesn't like magento default dates, so the fix was to add:


to /etc/mysql/my.cnf

  • Great, that you figured out what caused the troubles and updated your question! – Christoph Farnleitner Jan 24 '18 at 4:08

In general - at least for a completely fresh install I can confirm this - an empty core_config_data table does not prevent you from logging in to the backend. In fact, there is hardly any data stored in this table during the initial setup.

Data that would be stored while the setup:


Even though one may think so, in general none of these entries are critical if missing (again, at least in an empty setup).

That being said, two points are to be mentioned:

First of all, personally, I would not want to go with a setup that starts up in such an odd way and I would most likely just go for a re-install from scratch in order to be on the save side.

Secondly, since the empty core_config_data table should not be the cause of the login problem the most common fixes for this problem are:

  • Deleting web/cookie/cookie_domain and web/cookie/cookie_path from core_config_data (definitely not applicable here but just mentioning it for the record)
  • However, the actually better approach might be to explicitly SET them if this problem occurs
  • Make sure that the location at which session data would be stored is actually write-able (some reference on permission and file ownership: http://devdocs.magento.com/guides/m1x/install/installer-privileges_after.html)
  • Make sure the hidden input field "form_key" is present in the login form (https://www.screencast.com/t/vb5TqmU2 / <input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" /> in app/design/adminhtml/default/default/template/login.phtml)
  • Clear all temp data such as var/session, var/cache and var/tmp
  • 1
    Thanks for the detailed answer - i'll run another install, see if this works – Andy Jan 20 '18 at 22:32
  • Tried the above and still no luck. I've tried using the same code on wamp and that has worked - when i dumped the db and attempted to import this to the vagrant box, i did see an sql eror on default dates - gut feel is this as a mysql config eror – Andy Jan 21 '18 at 11:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.