Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #19613

Re: New php project from scractch, PDO or psycopg?

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php, comp.lang.python
Subject Re: New php project from scractch, PDO or psycopg?
Date Tue, 24 Feb 2026 15:39:36 +0100
Lines 25
Message-ID <n05rh8Fkfm1U1@mid.individual.net> (permalink)
References <10njo8g$3n983$2@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net s7LGpMLY9jV3m9t5FVwdSQmRH9copmETcvmsE3ypw1VULDShpX
Cancel-Lock sha1:xh7wh8Uh6E4kPLA1PGxUaWgDCUw= sha256:ujfTlWtXfgCOoQ7bV8gbHxp/chx/k3LCIHLrj1MYCZU=
User-Agent Mozilla Thunderbird
Content-Language en-US-large
In-Reply-To <10njo8g$3n983$2@dont-email.me>
Xref csiph.com comp.lang.php:19613 comp.lang.python:197665

Cross-posted to 2 groups.

Show key headers only | View raw


On 24/02/2026 09.41, ^Bart wrote:

> I work in a company 100% unix like, we don't have MS o.s., and our 
> framework works with psycopg on debian13+venv.
> 
> I'm working to a personal cms written from scratch alwasy on debian13 
> with php8.4, postgresql18 and nginx, now I'm using psycopg so I have a 
> different user for the php and another one for the venv etc.
> 
> I heard psycopg for security reasons and also for the performance is 
> better than pdo, tell me what do you think about it! :)

I think this is more about layering the application, the frontend I 
guess is written in PHP while the backend is written in Python. I would 
keep that separation and only allow the backend to access the database, 
also keep it on a such level that the backend don't trust the data from 
the frontend, that all data is validated before use, sure the frontend 
shouldn't trust the users and validate their input.

Sure you could have been able to write everything in one or the other 
language (python can do both frontend and backend, as you can do with 
php too even less common), but I doubt you have the power to decide this.

--
  //Aho

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

New php project from scractch, PDO or psycopg? ^Bart <none@none.it> - 2026-02-24 09:41 +0100
  Re: New php project from scractch, PDO or psycopg? Arne Vajhøj <arne@vajhoej.dk> - 2026-02-24 07:40 -0500
  Re: New php project from scractch, PDO or psycopg? "J.O. Aho" <user@example.net> - 2026-02-24 15:39 +0100
    Re: New PHP project from scratch, PDO or psycopg? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-24 20:29 +0000
    Re: New php project from scractch, PDO or psycopg? ^Bart <none@none.it> - 2026-03-07 11:17 +0100
      Re: New php project from scractch, PDO "J.O. Aho" <user@example.net> - 2026-03-07 13:19 +0100

csiph-web