Azure web app on linux - php console Cannot load Zend OPcache - php

We are setting up a PHP 8 application on Web App Services, so we need to use linux.
When we run php on the console, we always get the following warning
Cannot load Zend OPcache - it was already loaded
Example:
/home/site/wwwroot# php -v
Cannot load Zend OPcache - it was already loaded
PHP 8.0.17 (cli) (built: Mar 25 2022 18:59:25) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.17, Copyright (c) Zend Technologies
with Zend OPcache v8.0.17, Copyright (c), by Zend Technologies
Any idea how to fix this?

Related

Cannot load the ionCube PHP Loader in PHP 8.1 (Apple M1 arm64)

I am on the Apple M1 arm64 chip arm64.
I am trying to install the ioncube for PHP 7.4
On the ioncube website i download the package above:
Failed loading /opt/homebrew/opt/php#8.0/lib/httpd/modules/ioncube_loader_dar_7.4.so:
dlopen(/opt/homebrew/opt/php#8.0/lib/httpd/modules/ioncube_loader_dar_7.4.so,
0x0009): tried: '/opt/homebrew/opt/php#8.0/lib/httpd/modules/ioncube_loader_dar_7.4.so'
(code signature in <271472A6-19B1-339D-AE94-FD446AED8DB2>
'/opt/homebrew/Cellar/php#8.0/8.0.27/lib/httpd/modules/ioncube_loader_dar_7.4.so'
not valid for use in process: library load disallowed by system policy),
'/opt/homebrew/Cellar/php#8.0/8.0.27/lib/httpd/modules/ioncube_loader_dar_7.4.so'
(code signature in <271472A6-19B1-339D-AE94-FD446AED8DB2>
'/opt/homebrew/Cellar/php#8.0/8.0.27/lib/httpd/modules/ioncube_loader_dar_7.4.so'
not valid for use in process: library load disallowed by system policy
Afterwards i tried macOS (64 bits) version
Cannot load the ionCube PHP Loader - it was built with configuration API320190902,NTS, whereas running engine is API420200930,NTS
PHP 8.0.27 (cli) (built: Jan 12 2023 02:35:14) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.27, Copyright (c) Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans
with Zend OPcache v8.0.27, Copyright (c), by Zend Technologies
With PHP 7.4 i don't have any problems.
How i can solve the problem in PHP 8.1?

Change CLI PHP version on Mac

I using Mac BigSur lastest update.
I have install Bitnami MAPP with PHP version 8.0.8.
But in CLI still PHP 7.3.24
I try create PATH to Bitnami PHP8.0.8 but have warning like below
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: Dec 21 2020 21:33:25) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
How to switch PHP CLI to PHP8.0.8 of Bitnami?
Bitnami engineer here!
The output you are seeing is produced by the PHP binary that comes preinstalled in macOS. When you install Bitnami MAMP, a standalone, updated version of PHP will also be installed in your system. In order to use it instead of the default one, you have two options:
Use the full path to the binary (installdir/php/bin/php)
$ /Applications/mampstack-8.0.9-0/php/bin/php --version
PHP 8.0.9 (cli) (built: Jul 30 2021 07:59:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.9, Copyright (c) Zend Technologies
with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies
Add the directory containing the PHP binary to your path
$ export PATH=/Applications/mampstack-8.0.9-0/php/bin:$PATH
$php --version
PHP 8.0.9 (cli) (built: Jul 30 2021 07:59:45) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.9, Copyright (c) Zend Technologies
with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies
For the examples above, /Applications/mampstack-8.0.9-0 was the installation directory (installdir) of the stack.

composer always detect wrong version of my local php

Whenever I try to test PHPUnit or composer update, I get this error:
PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.19
but when I put on the terminal: source ~/.bash_profile it reads that I have 7.4 on my local machine and all works OK. Is there any solution for that issue, to not need to put every time that command source ~/.bash_profile before every start of the console?
Before run source ~/.bash_profile:
PHP 7.3.19 (cli) (built: Jun 12 2020 00:29:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.19, Copyright (c) 1999-2018, by Zend Technologies
After run source ~/.bash_profile:
PHP 7.4.13 (cli) (built: Nov 30 2020 14:57:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
I was facing the same issue, I was using command prompt for laravel artisan commands. Which was showing wrong php version. I closed it and from Xampp Control Pannel Open the Shell for artisan commands and now its detecting the correct PHP Version. It fixed my problem.

Configuring PhpStorm for using built-in web server in OS X Mojave

The question is the following: what are the minimal-required steps to have PhpStorm configured for using built-in web-server on Mojave system?
I mean, installing the least possible additional software on my system (just started from scratch recently and want to keep number of installed software at the minimal level).
I have php and php-fpm installed "out of the box":
$ php -v
PHP 7.1.19 (cli) (built: Aug 17 2018 18:03:17) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
$ php-fpm -v
PHP 7.1.19 (fpm-fcgi) (built: Aug 17 2018 18:03:20)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
Still, when trying to configure "PHP interpreter" in PhpStorm, I end up with this error message:
php-cgi not found: Please ensure that configured PHP Interpreter built
as CGI program (--enable-fastcgi was specified)
Doesn't php-fpm implement Fast-CGI?…

failed upgrading ioncube loeader for php 7.0 and 7.1 in plesk

I have installed plesk onyx in my ubuntu server plus php v7.0 and v7.1. When I tried to install WHCMS v 7.3.0 he told me that I have old ioncube loeader version and I need to make an upgrade to continue the installation so I followed that tutorial : https://support.plesk.com/hc/en-us/articles/214527125-The-IonCube-loader-is-not-available-for-Plesk-PHP-7-1
and this is the version of php v7.0 and v7.1 :
root#sd-86418:/opt/plesk/php/7.1/lib/php/modules# /opt/plesk/php/7.1/bin/php -v
PHP 7.1.10 (cli) (built: Sep 29 2017 15:42:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.1.10, Copyright (c) 1999-2017, by Zend Technologies
root#sd-86418:/opt/plesk/php/7.1/lib/php/modules# /opt/plesk/php/7.0/bin/php -v
Cannot load the ionCube PHP Loader - it was already loaded
PHP 7.0.24 (cli) (built: Sep 29 2017 12:33:10) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.0.24, Copyright (c) 1999-2017, by Zend Technologies
The issue is all time I got HTTP ERROR 500. Please any one help me.
Cannot load the ionCube PHP Loader - it was already loaded
In Plesk ioncube module is already installed and loaded out of the box with the corresponding plesk-php70-ioncube-loader package. You shouldn't install it as described in the mentioned KB article.
Actually, it is a bad idea to install WHMCS on the server where Plesk is already installed. Consequences may be unpredictable. Anyway, why do you think that WHMCS installer uses Plesk PHP /opt/plesk/php/7.0/bin/php instead of OS vendor's PHP from /usr/bin/php with own outdated ioncubeloader?

Categories