The main lesson is simple: mixed Japanese, Chinese, Korean, and English text needs more than ordinary word wrapping. A reliable image renderer must choose a font with the right glyphs, preserve Latin words, allow CJK text to break between characters, and invalidate old cached images after the logic changes. Why normal wrapping fails English text Continue reading “How to Wrap Mixed CJK and English Text in Generated Images”
Tag Archives: backend
How to Prevent Root-Owned Laravel Logs in Docker
Prevent Laravel daily logs from becoming root-owned by running Artisan, schedulers, and queue processes as the container’s application user.
How to Keep Sequence Numbers Continuous Across Grouped Data
Keep the group identifier and the global sequence number separate. This prevents numbering from restarting when data is divided into sections.
How Docker Containers on Separate Networks Can Communicate
Two healthy Docker containers may still be unable to communicate when they use different bridge networks. Learn how to diagnose the problem and create a reliable shared network.
How to Handle App Languages That Are Bundled Instead of Downloaded
Some app languages are stored inside the package instead of remote configuration. A versioned fallback source keeps importers predictable and reproducible.
How to Handle Old Slugs Without Breaking Links
A safe URL migration pattern: check the current slug first, use redirect history only after a miss, and return a small 404 response for unknown URLs.
Why PHP Can Keep Running Old Code After Deployment
A deployment can update PHP files while OPcache keeps serving older compiled code. Learn how to identify and fix the mismatch safely.
Why wp_remote_get() Can Time Out When file_get_contents() Works
Learn why WordPress HTTP requests may time out when PHP stream requests succeed, and how to diagnose and fix the difference safely.
How to Prevent MySQL Placeholder Errors in Large Batch Upserts
Large multi-row upserts can exceed MySQL’s prepared-statement placeholder limit. Split the work into smaller chunks and keep the chunks inside one transaction.
How to Reduce Peak Memory in PHP GD Image Generation
What I learned about preventing PHP GD memory errors by releasing intermediate images as soon as they are no longer needed.
