IRC logs

20141221

Logs from channel #fedext on freenode - our official support channel.

IRC log range: 20141221*

20141221

  • 21:20:23 <Outdoorsman> Hi
  • 21:39:34 <Outdoorsman> Does anyone know how to properly clear TYPO3 CMS cache from the command line?
  • 21:44:17 <NamelessCoder> hi Charles - it depends how much of the cache you want to clear
  • 21:45:48 <NamelessCoder> https://github.com/helhum/typo3_console should help a lot though
  • 21:55:38 <Outdoorsman> Here's the scenario... when I update the TYPO3 CMS source from 6.2.8 to 6.2.9 it now requires a clearing of the cache... TYPO3 CMS 4.x didn't require this. I need a way to clear cache for all sites using 6.2.x source so I don't have to log into each one and manually clear cache.
  • 21:56:48 <NamelessCoder> if all else fails: write a tiny script that deletes everything from typo3temp recursively and runs TRUNCATE TABLE on all cf_* tables
  • 21:57:48 <Outdoorsman> I have a script already but it was causing sites to go "all white" because I wasn't deleting the right things and couldn't find documentation on what it should be.
  • 21:58:23 <NamelessCoder> most likely because of not truncating the class reflection table in particular
  • 21:58:42 <Outdoorsman> So when updating source... I should:
  • 21:59:13 <Outdoorsman> 1. Delete the content of EVERY directory in the typo3temp folder but not the folders themselves so I don't have to recreate them
  • 21:59:24 <NamelessCoder> delete the folders as well
  • 21:59:41 <NamelessCoder> if you properly clear all cf_* and cache_* tables those are written automatically
  • 21:59:48 <Outdoorsman> but when I do that it seems to complain in the INSTALL tool that the folders don't exist.
  • 22:00:11 <NamelessCoder> cache_pages needs to be cleared for those to be written (request routing does not try to use cache)
  • 22:00:16 <Outdoorsman> I've never deleted anything from MySQL manually though. let me look that up.
  • 22:01:29 <Outdoorsman> So let's start over:
  • 22:01:39 <Outdoorsman> 1. rm -rf typo3temp/*
  • 22:05:30 <Outdoorsman> 2. SELECT concat('TRUNCATE TABLE `', TABLE_NAME, '`;')
  • 22:05:30 <Outdoorsman> FROM INFORMATION_SCHEMA.TABLES
  • 22:05:30 <Outdoorsman> WHERE TABLE_NAME LIKE 'cf_%' AND TABLE_SCHEMA = 'the_desired_database'
  • 22:05:52 <Outdoorsman> ****
  • 22:06:59 <Outdoorsman> I sure wish there was a way to use command line to do this sort of thing.
  • 22:08:02 <NamelessCoder> there is a way to use the CLI for that but it involves piping and parsing
  • 22:08:39 <Outdoorsman> To guarantee that only the appropriate tables are cleared I have to also write something to parse the TYPO3 config file to find the TYPO3 database being used.
  • 22:09:13 <NamelessCoder> I don't know how typo3_console does it, but there is a chance it avoids the class reflection caches in the clear cache command and would work
  • 22:09:43 <Outdoorsman> I believe this functionality is avilable via CLI in TYPO3 NEOS.
  • 22:11:07 <NamelessCoder> probably true, but it uses a completely different way of loading classes
  • 22:12:01 <NamelessCoder> try typo3_console from the link - maybe it "just works"
  • 22:12:19 <Outdoorsman> What is this? http://stackoverflow.com/questions/15357844/how-to-clear-the-cache-in-typo3-from-an-external-script
  • 22:12:48 <NamelessCoder> focus please :)
  • 22:12:55 <Outdoorsman> ha ha
  • 22:12:58 <NamelessCoder> this solution also loads TYPO3 classes
  • 22:13:21 <NamelessCoder> you've got me, there's no need to stackexchange in this case ;)
  • 22:14:04 <NamelessCoder> I'll check typo3_console source
  • 22:15:03 <NamelessCoder> it uses the cache... may work still because of manual bootstrapping of typo3 in cli commands
  • 22:16:15 <Outdoorsman> I am still looking for the commands you can run in typo3_console
  • 22:16:25 <NamelessCoder> follow the install description
  • 22:16:31 <NamelessCoder> then run ./typo3cms
  • 22:17:05 <Outdoorsman> So I'll get the details from the command line ehhh
  • 22:17:20 <Outdoorsman> Here's goes...
  • 22:23:53 <NamelessCoder> any joy?
  • 22:29:00 <NamelessCoder> gotta go - but essentially, if typo3_console won't work then you need that manual script. The key is to clear those cache_ and cf_ tables at the same time as you remove the temp files