Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
1 answer
45 views

How to modify a PHP class to accept PgSql\Result as an attribute

I need to find a way (if possible) to make a PHP class accept a PgSql\Result object as an attribute. PHP 8.1+ has migrated the pgsql result resource to the PgSQL\Result instance. In prior versions ...
Steady Eddie's user avatar
-1 votes
0 answers
26 views

Cannot connect to Postgres from my php/symfony application

I'm having issues connecting to any database from my php/symfony application when I try to connect to pg_connect("host=localhost port=5432 dbname=dbname user=username"); the app just dies ...
Dhee4's user avatar
  • 9
0 votes
0 answers
40 views

Symfony app with doctrine: MariaDB to Postgres = column cannot be cast automatically to type jsonb

In the process of migrating from Mariadb to postgres 16 with these steps: docker exec -ti app php bin/console doctrine:database:create docker exec -ti app php bin/console make:migration docker exec -...
Sam's user avatar
  • 1,737
-1 votes
0 answers
24 views

Symfony7 + doctrine3 + postgres = The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

On a brand new Postgres database postgres: container_name: postgres image: "postgres:latest" ports: - 5432:5432 environment: POSTGRES_USER: app ...
Sam's user avatar
  • 1,737
0 votes
1 answer
51 views

PHP and Postgresql : consecutive insert

I have two tables related by foreign key. To register a user, I want to consecutively insert his informations in info table and credentials in access table. But when the second insert fails (for any ...
Jalagui's user avatar
  • 33
7 votes
10 answers
1k views

Possible bug with PHP PDO and with PostgreSQL

At the startup of the docker application (with laravel php), for 1 request, connection to database is fine. After the first request I start to get this error. SQLSTATE[08006] [7] could not send SSL ...
Harun Barış Bulut's user avatar
0 votes
0 answers
35 views

How to Move Specific IDs to the End in MeiliSearch Results with Laravel Scout?

How can I achieve this specific ordering on id with MeiliSearch in Laravel Scout? $ids = [152,153]; $showcasePosts = ShowcasePost::search('') ->whereIn('tags.name', $tags) ->orderBy('...
Sachin Sanchaniya's user avatar
0 votes
0 answers
40 views

Doctrine\DBAL\Driver\PDO\Statement::__construct(): Argument #1 ($stmt) must be of type PDOStatement, null given

I am getting a very unexpected and unusual error that is kinda hard to trace. I'm thinking this might be actually covering some other, maybe driver level issue? This is Postgres on gcloud, PHP-fpm POD,...
olechafm's user avatar
  • 131
0 votes
2 answers
108 views

Where are PHP extensions/modules stored on MacOS Homebrew installation?

I am currently in the process of trying to integrate a PostgreSQL database into a PHP application. When I run php -m, it lists a very long list of extensions/modules which are allegedly installed, ...
Fonkin Stubbleduck's user avatar
1 vote
0 answers
49 views

How to Enhance Security Against SQL Injection in PHP with PostgreSQL? [duplicate]

I've implemented a PHP script to handle form submissions and insert data into a PostgreSQL database. However, I'm concerned about the potential security vulnerabilities, particularly SQL injection. ...
Joey Cadieux's user avatar
0 votes
0 answers
254 views

Docker, Frankenphp, Laravel error could not find driver Connection: pgsql

I am suffering with a very strange and annoying problem... I am driving the situation crazy: I have created a docker container that has the following configurations: Dockerfile # Dockerfile FROM php:8....
arnaudov's user avatar
1 vote
1 answer
34 views

which query is executed when 'var_dump(pg_fetch_all(pg_query_params($db,'select $1=$2',[FALSE,0])))' is executed ;

While having reiterated some questions until now, I still fail to understand what exactly does 'pg_query_params' when called from PHP !!! Having previously connected $db to a postgres database the ...
George Kourtis's user avatar
0 votes
1 answer
38 views

jsonb for pgsql not working with laravel but raw query is working with pgsql

$response = \App\Models\BinResponse::query() ->selectRaw('id, response') ->whereRaw("response::jsonb IS NOT NULL") ->get(); dd($response); generates ...
Moshiur's user avatar
  • 659
0 votes
0 answers
33 views

parameters in mysql or postgres for queries [duplicate]

I found myself having written the bellow code to be used to manipulate parameters of queries. function prmstr($v){ switch(gettype($v)){ case 'integer':case 'double': return (string)$v; ...
George Kourtis's user avatar
0 votes
0 answers
27 views

is there a way to get the last query sent using from PHP pg_query_params ? ( in order to debug and see if the text sent was correct )

I use the function pg_query_params (or pg_query). For debugging purposes I would like to be able to get the lastly sent query (eventually having parameters replaced inside). Is there a call for that ?
George Kourtis's user avatar

15 30 50 per page
1
2 3 4 5
293