PHP7.3(2) FPM + Oracle OCI8 Extension not loading - php

I am using Laravel Forge, running lemp servers. I've tried 7.2 and 7.3, on Ubuntu 18.04.
I went through this tutorial to try an install oci8 extension. It seems to have installed in cli, as I can tell by php -m but no loading, and no errors via fpm.
I went through this tutorial - https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
I installed 12_2 (64 bit) instantclient basic and SDK, via pecl.
I see the oci8.so file located here - /usr/lib/php/20180731
I have the loading extension stanza at the end of my cli and fpm ini files.
I have tried php 7.2 and 7.3.
Obviously we're getting this error in Laravel simply because the extension isn't loading - https://github.com/yajra/laravel-oci8/issues/506
Help please!

Related

having problem with installing PHP Debug extension in Virtual Studio Code on macOS

I'm trying to install the PHP Debug extension in Virtual Studio Code on macOS Ventura 13.1.
While following the instructions from https://xdebug.org/wizard, I am getting an error "Check for supported PHP versions...configure: error: not supported. Need a PHP version >= 7.2.0 and < 8.2.0 (found 8.2.0)" at step 6: Run ./configure
I have no problems installing PHP and Xdebug when I tried installing via homebrew outside of the VS Code app(followed instructions from https://xdebug.org/docs/install). When I typed php -v in terminal, it shows Xdebug version(3.2) and Zend OPcache v8.2.0.
I have tried copying xdebug.so module file from homebrew php app folder to AMPPS php app folder, configuring php.ini as the step 8 & 9 and reloading the AMPPS Apache web server. It still does not work, and I guess I need to run ./configure -> make to get proper xdebug.so file for AMPPS configuration settings.
UPDATE
I found the solution to use ./configure --with-php-config="path-to-AMPPS-php" but still having the problem of loading the Xdebug extension after reloading the web server.
Is there a way to use Xdebug with AMPPS and Virtual Studio Code together?

Error on installing XDebug 2.9.0 on Vagrant

I'm currently attempting to upgrade Xdebug 2.8.1 to 2.9.0 in order to resolve performance issues on code coverage report generation as reported in https://bugs.xdebug.org/view.php?id=1717.
My system is Ubuntu 19.10, running a Vagrant VM with Debian GNU/Linux 9 (stretch). The VM has multiple versions of PHP running, to support multiple applications on our stack. Those versions are 5.6, 7.0, 7.1, 7.2, 7.3, and 7.4.
The only version of Xdebug available through apt is version 2.8.1, so I've attempted the following methods:
Using Pecl, with apt-get install php-dev, pecl channel-update pecl.php.net, and pecl install xdebug.
Using the Xdebug wizard at https://xdebug.org/wizard, which has instructions for manually unpacking the .tgz file, compiling the xdebug.so, and placing it in the correct folder.
However, in both of these methods, when adding zend_extension=/path/to/xdebug.so to the appropriate php.ini file and restarting the web server, I'm given the following error: Failed loading /usr/lib/php/20180731/xdebug.so: /usr/lib/php/20180731/xdebug.so: undefined symbol: zend_post_startup_cb.
Can anyone provide further guidance?
I've found the solution to the problem.
When installing php-dev the package selected at the time of this writing is for PHP 7.3, when the server's default PHP version is 7.1. By installing php7.1-dev I was able to perform the install using either of the above processes without issue.

I had installed the php trade extension on my macOs Mojave, but I'm not able to use it

I installed php trade extension on my macOS Mojave. But I am not able to use it. I am sure it is installed because when I try to install it again it shows this:
pecl/trader is already installed and is the same as the released
version 0.5.0 install failed
I already add in php.ini this:
extension=trader.so
But, I don't see my trader extension neither on terminal (php -m) nor on phpinfo().
My Php version is - PHP Version 7.2.10 and I'm using XAMPP.
Does anyone know how can I solve this?

DOM extension on PHP 7.2 Amazon Linux 2

I'm getting the error message below from a Symfony 2.8 application running PHP 7.2.8 on an Amazon Linux 2 server.
Fatal error: Uncaught RuntimeException: Extension DOM is required. in /var/www/html/my-app/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:45
php-xml is installed. Other common/related libraries are installed too - php-mbstring, php-common.
In phpinfo, I cannot see the "DOM" section. Below is the screen shot of the installed php-related libraries (yum list installed | grep php*)
What am I missing here?
After 2 days of nit-picking it turned out restarting php-fpm resolves the issue, though I was restarting httpd all along.
sudo systemctl restart php-fpm
Did you verify the extension is enabled in your php.ini? Did yyou happen to install the correct version of php-xml? I had a few issues while installing PHP 7.x and installing extensions. It installed 5.6 extensions instead of 7.x when no version is specified.
Try these commands
To list all modules:
php -m
And/or to list the detailed configuration:
php -i
Check the output for the php-xml extension and if it is loaded.
I read that maybephp-mbstring has to be installed too. But i am not too sure of this, altough i usually have it installed.
In CentOS (and RHEL, i suppose) PHP module (extension) dom is provided by
php74-php-xml
https://centos.pkgs.org/7/remi-x86_64/php74-php-xml-7.4.11-1.el7.remi.x86_64.rpm.html
php74-php-dom
php74-php-domxml
php74-php-simplexml
php74-php-xml = 7.4.11-1.el7.remi
php74-php-xmlreader
php74-php-xmlwriter
php74-php-xsl

Error when i tried to install composer with PHP 7 using xampp package

when i tried to install composer with php 5.6.3 that return message said i have to install php 5.6.4 at least
so i just download xampp package that support php 7 to be able to install composer and laravel and when i tried to install composer after that the composer show me that Error :
The PHP exe file you specified did not run correctly [exit code 1]:
E:\xampp\php\php.exe
The php.ini used by your command-line PHP is: E:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
I also had this problem. Try install Xampp 5.6.24 / PHP 5.6.24 (Not the latest Xampp 7.0.9 / PHP 7.0.9)

Categories