98 questions
0
votes
2
answers
117
views
PDO pgsql: fetch bytea column
In PostgreSql there is a table with a column of type 'bytea' with jpeg.
In pgAdmin this column is displayed as [binary data].
In php script I need to get binary data from this column and translate it ...
0
votes
1
answer
60
views
PHP Mac OS X pg_connect on PostgreSQL 15 crashes only in Apache HTTPD
My PHP web app is crashing upon calling pg_connect when running on my Mac OS X machine ( it does not crash from a RHEL8 server ).
It's only happening when:
Connecting to a PostgreSQL 15 database ...
1
vote
1
answer
72
views
In php, will pg_field_type() result in an extra communication with the database?
If pg_field_type() makes a call to database in any way, it can be expensive. If not, it is "cheap" in the boundaries of being cheap in PHP.
So the question is, will calling pg_field_type() ...
0
votes
1
answer
340
views
Laragon load some php extensions on CLI but not load in Apache (curl, intl, pdo_pgsql)
I'm trying to load a php environment with Laragon in Windows 10.
When I start Apache, in php_errors.log file I get this warnings:
[13-Sep-2024 01:03:32 UTC] PHP Warning: PHP Startup: Unable to load ...
0
votes
2
answers
2k
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, ...
2
votes
2
answers
123
views
in PHP does pg_query_params takes into consideration the type of parameter passed?
From the documentation it is not clear to me what exactly pg_query_params does when non string parameters are given.
pg_query_params (PHP 5 >= 5.1.0, PHP 7, PHP 8)
pg_query_params — Submits a ...
0
votes
1
answer
212
views
How to extract file extension from filepath field in PostgreSQL?
need to extract file extensions from the file_path column from my PostgreSQL table. kindly help me to achieve to extract the distinct file extensions as list using select query.
have table like this
...
1
vote
0
answers
126
views
Unable to Connect to Postgres DB through PHP(7.4) in Windows server
I host my PHP page in Windows IIS, Uncommented the pgsql extensions in php.ini file, restarted the services/machine. stil getting the below error in my php page,
Connection failed. Error message: ...
0
votes
1
answer
1k
views
Unable to Install php-pgsql (Virtual) Module in WordPress:8.2 Docker Container
It is not possible for me to install the php-pgsql (virtual) module in a cointainer based on the official image wordpress:8.2
In theory, as the container runs a debian12 bookworm code shouldn't be ...
0
votes
1
answer
218
views
Write PHP code support both MySQL and PostgreSQL without OOP or PDO
I wanted to write a simple forum site with PHP that can be configured to use MySQL or PostgreSQL. Currently there are PDO, but I don't know OOP and I don't want to learn it. I have an idea about a ...
0
votes
1
answer
810
views
Callback function not found or invalid name, in set_error_handler
The setup works like this:
There is a Database Class and a Utils Class
The scripts initialize an instance of the Utils Class which initializes the DatabaseConnection instance (I assume that its got ...
1
vote
1
answer
9k
views
Installing php8.2-pgsql in Codespaces doesn't work first time and workaround to solve it. Should I have done something different?
I'm using Codespaces to develop my project but for some reason I've had a lot of problems to install the pdo_pgsql driver to use Postgress with my symfony project.
Finally, I've found a solution that ...
0
votes
0
answers
40
views
Return alphanumeric values as id in postgresql
I have table called tickets with p.k. id and ticket number (i.e. TK0001)
I am using a laravel and for some reason I am required to get the ticket_number as id in response.
Below is my query
SELECT ...
0
votes
0
answers
34
views
MVC cannot use any other function than Find and FindOneBy
I have a project to do in PHP (MVC) with my university. Unfortunately, I've been stuck for a week, and nobody in the university knows where the problem is.
Error
Fatal error: Uncaught ...
1
vote
0
answers
341
views
can't install phpPgAdmin with cwp
I am using cwp on my VPS and I have this problem when I try to login to https://hostname:2031/phpPgAdmin/
The PHP configuration on this server does not support PostgreSQL. You need to reinstall PHP ...