[14:22:43] I'd like to create unique numbers in some MediaWiki extension. I could add a new database table for that, though rather avoid the need to run update.php. Does MediaWiki provide any unique number facilities? [14:22:57] Either on PHP level or some table in the database that can be used for this [17:54:12] JeroenDeDauw: random_bytes? [17:55:14] depends on how large numbers you want I guess [18:47:56] unique numbers, could you tell more about the use case [18:48:20] uuid? [19:18:54] under /var/www/wiki I have -rw-------. 1 apache apache 8017 Jan 26 18:22 LocalSettings.php [19:19:55] DocumentRoot "/var/www/html" in httpd conf and Alias /wiki /var/www/wiki in mediawiki.conf [19:20:35] user apache runs httpd. and yet when i browse to http://myserver/wiki I get MediaWiki 1.32.4 [19:20:35] LocalSettings.php not found. [19:25:17] found my answer :-) https://www.mediawiki.org/wiki/Topic:V0nhdqvg0boqdg75 MW_INSTALL_PATH [20:21:31] tgr|away: harmaahylje: I should have specified that I want sequential numbers. 1 2 3 4. Not GUIDs or random integers [20:54:36] JeroenDeDauw: just increment the largest integer by one, usually the databases can handle this I believe [20:55:19] would be best to trust their implementation to avoid clashes [21:14:05] harmaahylje: I know I could do something like this code I wrote in 2012: https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/repo/includes/Store/Sql/SqlIdGenerator.php [21:14:27] I'm asking if there is something in MW I can use instead, since I rather avoid adding a new DB table [21:16:05] JeroenDeDauw: Well MediaWiki (at the php) level assumes an architecture of multiple application servers that don't really share permenent state outside of a database [21:16:12] So no [21:16:26] Unless you don't care about them being incremental, in which case you can generate them randomly [21:38:16] You can of course use memcache is you're not super concerned about consistency or that it works all the time [21:50:37] I was going to suggest memcached, indeed [21:53:04] but memcached is not persistent. Once you reset memcached it will reset to 0 [22:21:07] And even if you dont reset it that can still happen [23:07:35] You can use the object cache table, you'll have to supply your own cache config though [23:08:23] Or maybe there's a 'db' cache type, actually [23:27:28] yes, I think there is [23:27:55] I wonder what those number are for, though [23:28:08] perhaps the page id would be enough