Skip to content

Technical case study / Bitrix / October 2026

PHP 8.2 to 8.5.
A controlled Bitrix upgrade.

A working website needed a newer PHP runtime while remaining on its existing server. I prepared a separate environment, corrected compatibility issues, switched web requests and verified the scheduled task independently.

Anonymized client, referred to as NorthRelay. Platform: Bitrix with Aspro Priority and custom PHP code.

8.5.12Verified for web requests and cron
754Passed tests in selected PHP modules
16Control URLs returned HTTP 200
5WebP HTTP scenarios passed

01 / The constraint

Modernize the runtime.
Keep the server.

The starting environment combined CentOS 7, BitrixEnv 7.5.5, Nginx, Apache, PHP 8.2.20 and a MySQL-compatible 5.7.44 database. The site included a catalog, service pages and custom handlers.

The agreed goal was to move the website and its Bitrix cron task to PHP 8.5.12 on the same server. The plan had to preserve database access, sessions, image processing and the checked application routes, with a prepared way to return to the previous configuration.

An updated CMS core did not establish compatibility for the theme, third-party code or custom handlers. Those components required their own checks.

02 / The architecture

A separate runtime.
Explicit execution paths.

Replacing the system interpreter would have changed several dependencies at once. The new PHP build had its own directory, configuration, libraries, PHP-FPM service and logs.

After the switch

Live websiteNginx → Apache → PHP-FPM 8.5.12
Bitrix background taskCron → explicit binary and config → PHP 8.5.12
Existing server toolingSeparate system interpreter → PHP 8.2.20

Preparation before cutover

Configuration, site files and the database were backed up. Archive readability and checksums were checked. A separate test database and account supported the application copy.

Compatibility changes were first applied to that copy, with originals retained. Checks covered the real web request path, the Bitrix bootstrap and the loaded PHP configuration.

Keeping the old system interpreter separate was a project constraint and rollback measure. It was not a claim that the entire server stack had been modernized.

03 / Build and compatibility

Test the dependencies.
Then test the application.

The build included the libraries and extensions needed for HTTPS, database access, XML, archives and image processing. Failed checks were investigated before continuing.

Selected GD, cURL and OpenSSL test set754 / 754

Executed tests passed. The selected set contained 888 tests; 134 were skipped by the test system.

754 passed134 skipped0 failed

Four targeted code fixes

  • Removed an invalid append to $GLOBALS while preserving the named product filter.
  • Made a nullable parameter explicit in a payment handler signature.
  • Aligned a comments-template function declaration with its argument usage.
  • Corrected an obsolete switch-case separator in the Aspro LESS compiler.

Some findings were existing defects exposed by the checks. They were not all new restrictions introduced by PHP 8.5.

The 754 figure counts PHP module tests. It does not count website pages, customer journeys, orders or payments.

04 / Live verification

Confirm what
actually serves the website.

Control responses were recorded before the switch and checked again after Apache was connected to the new PHP-FPM service.

CheckObserved result
PHP handling a live web requestPHP 8.5.12, FPM/FastCGI
Database connection, session and Bitrix bootstrapChecks passed; expected configuration loaded
16 selected control URLsHTTP 200 before and after the switch
Deliberately nonexistent control URLHTTP 404
PHP execution attempts in tested restricted directoriesHTTP 403
PHP log growth during the control run0 bytes of new entries
Bitrix cron command and scheduled executionExplicit PHP 8.5.12 binary and configuration; scheduled process observed

HTTP 200 establishes a response from the selected URL at the time of the check. Checkout and real payment tests were not part of those 16 requests. Observing cron execution also does not validate every business operation inside the script.

05 / An application defect found during validation

A missing image.
A real PHP exception.

A custom WebP handler could pass an empty path to file_get_contents() when the source image was absent. The log recorded ValueError: Path must not be empty.

Check the source before reading it

The handler was changed to validate the source path and respond correctly when a file was missing. Existing JPEG and PNG sources were then tested through the live request path.

All five scenarios passed without new PHP log entries during the control run. This was a concrete application repair discovered during the upgrade checks.

Request scenarioResult
Handler called without an image404
Missing source file404
JPEG URL with parameters200 · image/webp
PNG with “+” in its filename200 · image/webp
Repeat request for generated WebP200 · image/webp

06 / The outcome

A verified upgrade.
A defined maintenance boundary.

The website and its Bitrix scheduled task used PHP 8.5.12 in the observed checks. The project retained the backups, rollback configuration and change record; test services were stopped.

What the work established

A separate PHP runtime was built and tested, application compatibility fixes were applied, selected live routes were checked and the WebP handler was repaired.

The existing operating system remained in place. Operating-system support and future updates to the custom runtime and libraries require separate maintenance.

What was not measured

The project did not measure percentage speed gains, traffic growth, conversion increases or revenue changes. No such result is claimed.

Later fixes to product markup and media were separate work. They are not presented as an outcome caused by changing PHP.

Related work

From diagnosis
to implementation.

The same discipline applies to other technical problems: identify the evidence, define the change and check the behavior afterwards.

Planning a similar
PHP upgrade?

Start with the current environment, application dependencies and the functions that need to keep working.

Explore the PHP upgrade service ↗

If you found this case through Upwork, please discuss your project in your Upwork conversation until a contract starts.