1

i have been struggeling setting up a dev enviroment on my mac for a couple of hours now. Usually we just run docker-compose up and things work fine. On my windows computer all i had to do was create the tmp directory. On my mac however i cannot seem to fix it with this.

I have tried googling and reading on here but most people seem to have the obvious giveaway "folder" is not writeable which is fixed with the permissions or creating the structure. I usually would not ask but i am stomped here.

I have tried these things so far:

  • run chmod -R 777 tmp i know 777 is insecure bbut i´l worry about that when it works
  • Creating tmp structure
  • Reinstalling the docker image
  • Importing tmp structure from server and deleting pre-existing cache

Permissions are as follow:
On mac:

drwxrwxrwx 6 oddandre staff 192 Mar 14 14:19 tmp

In docker image

drwxrwxrwx 6 root root 192 Mar 14 13:19 tmp
-- drwxrwxrwx 6 root root 192 Mar 14 13:19 cache
---- drwxrwxrwx 3 root root 96 Mar 14 00:52 models
---- drwxrwxrwx 3 root root 96 Mar 14 00:52 persistent
---- drwxr-xr-x 2 root root 64 Mar 14 13:19 views
-- -rwxrwxrwx 1 root root 1977344 Mar 14 13:19 debug_kit.sqlite
-- drwxrwxrwx 3 root root 96 Mar 14 12:59 logs

All errors

Warning (512): _cake_model_ cache was unable to write 'default_seasons' to DebugKit\Cache\Engine\DebugEngine cache [CORE/src/Cache/Cache.php, line 286]

Warning: _cake_model_ cache was unable to write 'default_configs' to DebugKit\Cache\Engine\DebugEngine cache in /var/www/html/vendor/cakephp/cakephp/src/Cache/Cache.php on line 286

Warning (512): _cake_model_ cache was unable to write 'debug_kit_requests' to DebugKit\Cache\Engine\DebugEngine cache [CORE/src/Cache/Cache.php, line 286]

Warning (512): _cake_model_ cache was unable to write 'debug_kit_panels' to DebugKit\Cache\Engine\DebugEngine cache [CORE/src/Cache/Cache.php, line 286]

  • Where (full path) do you have the cache directory it's trying to access? – IncredibleHat Mar 14 '18 at 13:49
  • From the project folder it is in /tmp/cache as mentioned this is what worked previously and on windows – Odd Andre Vatne Mar 14 '18 at 13:52
  • Sorry, I read over that and wasn't paying attention to all the dashes indicating depth. Its not how I look at directories, so my bad. Have you tried somewhere else, to test. I know OSX has a lot of sandboxing going on and security restrictions on all its apps (this includes command line apps). /tmp may just be one of the 'NO!' locations. – IncredibleHat Mar 14 '18 at 13:55
  • Because in OSX /tmp is defined as: `lrwxr-xr-x@ 1 root wheel 11 Oct 11 2018 tmp -> private/tmp` – IncredibleHat Mar 14 '18 at 13:58
  • Oh sorry i misunderstood, i meant /tmp as in the root of the project folder. so type project/tmp not on my computers root. the complete path would be /Users/oddandre/Documents/Jobb/project/tmp – Odd Andre Vatne Mar 14 '18 at 14:02
  • I understand the frustration. Ah, ok... so its a new directory you made in your user home structure. Hmmmmmmmmm. Yeah, why isn't this working... – IncredibleHat Mar 14 '18 at 14:03

1 Answers1

1

After fighting with docker and cakephp the problem has been solved. A colleague helped and we came to the conclusion that the docker image was too old and was built without memcached.

After some adjustments to the webapp we switched over to memcached and the dockerimage i was using had not gotten that note. To fix this we ran docker-compose down -rmi all and rebuilt the image again. This fixed the problem.