Adam DaleyandClaude Sonnet 4.6 ed89bf3731 Fix MySQL 8.0.22+ REGEXP charset conflict in patches 67 and 74 (#3822)
* Fix MySQL 8.0.22+ REGEXP charset conflict in patches 67 and 74

MySQL 8.0.22+ changed the REGEXP implementation to use ICU internals,
which rejects operands with mismatched character sets. Using `BINARY hash`
(producing binary charset) alongside a pattern literal with the session
charset (e.g. utf8mb3_general_ci) triggers:

  SQLSTATE[HY000]: General error: 3995 Character set 'binary' cannot be
  used in conjunction with 'utf8mb3_general_ci' in call to regexp_like.

Replace `BINARY hash NOT REGEXP '^[a-f0-9]+$'` in both patches with
`CAST(hash AS BINARY) NOT REGEXP _binary'^[a-f0-9]+$'`, making both
operands explicitly binary. This preserves the original case-sensitive
matching behaviour while being compatible with MySQL 8.0+ and MariaDB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PNZCQ7v3gm6fc6t98TyZGP

* Fix invoice hash regexp charset handling

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-21 18:49:00 +02:00


FOSSBilling logo

Download button

CI Download Latest License CodeFactor Financial Contributors Crowdin Discord Stand With Ukraine Contributor Covenant

Note

FOSSBilling is under active development and currently considered beta. Expect rough edges and limited support.

FOSSBilling is a free, open-source billing and client management system. It helps online service businesses automate invoicing, payments, and client communication. While it’s popular with web hosting providers, it also works well for software licensing, digital downloads, and subscription services.

Features

  • Billing & Invoicing: automated invoices, reminders, and basic reporting.
  • Client Management: a central place for client data and communication.
  • Extensibility: extension-friendly architecture for integrations and custom features.
  • Payments: support for multiple gateways.
  • Translations: community-powered, multi-language interface.
  • Responsive UI: usable on desktop and mobile.
  • Security-focused: built with security best practices in mind.

Getting Started

Requirements

FOSSBilling runs on standard LAMP/LEMP stacks. For the latest system requirements (PHP version, extensions, database, etc.), see the official requirements.

Installation

Follow the step-by-step Getting Started guide.

Just exploring? Try the public demo.

Contributing

We welcome contributions from the community! We’re actively modernizing the codebase and there’s plenty to do.

If you prefer to start a conversation first, drop by the forum or say hello on Discord.

Star History

Star History Chart

Not a developer? Starring the repository helps others discover the project.

License

FOSSBilling is released under the Apache 2.0 license. See LICENSE for details.

This project includes third-party work:

Languages
PHP 81.4%
Twig 16.7%
TypeScript 1.6%
SCSS 0.1%