Re: Disk acces

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: Disk acces
Дата
Msg-id m3y9vril49.fsf@belphigor.mcnaught.org
обсуждение исходный текст
Ответ на Disk acces  ("Anders R. Sveen" <anderssv@stud.ntnu.no>)
Список pgsql-general
"Mitch Vincent" <mitch@venux.net> writes:

> We do a lot of development in PHP and only use PostgreSQL, I've tried and
> tried to get persistant connections to work but every time I use them, very
> strange things start to happen (variables disappearing and getting corruted
> to name one).. It was said a while back on the list that the most probable
> reason for that is that PHP isn't thread safe and that was probably the
> cause.. Another strange, though not surprising thing that happens is that if
> you begin a transaction in a PHP script and the script is terminated before
> you comit or rollback (be that from the user clicing stop or a script/server
> error), the transaction is left open for the next time that backend is
> used -- it's caused a lot of problems.. I say it's not surprising because
> that's exactly what I'd expect to happen, there just doesn't seem to be much
> of a way to prevent it in some cases.. I've tried the ignore_user_abort but
> it still happened quite a lot. (I'm spoiled with Ruby and ensure :-) )..

Well, I spoke from the point of view of someone who knows what PHP is
and knows that it's supposed to support persistent connections.  I've
never written a web page in PHP or run a site that uses it; sorry I
can't really help. ;( It's too bad, because PHP/PGSQL looks like it
should be a good combo for serving lightweight web applications.

> Have you had those kinds of problems and if so how did you overcome them?
> Does Enhydra manage your database/web server pool?

Yes, Enhydra is a Java web application server (open source) that does
DB connection pooling for you, gives you a GUI interface to lay out
your tables (if you want) which then generates both SQL and Java code
for you, and also has a very good HTML templating mechanism called
XMLC.  If you're interested in finding out more about it check out:

http://www.enhydra.org/

I moved from straight Perl/CGI to Java servlets and then to Enhydra,
which is why I've never used PHP.

-Doug

В списке pgsql-general по дате отправления:

Предыдущее
От: "Mitch Vincent"
Дата:
Сообщение: Re: php as stored procedures
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: Disk acces