Server Handbook live check: run log ------------------------------------------------------------------------------ Tool https://serverhandbook.com/tools/ojs-galley-pdf-cover-page Check scripts/live/checks/tool-ojs-galley-pdf-cover-page.mjs (sha256 fb5282a4e89b56e04fbb1ca9ed7c0823d7935d19a168bf6ee15e758bfd89e952) Ran at 2026-12-05T08:30:45Z (279 s) Result PASS, all 21 claims held Tested on System Ubuntu 26.04.1 LTS Kernel 7.0.0-44-generic Package nginx 1.28.3-2ubuntu1.14 Package mariadb-server 1:11.8.6-5ubuntu0.1 Package php-fpm 2:8.5+99ubuntu1 Package poppler-utils 26.01.0-2ubuntu0.3 Package ojs 3.5.0.6 Setup A fresh Ubuntu 26.04 server (4 GB of memory) with OJS 3.5.0.6 installed as lesson 1 of the OJS course installs it (Nginx, PHP-FPM, MariaDB, the files folder in /var/www/files; done by the check before the first step shown; the site name journal.example.com points to it through an /etc/hosts line, as your DNS would), reached over SSH as a sudo user. Every version above was read from the server at run time. Passwords used on the throwaway test server are shown as [password]. How we test: https://serverhandbook.com/how-we-test ------------------------------------------------------------------------------ What the steps changed on the server (recorded before the first step and after the last) Packages added (0) Packages upgraded (0) Packages removed (0) Services enabled at boot (0) Services disabled (0) Listening sockets opened (0) Listening sockets closed (0) Files added in /etc (0) Files changed in /etc (0) Files removed from /etc (0) Disk used on / (includes logs written during the run): +1.7 MB ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Claims (21), each with what the run saw ------------------------------------------------------------------------------ 1. ok a bare Ubuntu 26.04 server box (web-server) starts 2. ok the tool refuses an encrypted PDF, one over 200 MB, Urdu or Chinese cover text and a bad DOI, each with its reason (local check: all pass) | files: /tmp/ojs-cover-6IriFT | PASS the covered PDF has 4 pages (3 + the cover) | PASS no warnings for a plain galley | PASS pdf-lib reads the covered file back | PASS the cover has the first page’s size (A4) | PASS pdfinfo: page count went from 3 to 4 | PASS pdftotext: the cover's text holds "Journal of Open Library Systems" | PASS pdftotext: the cover's text holds "ISSN 2345-678X" | PASS pdftotext: the cover's text holds "Moving a journal to a new server without losing its statistics" | PASS pdftotext: the cover's text holds "Sara Khan, José Núñez, Zoë Müller" | PASS pdftotext: the cover's text holds "https://doi.org/10.12345/jols.v4i2.41" | PASS pdftotext: the cover's text holds "Creative Commons Attribution 4.0 International License (CC BY 4.0)" | PASS pdftotext: the cover's text holds "https://creativecommons.org/licenses/by/4.0/" | PASS pdftotext: the citation is on the cover, filled | PASS pdftotext: original page 1 is page 2, text identical | PASS pdftotext: original page 2 is page 3, text identical | PASS pdftotext: original page 3 is page 4, text identical | PASS pdffonts: Noto Serif is there, embedded, with a ToUnicode map | PASS the cover adds under 150 KB (the font, compressed, and one page) | PASS pdffonts: the galley’s own font (Helvetica) is unchanged, not embedded as before | PASS pdftoppm: the cover’s letters render (dark pixels > 1500 at 40 dpi; the blank-letter fault gave 874) | PASS refused: not a PDF | PASS refused: an encrypted PDF | PASS refused: a PDF over 200 MB | PASS refused: an empty title | PASS refused: a DOI not starting with 10. | PASS refused: Urdu in the title (no shaping) | PASS refused: Chinese in the authors (no CJK font) | PASS refused: a control character | PASS refused: a bad ISSN | PASS the preview is the cover alone, on US Letter | PASS DOI: https://doi.org/, doi: and bare forms all read | PASS DOI may be empty (no DOI line) | PASS citation: empty issue and pages leave no "()" or ":" | PASS Greek and Cyrillic are printable | PASS bulk: the CSV plans 2 covers | PASS bulk: a row’s licence column overrides the form | PASS bulk: one zip with both PDFs | PASS bulk: unzip + pdfinfo: a.pdf 4 pages, b.pdf 2 pages | PASS bulk refused: an unknown column | PASS bulk refused: a PDF not chosen | PASS bulk refused: an empty title on its row | PASS bulk refused: a bad DOI on its row | PASS bulk refused: the same PDF twice | PASS bulk: an encrypted PDF stops the batch, no zip | | ALL PASSED 3. ok (setup) the site name points to this server 4. ok (setup) Nginx, MariaDB, PHP-FPM and the PHP extensions 5. ok (setup) database and user ojs 6. ok (setup) OJS 3.5.0-6 from pkp.sfu.ca into /var/www/ojs 7. ok (setup) cache/, public/, config.inc.php for www-data 8. ok (setup) the Nginx server block 9. ok (setup) /var/www/files for www-data, mode 750 10. ok (setup) the web installer (posted with curl) 11. ok (setup) config.inc.php root:www-data 640 (the installer set allowed_hosts) 12. ok (setup) OJS is installed and its sign-in page answers | installed = On | 200 13. ok (setup) the journal "Example Journal" (/example) created through the API | {"_href":"http:\/\/journal.example.com\/index.php\/example\/api\/v1\/contexts\/1","abbreviation":{"en":""},"about":{"en":""},"acronym":{"en":"EJ"},"additionalHomeContent":{"en":""},"agencies":null,"announcementsIntroduction":{"en":""},"authorGuidelines":{"en":"

Authors are invited to make a submission to this journal. All submissions will be assessed by an editor to determine whether they meet the aims and scope of this journal. Those considered to be a good fit will be sent for peer review before determining whether they will be accepted or rejected.<\/p>

Before making a submission, autho 14. ok pdfinfo: each covered galley has one page more than its original (3 → 4, 2 → 3) | originals/groundwater.pdf Pages: 2 | originals/soil-moisture.pdf Pages: 3 | covered/groundwater.pdf Pages: 3 | covered/soil-moisture.pdf Pages: 4 15. ok importExport.php: "The import completed successfully", two articles in Vol. 4 No. 2 (2026) | The import completed successfully. The following items were imported: | | Submission | -"1" - "Moving a journal to a new server without losing its statistics" | -"2" - "Groundwater recharge on terraced farms" | Issue | -"1" - "Vol. 4 No. 2 (2026)" 16. ok both covered galleys download from the journal byte for byte (SHA-256 equal to what the tool made) | soil-moisture.pdf db6f98acc53b9781682da87384ca2ec56ef6276521d9ffb9cbe2e520045af8d0 | groundwater.pdf 02c197f6928195c9ed3857761fd957ab3bd88ad8b236da22654fb295cd86b51a | want: | {"soil-moisture.pdf":"db6f98acc53b9781682da87384ca2ec56ef6276521d9ffb9cbe2e520045af8d0","groundwater.pdf":"02c197f6928195c9ed3857761fd957ab3bd88ad8b236da22654fb295cd86b51a"} 17. ok pdftotext: page 1 is the cover: journal, ISSN, title, authors and the filled citation | Journal of Open Library Systems | ISSN 2345-678X | | Moving a journal to a new server without losing | its statistics | Sara Khan, José Núñez, Zoë Müller | | How to cite this article | | Sara Khan, José Núñez, Zoë Müller. Moving a journal to a new server without losing its statistics. | Journal of Open Library Systems, 2026;4(2):15-29 | DOI | | https://doi.org/10.12345/jols.v4i2.41 | | This article is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). | https://creativecommons.org/licenses/by/4.0/ | | Journal of Open Library Systems | ISSN 2345-678X | | Groundwater recharge on terraced farms | Ana Lopez | | How to cite this article | | Ana Lopez. Groundwater recharge on terraced farms. Journal of Open Library Systems, | 2026;4(2):30-41 | DOI | | https://doi.org/10.12345/jols.v4i2.42 | | This article is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC | BY-NC 4.0). | https://creativecommons.org/licenses/by-nc/4.0/ 18. ok the DOI link and the licence: CC BY 4.0 from the form, CC BY-NC 4.0 from the CSV row | Journal of Open Library Systems | ISSN 2345-678X | | Moving a journal to a new server without losing | its statistics | Sara Khan, José Núñez, Zoë Müller | | How to cite this article | | Sara Khan, José Núñez, Zoë Müller. Moving a journal to a new server without losing its statistics. | Journal of Open Library Systems, 2026;4(2):15-29 | DOI | | https://doi.org/10.12345/jols.v4i2.41 | | This article is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). | https://creativecommons.org/licenses/by/4.0/ | | Journal of Open Library Systems | ISSN 2345-678X | | Groundwater recharge on terraced farms | Ana Lopez | | How to cite this article | | Ana Lopez. Groundwater recharge on terraced farms. Journal of Open Library Systems, | 2026;4(2):30-41 | DOI | | https://doi.org/10.12345/jols.v4i2.42 | | This article is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC | BY-NC 4.0). | https://creativecommons.org/licenses/by-nc/4.0/ 19. ok pdftotext: every original page follows the cover with the same text (5 of 5 pages) | soil-moisture.pdf original page 1 = page 2: same text | soil-moisture.pdf original page 2 = page 3: same text | soil-moisture.pdf original page 3 = page 4: same text | groundwater.pdf original page 1 = page 2: same text | groundwater.pdf original page 2 = page 3: same text 20. ok pdffonts: the cover’s font (Noto Serif) is embedded; the article’s own font is left as it was | name type encoding emb sub uni object ID | ------------------------------------ ----------------- ---------------- --- --- --- --------- | NotoSerif-Regular-6703 CID TrueType Identity-H yes no yes 11 0 | Helvetica Type 1 WinAnsi no no no 4 0 21. ok (tested on) the box reports its OS, kernel and the version of 5 package(s) | PRETTY_NAME="Ubuntu 26.04.1 LTS" | VIRT=none | KERNEL=7.0.0-44-generic | PKG mariadb-server 1:11.8.6-5ubuntu0.1 | PKG nginx 1.28.3-2ubuntu1.14 | PKG php-fpm 2:8.5+99ubuntu1 | PKG poppler-utils 26.01.0-2ubuntu0.3 | ojs: 3.5.0.6 ------------------------------------------------------------------------------ Commands and what they printed (6) ------------------------------------------------------------------------------ $ cd /tmp/galleys && for f in originals/*.pdf covered/*.pdf; do printf "%s " $f; pdfinfo $f | grep Pages; done originals/groundwater.pdf Pages: 2 originals/soil-moisture.pdf Pages: 3 covered/groundwater.pdf Pages: 3 covered/soil-moisture.pdf Pages: 4 $ cd /var/www/ojs && sudo -u www-data php tools/importExport.php NativeImportExportPlugin import /tmp/galleys/galleys.xml example admin 2>&1 | grep -v 'PHP Notice: tempnam' The import completed successfully. The following items were imported: Submission -"1" - "Moving a journal to a new server without losing its statistics" -"2" - "Groundwater recharge on terraced farms" Issue -"1" - "Vol. 4 No. 2 (2026)" $ sudo mariadb -B ojs -e "SELECT p.submission_id, g.galley_id, g.submission_file_id, sfs.setting_value FROM publication_galleys g JOIN publications p ON p.publication_id = g.publication_id JOIN submission_file_settings sfs ON sfs.submission_file_id = g.submission_file_id AND sfs.setting_name = 'name' ORDER BY 1" | tail -n +2 | while IFS=$'\t' read s g f name; do $ curl -sL -o "/tmp/galleys/$name" http://journal.example.com/index.php/example/en/article/download/$s/$g/$f $ echo "$name $(sha256sum < "/tmp/galleys/$name" | cut -c1-64)" $ done soil-moisture.pdf db6f98acc53b9781682da87384ca2ec56ef6276521d9ffb9cbe2e520045af8d0 groundwater.pdf 02c197f6928195c9ed3857761fd957ab3bd88ad8b236da22654fb295cd86b51a $ cd /tmp/galleys && pdftotext -f 1 -l 1 soil-moisture.pdf - && pdftotext -f 1 -l 1 groundwater.pdf - Journal of Open Library Systems ISSN 2345-678X Moving a journal to a new server without losing its statistics Sara Khan, José Núñez, Zoë Müller How to cite this article Sara Khan, José Núñez, Zoë Müller. Moving a journal to a new server without losing its statistics. Journal of Open Library Systems, 2026;4(2):15-29 DOI https://doi.org/10.12345/jols.v4i2.41 This article is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/ Journal of Open Library Systems ISSN 2345-678X Groundwater recharge on terraced farms Ana Lopez How to cite this article Ana Lopez. Groundwater recharge on terraced farms. Journal of Open Library Systems, 2026;4(2):30-41 DOI https://doi.org/10.12345/jols.v4i2.42 This article is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). https://creativecommons.org/licenses/by-nc/4.0/ $ cd /tmp/galleys && for f in soil-moisture.pdf groundwater.pdf; do $ p=$(pdfinfo originals/$f | grep -oP "^Pages:\s+\K\d+") $ for i in $(seq 1 $p); do $ if cmp -s <(pdftotext -layout -f $i -l $i originals/$f -) <(pdftotext -layout -f $((i+1)) -l $((i+1)) $f -); then echo "$f original page $i = page $((i+1)): same text"; else echo "$f page $i DIFFERS"; fi $ done $ done soil-moisture.pdf original page 1 = page 2: same text soil-moisture.pdf original page 2 = page 3: same text soil-moisture.pdf original page 3 = page 4: same text groundwater.pdf original page 1 = page 2: same text groundwater.pdf original page 2 = page 3: same text $ cd /tmp/galleys && pdffonts soil-moisture.pdf name type encoding emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- --------- NotoSerif-Regular-6703 CID TrueType Identity-H yes no yes 11 0 Helvetica Type 1 WinAnsi no no no 4 0 ------------------------------------------------------------------------------ The check's source (scripts/live/checks/tool-ojs-galley-pdf-cover-page.mjs) As it ran. ------------------------------------------------------------------------------ /** * TOOL proof (plan07 §2): /tools/ojs-galley-pdf-cover-page. Rented build server (LIVE_VPS + LIVE_VPS_NODOMAIN=1, 4 GB), * per release. Hidden setup: OJS as lesson 1 installs it (ojs-base.mjs) and a journal made through OJS's API. * * What it proves: the covered PDFs the tool makes, built by the tool's OWN module (lib/tools/ojs-galley-cover, through * scripts/tools/check-ojs-galley-cover.ts --out): soil-moisture.pdf covered one at a time (addCover), groundwater.pdf * through the whole-issue path (a CSV row, runBulk, read back from its zip). Both are imported as the articles' galleys * by OJS's own `tools/importExport.php NativeImportExportPlugin import` (the native XML built by the back-issue * importer's module), and the journal then serves each one byte for byte; poppler on the server reads them: one page * more than the original, the cover's text (title, authors, citation, DOI, licence) on page 1, and every original page * after it with the same text as before. The tool's refusals (encrypted, too big, Urdu/Chinese text, a bad DOI …) run * on this computer: `npx tsx scripts/tools/check-ojs-galley-cover.ts`, part of this run (hidden, its result is a claim). */ import { createHash } from 'node:crypto' import { execFileSync } from 'node:child_process' import { mkdtempSync, readFileSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { bareBox, reportBox } from '../lib.mjs' import { putFile } from '../box.mjs' import { basePackages, baseSetup, createJournal, installOjs, SITE } from '../ojs-base.mjs' export const meta = { box: 'vps' } const RELEASE = process.env.LIVE_BOX_RELEASE || '24.04' const DB_PASS = '[password]' const ADMIN_PASS = '[password]' const TOOL = 'scripts/tools/check-ojs-galley-cover.ts' const H = `http://${SITE}/index.php/example` const DB = (sql) => `sudo mariadb -B ojs -e "${sql}"` const sha = (f) => createHash('sha256').update(readFileSync(f)).digest('hex') const check = (ctx) => bareBox(ctx, async ({ sudoUser }) => { const sh = sudoUser() const { run, L } = sh // hidden, on this computer: the tool's own checks and refusals, then the covered galleys and the XML const local = execFileSync('npx', ['tsx', TOOL], { encoding: 'utf8' }) ctx.check('the tool refuses an encrypted PDF, one over 200 MB, Urdu or Chinese cover text and a bad DOI, each with its reason (local check: all pass)', /ALL PASSED/.test(local) && !/^FAIL/m.test(local), local) const dir = mkdtempSync(join(tmpdir(), 'ojs-galley-cover-')) execFileSync('npx', ['tsx', TOOL, `--out=${dir}`], { encoding: 'utf8' }) const want = { 'soil-moisture.pdf': sha(join(dir, 'covered', 'soil-moisture.pdf')), 'groundwater.pdf': sha(join(dir, 'covered', 'groundwater.pdf')) } installOjs(ctx, sh, { dbPass: DB_PASS, adminPass: ADMIN_PASS }) createJournal(ctx, sh, { adminPass: ADMIN_PASS }) L('sudo mkdir -p /tmp/galleys/originals /tmp/galleys/covered && sudo chown -R $(id -un) /tmp/galleys') const pushed = [ [join(dir, 'galleys.xml'), '/tmp/galleys/galleys.xml'], ...['soil-moisture.pdf', 'groundwater.pdf'].flatMap((f) => [ [join(dir, 'originals', f), `/tmp/galleys/originals/${f}`], [join(dir, 'covered', f), `/tmp/galleys/covered/${f}`], ]), ].every(([a, b]) => putFile(a, b)) if (!pushed) throw new Error('could not copy the files to the box') L('sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -q poppler-utils > /dev/null') // ── the covered files, read on the server ───────────────────────────────────────────── const pages = run('cd /tmp/galleys && for f in originals/*.pdf covered/*.pdf; do printf "%s " $f; pdfinfo $f | grep Pages; done', { id: 'pdfinfo' }) const n = (f) => Number(new RegExp(`^${f.replace('.', '\\.')} Pages:\\s+(\\d+)`, 'm').exec(pages.out)?.[1]) ctx.check('pdfinfo: each covered galley has one page more than its original (3 → 4, 2 → 3)', n('originals/soil-moisture.pdf') === 3 && n('covered/soil-moisture.pdf') === 4 && n('originals/groundwater.pdf') === 2 && n('covered/groundwater.pdf') === 3, pages.out) // ── OJS's own import ────────────────────────────────────────────────────────────────── const imp = run(`cd /var/www/ojs && sudo -u www-data php tools/importExport.php NativeImportExportPlugin import /tmp/galleys/galleys.xml example admin 2>&1 | grep -v 'PHP Notice: tempnam'`, { id: 'import', timeout: 600000 }) ctx.check('importExport.php: "The import completed successfully", two articles in Vol. 4 No. 2 (2026)', /The import completed successfully/.test(imp.out) && imp.out.includes('"Vol. 4 No. 2 (2026)"') && imp.out.includes('Groundwater recharge on terraced farms'), imp.out) const dl = run( [ `${DB("SELECT p.submission_id, g.galley_id, g.submission_file_id, sfs.setting_value FROM publication_galleys g JOIN publications p ON p.publication_id = g.publication_id JOIN submission_file_settings sfs ON sfs.submission_file_id = g.submission_file_id AND sfs.setting_name = 'name' ORDER BY 1")} | tail -n +2 | while IFS=$'\\t' read s g f name; do`, ` curl -sL -o "/tmp/galleys/$name" ${H}/en/article/download/$s/$g/$f`, ' echo "$name $(sha256sum < "/tmp/galleys/$name" | cut -c1-64)"', 'done', ].join('\n'), { id: 'galley-downloads' }, ) const got = Object.fromEntries([...dl.out.matchAll(/^(\S+\.pdf) ([0-9a-f]{64})$/gm)].map((m) => [m[1], m[2]])) ctx.check('both covered galleys download from the journal byte for byte (SHA-256 equal to what the tool made)', got['soil-moisture.pdf'] === want['soil-moisture.pdf'] && got['groundwater.pdf'] === want['groundwater.pdf'], `${dl.out}\nwant:\n${JSON.stringify(want)}`) // ── what a reader gets: the cover, then the article unchanged ───────────────────────── const cover = run('cd /tmp/galleys && pdftotext -f 1 -l 1 soil-moisture.pdf - && pdftotext -f 1 -l 1 groundwater.pdf -', { id: 'cover-text' }) const flat = cover.out.replace(/\s+/g, ' ') ctx.check('pdftotext: page 1 is the cover: journal, ISSN, title, authors and the filled citation', ['Journal of Open Library Systems', 'ISSN 2345-678X', 'Moving a journal to a new server without losing its statistics', 'Sara Khan, José Núñez, Zoë Müller', 'Journal of Open Library Systems, 2026;4(2):15-29', 'Ana Lopez. Groundwater recharge on terraced farms. Journal of Open Library Systems, 2026;4(2):30-41'].every((s) => flat.includes(s)), cover.out) ctx.check('the DOI link and the licence: CC BY 4.0 from the form, CC BY-NC 4.0 from the CSV row', ['https://doi.org/10.12345/jols.v4i2.41', 'https://creativecommons.org/licenses/by/4.0/', 'https://doi.org/10.12345/jols.v4i2.42', 'https://creativecommons.org/licenses/by-nc/4.0/'].every((s) => flat.includes(s)), cover.out) const same = run( [ 'cd /tmp/galleys && for f in soil-moisture.pdf groundwater.pdf; do', ' p=$(pdfinfo originals/$f | grep -oP "^Pages:\\s+\\K\\d+")', ' for i in $(seq 1 $p); do', ' if cmp -s <(pdftotext -layout -f $i -l $i originals/$f -) <(pdftotext -layout -f $((i+1)) -l $((i+1)) $f -); then echo "$f original page $i = page $((i+1)): same text"; else echo "$f page $i DIFFERS"; fi', ' done', 'done', ].join('\n'), { id: 'pages-unchanged' }, ) ctx.check('pdftotext: every original page follows the cover with the same text (5 of 5 pages)', (same.out.match(/: same text$/gm) ?? []).length === 5 && !/DIFFERS/.test(same.out), same.out) const fonts = run('cd /tmp/galleys && pdffonts soil-moisture.pdf', { id: 'pdffonts' }) ctx.check('pdffonts: the cover’s font (Noto Serif) is embedded; the article’s own font is left as it was', /NotoSerif.*\byes\s+no\s+yes\b/.test(fonts.out) && /^Helvetica\s.*\bno\s+no\s+no\b/m.test(fonts.out), fonts.out) ctx.stepsDone() const { packages, extra } = basePackages() reportBox(ctx, L, baseSetup(RELEASE), [...packages, 'poppler-utils'], extra) }) export default check