I have a laravel application that I've been trying to run, but I get the following error when hitting the database:
Illuminate \ Database \ QueryException (7)
SQLSTATE[08006] [7] FATAL: unsupported frontend protocol 1234.5679: server supports 2.0 to 3.0
I'm running postgres 12.1 (have also tried with 12.2, no go), php 7.2.28 (have also tried with 7.4.3, no go). The stack trace also mentions a PDOException, so I tried using pecl to install pdo_pgsql, to make sure I have the needed drivers, but I keep getting the following error:
Build complete.
Don't forget to run 'make test'.
running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-bowmanLwaFvm/install-PDO-1.0.3" install
Installing shared extensions: /private/tmp/pear/temp/pear-build-bowmanLwaFvm/install-PDO-1.0.3/usr/local/Cellar/php#7.2/7.2.28/pecl/20170718/
cp: modules/*: No such file or directory
make: *** [install-modules] Error 1
ERROR: `make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-bowmanLwaFvm/install-PDO-1.0.3" install' failed
I've been fighting this for hours today, just to get this application to connect to the database and work properly. Searching around to try different things, like downloading the pdo_pgsql package and manually building it gives the same error.
Help?
Related
when i run the the dockerfile on the server directly its working perfect and build the image but when i run it from jenkins it give me this error
Step 5/67 : RUN pecl install xdebug-3.0.4 && docker-php-ext-enable xdebug
---> Running in 111bf1524f04
downloading xdebug-3.0.4.tgz ...
Starting to download xdebug-3.0.4.tgz (215,870 bytes)
.............................................done: 215,870 bytes
87 source files, building
running: phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
building in /tmp/pear/temp/pear-build-defaultuser2CL8YH/xdebug-3.0.4
running: /tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/bin/php-config
ls: cannot access '.': Operation not permitted
configure: error: working directory cannot be determined
ERROR: `/tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/bin/php-config' failed
The command '/bin/sh -c pecl install xdebug-3.0.4 && docker-php-ext-enable xdebug' returned a non-zero code: 1
any ideas what is the problem
i run this step as root and still same problem
Ran into the same error yesterday. Have you tried using another image, e.g. php:7.4-fpm-buster (or cli)? I noticed that the images have been updated two days ago. Changing the image did the trick for me.
I just ran into your error too with various different commands. This appears to be a change introduced to the upstream dependency Moby which goes into Alpine Linux which goes into the PHP image.
Two solutions:
Short term: Pin your image to a previous version, e.g. php:7.3.28-apache (7.3.29 is broken on Docker 19 for me).
Long term: Upgrade Docker to 20.10.0+ AND libseccomp 2.4.4+ AND runc 1.0.0-rc93+ (read Alpine 3.14.0 release notes.
Sources:
https://github.com/docker-library/php/issues/1177
https://github.com/moby/moby/pull/41353
https://github.com/moby/moby/commit/a18139111d8a203bd211b0861c281ebe77daccd9
https://github.com/alpinelinux/docker-alpine/issues/182
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0
i removed docker and installed newer version and problem solved
I had same issue.
I could not build docker images based php7.4-fpm on docker in gitlab.
It resolved via updating docker engine to 20 from 19.
I'm currently learning Symfony and Doctrine on Wamp, the problem is when i type the command
php bin/console doctrine:database:create
I have the following error :
In AbstractMySQLDriver.php line 110:
An exception occurred in driver: could not find driver
In PDOConnection.php line 31:
could not find driver
In PDOConnection.php line 27:
could not find driver
It's strange because i have my .env file with my DATABASE_URL correct :
DATABASE_URL="mysql://root:#127.0.0.1:3306/csi_film4?serverVersion=5.7"
I also have on WAMP, the pdo_mysql extension ticked on the Wamp, and i've made sure that the extension is in my php.ini file.
But still, i have the error when i type the command to create a database...
I also did a php -m and php -i command on my command prompt but i don't see any pdo_mysql extensions in the php modules so i kknow these modules are missing but I have no idea how can I download them.
If you have any ideas how can I install the missing modules to my php on my Wamp server, I would be glad to have them !
Thanks!
You need to install MysQl, for Ubuntu just use
sudo apt-get install php-mysql
I have IBM DB2 Developer Community Edition installed. DB2 itself works. I want to run PHP scripts on DB2 but need the necessary drivers.
When I run pecl install ibm_db2 I get the following error:
ld: file not found: mac64/libcilkrts.5.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ibm_db2.la] Error 1
ERROR: 'make' failed
I tried making a /opt/ibm/dsdriver directory and setting that as the DB2 installation directory but that didn't work. I also tried to point the installation directory at the sqllib directory (which is what you're supposed to do) but that results in a sqllib/lib not found an error. When I googled how to fix the latter, I wound up back at the former error.
Any ideas?
I am trying to configure MongoDB on the AWS server, but when I try to make an API call, I get the following error:
Fatal error: Class 'MongoDB\Driver\Manager' not found in /srv/www/api/releases/20160912135146/vendor/mongodb/mongodb/src/Client.php on line 56
I have done the following:
Install mongodb, following the instructions here -> install mongodb community edition on ubuntu
installed the php mongodb driver using pecl install mongodb
added extension=mongodb.so to php.ini at etc/php5/cli/php.ini
Started the mongodb service
on the server, I can enter the mongo console with $ mongo
What am I missing here, Please?
PS: the API is developed using Phalcon
I finally found a solution to this. Apparently, the apache server uses a special php.ini file, different from etc/php5/cli/php.ini. This file is located in etc/php5/apache2/php.ini. After installing the mongodb driver using pecl install mongodb, your extension should go in etc/php5/apache2/php.ini i.e add extension = mongodb at the end of etc/php5/apache2/php.ini. Good luck
I have installed php 5.6.13, nginx, postgresql (using brew, on Mac OS)
I found in log:
PDOException: could not find driver at /project-folder//vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
and thought what this is simple mistake in parameters.yml, but everything is OK in parameters and config.
Command doctrine:schema:create and doctrine:fixtures:load working fine with same settings!
So I checked php:
>> php -m
PDO
pdo_dblib
PDO_ODBC
pdo_pgsql
pdo_sqlite
try clear cache: console cache:clear
remove and set up cache, logs folders with http://symfony.com/doc/current/book/installation.html
But I can not login on the site and everytime have save error PDOException: could not find driver
I have no idea — how it can loading fixtures, but can not find PDO driver, when I try to login on the site.
I tried many time remove and install php56, php56-pdo-pgsql, nginx... Any idea...
UPDATE
Problem solved after restart Mac OS.