Oryx deployment fails when App Service is used with Composer and PHP 8.0 Runtime Stack

Christopher 26 Reputation points

When deploying an Azure App Service application with the PHP 8.0 Runtime Stack, the Oryx deployment fails with the following error:

Command: oryx build /home/site/repository -o /home/site/wwwroot --platform php --platform-version 8.0 -i /tmp/8d9735c9a363a44 --log-file /tmp/build-debug.log 

Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx

You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20210618.2, Commit: d70100fba618b33e529c149b7d2d5f2c981ebbb1, ReleaseTagName: 20210618.2

Build Operation ID: |c+0WGRYVibY=.76dc45ff_

Repository Commit : 3c381334fde76a3bd6edbefbf94e5cd4225e3358

Detecting platforms...

Detected following platforms:

  nodejs: 10.22.0

  php: 8.0.3

Using intermediate directory '/tmp/8d9735c9a363a44'.

Copying files to the intermediate directory...

Done in 3 sec(s).

Source directory     : /tmp/8d9735c9a363a44

Destination directory: /home/site/wwwroot

PHP executable: /tmp/oryx/platforms/php/8.0.3/bin/php

Composer archive: /tmp/oryx/platforms/php-composer/2.0.8/composer.phar

php: error while loading shared libraries: libonig.so.4: cannot open shared object file: No such file or directory

Running 'composer install --ignore-platform-reqs --no-interaction'...

php: error while loading shared libraries: libonig.so.4: cannot open shared object file: No such file or directory\n/opt/Kudu/Scripts/starter.sh oryx build /home/site/repository -o /home/site/wwwroot --platform php --platform-version 8.0 -i /tmp/8d9735c9a363a44 --log-file /tmp/build-debug.log 

I've already opened an issue at the corresponding GitHub project. Has anyone an idea if this can be fixed on our side?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,146 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,771 Reputation points Microsoft Employee

    Hi @Christopher ,

    Apologies for this being an answer rather than a comment. I deployed QuickStart | Create a PHP web app in Azure App Service to a PHP 8 instance and didn't run into any issues.

       2021-09-10T23:11:38.535548257Z Cannot load Zend OPcache - it was already loaded  
       2021-09-10T23:11:39.789941059Z   _____                                 
       2021-09-10T23:11:39.789986759Z   /  _  \ __________ _________   ____    
       2021-09-10T23:11:39.789994159Z  /  /_\  \___   /  |  \_  __ \_/ __ \   
       2021-09-10T23:11:39.789998059Z /    |    \/    /|  |  /|  | \/\  ___/   
       2021-09-10T23:11:39.790001859Z \____|__  /_____ \____/ |__|    \___  >  
       2021-09-10T23:11:39.790005659Z         \/      \/                  \/   
       2021-09-10T23:11:39.790009259Z A P P   S E R V I C E   O N   L I N U X  
       2021-09-10T23:11:39.790015959Z Documentation: http://aka.ms/webapp-linux  
       2021-09-10T23:11:39.790019159Z PHP quickstart: https://aka.ms/php-qs  
       2021-09-10T23:11:39.790022459Z PHP version : 8.0.3  
       2021-09-10T23:11:39.790025559Z Note: Any data outside '/home' is not persisted  
       2021-09-10T23:11:40.543063020Z Running oryx create-script -appPath /home/site/wwwroot -output /opt/startup/startup.sh     -bindPort 8080 -startupCommand 'php-fpm;'  
       2021-09-10T23:11:41.094042003Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'  
       2021-09-10T23:11:41.094068403Z Could not find operation ID in manifest. Generating an operation id...  
       2021-09-10T23:11:41.094074203Z Build Operation ID: 24f0d2ac-3d6f-4dca-a06d-aac62a0ffb82  
       2021-09-10T23:11:42.197972581Z Writing output script to '/opt/startup/startup.sh'  
       2021-09-10T23:11:44.013553473Z Starting nginx: nginx.  
       2021-09-10T23:11:44.622710340Z Cannot load Zend OPcache - it was already loaded  
       2021-09-10T23:11:44.813785586Z [10-Sep-2021 23:11:44] NOTICE: fpm is running, pid 41  
       2021-09-10T23:11:44.823348893Z [10-Sep-2021 23:11:44] NOTICE: ready to handle connections  
       2021-09-10T23:11:44.862389123Z -  10/Sep/2021:23:11:44 +0000 "GET /index.php" 200  
       2021-09-10T23:11:44.899374751Z -  10/Sep/2021:23:11:44 +0000 "GET /index.php" 200  
       2021-09-10T23:11:44.907903958Z -  10/Sep/2021:23:11:44 +0000 "GET /index.php" 200  
       2021-09-10T23:11:50.191704685Z -  10/Sep/2021:23:11:50 +0000 "GET /index.php" 200  
       2021-09-10T23:11:55.415926414Z -  10/Sep/2021:23:11:55 +0000 "GET /index.php" 200  
       2021-09-10T23:11:56.439731573Z -  10/Sep/2021:23:11:56 +0000 "GET /index.php" 200  
       2021-09-10T23:12:00.644475051Z -  10/Sep/2021:23:12:00 +0000 "GET /index.php" 200  
       2021-09-10T23:12:05.920874158Z -  10/Sep/2021:23:12:05 +0000 "GET /index.php" 200  
       2021-09-10T23:12:11.149657153Z -  10/Sep/2021:23:12:11 +0000 "GET /index.php" 200  
       2021-09-10T23:12:16.468328599Z -  10/Sep/2021:23:12:16 +0000 "GET /index.php" 200  

    However, I am noticing that a composer.phar was found and oryx is attempting to pull those dependencies. Can you provide your composer.phar so that I can try to repro your issue?