Apr 29, 2026
When most people think of a health and safety consultancy, they picture clipboards and site visits. THSP is something different. They're a UK-based consultancy delivering health, safety, and HR services across 48+ industries. At the heart of their business is a piece of software most of their clients never see: MyTHSP.
I came on board to provide ongoing support and maintenance for the platform. What I found was a substantial, well-established PHP SaaS application: 27 integrated modules, 260+ model classes, a 320-table database schema, and over 200,000 lines of code. A system that had been doing real work in production for years, serving consultants and clients across the country.
MyTHSP replaces what used to be a patchwork of spreadsheets, Word documents, and manual processes. It gives THSP consultants a professional toolkit for conducting and documenting assessments in the field: Fire Risk Assessments, COSHH assessments, Risk Assessments & Method Statements, Training Needs Analysis, Display Screen Equipment assessments, workplace inspections, and more.
Each module is built around the specific UK regulatory framework it covers. The FRA module follows the five-step methodology required by the Regulatory Reform (Fire Safety) Order 2005. The COSHH module implements the eight-step assessment process defined in the ACOP. This isn't generic compliance software. It's purpose-built for the way THSP works and the standards they're required to meet.
Clients get their own secure portal. They can track outstanding actions, view assessment histories, download reports on demand, and stay on top of their compliance obligations between consultant visits. THSP consultants can be granted access to specific client accounts for service delivery, with full audit trails maintained throughout.
One of the most technically demanding parts of the platform is PDF generation. The system uses mPDF to render compliance reports, with 196+ report templates across the assessment types. These aren't simple documents. A full Fire Risk Assessment report can run to dozens of pages, with photographs, risk matrices, action plans, and detailed control measures, all formatted professionally and ready to present to an HSE inspector or insurance underwriter.
Getting that system running reliably at scale is a serious engineering challenge. It's also where one of the first issues I tackled sat: intermittent PDF failures caused by PHP memory configuration that hadn't been set for the demands of complex report generation. (I wrote about that in more detail in the PHP memory limit post.)
My role with THSP is as an embedded technical partner rather than a traditional agency. I'm not brought in for specific projects and then handed off. I'm a consistent presence in the platform, familiar with the codebase, responsive to issues as they arise, and proactive about risks before they become problems.
Since coming on board, the work has included:
Server analysis and critical space resolution: the production server was critically low on disk space. Nobody had noticed. Catching it early prevented a service outage.
PHP memory optimisation: eliminated 100% of PDF generation failures by correctly configuring the memory limit and updating the mPDF library.
Automated deployment: replaced a manual, error-prone release process with a repeatable automated workflow. Deployments that used to carry real risk now take about 30 seconds.
Error logging overhaul: restructured logging so genuine issues surface clearly instead of being buried in noise. Fast diagnosis is only possible when you can see what's actually happening.
Ongoing bug fixes and feature development: regular support across the platform, resolving issues quickly because I already understand how the system works.
Platforms like MyTHSP are the operational backbone of the businesses that run them. When they work well, nobody notices. When they don't, the impact is immediate and visible: a consultant who can't generate a report in the field, or a system unavailable during a client visit.
Keeping a platform of this complexity running reliably requires more than reactive bug fixing. It requires someone who understands the architecture, monitors the infrastructure proactively, and treats the platform's health as their own responsibility, not just a ticket to close.
That's the kind of relationship I have with THSP, and it's the kind of work I'm most interested in doing more of.
For more on the technical and regulatory ground this platform covers, these are good places to start:
Memory problems, mPDF Manual. The library's own advice on keeping memory use under control when generating long, image-heavy PDF reports.
memory_limit, PHP Manual. The reference for the php.ini setting that caps how much memory a single script, such as a report generator, can use.
Logging Cheat Sheet, OWASP. Practical guidance on application and security event logging, including the audit trail a multi-client portal needs.
The Regulatory Reform (Fire Safety) Order 2005, legislation.gov.uk. The full text of the law that the Fire Risk Assessment module is built around.
Control of Substances Hazardous to Health (COSHH), HSE. The Health and Safety Executive's guidance on COSHH assessments, the process behind the platform's COSHH module.
If you're running an established PHP or Laravel platform and need a technical partner who'll be embedded in it rather than just called in when things break, I'd be happy to talk. You can read the full case study on the MyTHSP platform support page, or get in touch directly. No jargon, no pressure.
The fixed-price Platform Audit reviews your code, security and server, and gives you a plain-English report with a prioritised, costed action plan. £1,950, within two weeks.
Consultants on a health and safety compliance platform were hitting intermittent PDF failures in the field. The root cause was PHP memory configuration. Here's how I found it and fixed it.