IRC logs for #farmOS, 2023-06-18 (GMT)

2023-06-17
2023-06-19
TimeNickMessage
[12:01:40]* adinfinitum[m] has quit (Remote host closed the connection)
[12:27:56]<symbioquine[m]>I'm running into some weird caching behavior where hooks in my `.module` file use old versions for some time after I update the code - even after a cache clear (`drush cr`)...... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/7e796ecd7b...)
[12:28:51]<symbioquine[m]>It's not caching at the http/reverse-proxy level because my logging in php is running each time. (Just the old version)
[12:43:03]<symbioquine[m]>It's not a caching/propagation issue at the Docker/filesystem layer because I can see the changes right away with docker-compose exec www2 cat.
[12:50:21]<wotnak[m]>opcache has separate enable_cli configuration option for enabling/disabling it on cli, so checking if it is enabled by executing php code from cli can have different results than what is actually used for drupal
[12:50:42]<symbioquine[m]>ah, okay
[12:51:09]<symbioquine[m]>I'll try logging that from my .module file...
[12:52:16]<wotnak[m]>you can also go to /admin/reports/status/php on your farmos instance and search for 'opcache.enable'
[12:53:51]<symbioquine[m]>wotnak[m]: Looks like that was it...
[12:53:54]<symbioquine[m]>ACTION uploaded an image: (51KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/trzeMBeqetm... >
[12:54:08]<symbioquine[m]>I guess my *php.ini isn't getting applied.
[12:54:58]<symbioquine[m]>I have a file called php-custom.ini which I'm putting at /usr/local/etc/php/conf.d/php-custom.ini via a docker mount...
[12:58:32]<symbioquine[m]>ACTION sent a shell code block: https://libera.ems.host/_matrix/media/v3/download/libera.chat/f8650ce68e...
[12:59:21]<mstenta[m]>ah cool! TIL! I didn't know about the separate setting for opcache cli either!
[13:23:05]<symbioquine[m]>So the *php.ini files are getting loaded;
[13:23:07]<symbioquine[m]>ACTION uploaded an image: (35KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/QowEGAwkSNg... >
[13:23:48]<symbioquine[m]>But not applied...
[13:23:50]<symbioquine[m]>ACTION uploaded an image: (3KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/OPykEkATbfc... >
[13:24:17]<symbioquine[m]>ACTION uploaded an image: (4KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/YnryWugbUAu... >
[13:24:56]<symbioquine[m]>ACTION sent a shell code block: https://libera.ems.host/_matrix/media/v3/download/libera.chat/afb29e4357...
[13:43:13]<symbioquine[m]>Wow, okay I figured it out...
[13:43:23]<symbioquine[m]>Turns out that I just hadn't restarted the whole container.
[13:44:47]<symbioquine[m]>We can chalk this one up to user error 😅
[13:46:11]<mstenta[m]>Are you mounting them as individual files into the container?
[13:46:24]<symbioquine[m]>Which?
[13:46:29]<symbioquine[m]>My modules?
[13:47:32]<mstenta[m]>I learned recently that when you mount individual files (instead of directories) then changing the files outside of the container *sometimes* changes the inode of the file itself, which means that the file inside the container is the old one
[13:47:47]<mstenta[m]>Until you restart the container
[13:48:30]<mstenta[m]>(Depends on how the files are edited maybe. It happened to me with Ansible)
[13:48:39]<symbioquine[m]>I'm mounting a directory '../farmos_2x_custom_modules:/farmos_2x_custom_modules' which contains directories that are my actual modules...
[13:48:50]<mstenta[m]>Ok nevermind :-)
[13:50:06]<mstenta[m]>Oh I was wondering about your INI files
[13:50:15]<mstenta[m]>But maybe those arent being mounted
[13:50:26]<symbioquine[m]>symbioquine[m]: Then I'm doing;... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/5df91a306d...)
[13:51:21]<symbioquine[m]>mstenta[m]: Oh, yeah that could be an issue also. But in this case I'm pretty sure the main issue was that they (the `.ini` files) don't seem to be reloaded without an Apache (in this case the whole container) restart.
[13:51:21]<mstenta[m]>> The *php.ini files don't seem to be reloaded except when Apache restarts.
[13:51:21]<mstenta[m]>This is what I was responding to
[13:51:46]<mstenta[m]>(On my phone so not as fast) :-)
[13:51:52]<symbioquine[m]>np
[16:47:17]* farmBOT has joined #farmos