Обсуждение: perl vs php for postgresql

Поиск
Список
Период
Сортировка

perl vs php for postgresql

От
"John"
Дата:
It seems that I having problems locating the DBM:Pg module. I even followed
the instructions on compiling postgresql to support it.  My perl scripts
don't seem to know about a Pg module and I have not had any luck finding
answers. Is is easier to use php with postgresql? Will I have the same kinds
of problems?  Thanks for any advice.

-John



Re: perl vs php for postgresql

От
Zak McGregor
Дата:
On Tue, 22 May 2001 02:48:58 GMT
"John" <vze23skh@verizon.net> wrote:

> It seems that I having problems locating the DBM:Pg module. I even
followed
> the instructions on compiling postgresql to support it.  My perl
scripts
> don't seem to know about a Pg module and I have not had any luck
finding
> answers. Is is easier to use php with postgresql? Will I have the same
kinds
> of problems?  Thanks for any advice.
>
Check the following:
1 - Pg.pm is in your @INC, and has permissions sufficient for the user
executing the perl script to read it.
2 - have you tried perl -e shell -MCPAN as root, and then typing
"install DBD::Pg"?
3 - If you're running your perl script through a webserver, try also
running from command line & see what errors you get
4 - Try a simple perl script, eg perl -e 'use Pg; print "done\n";' and
see if that too gives problems
5 - verify the existance and permissions of Pg.so - it needs to be in
@INC as well, and I *think* it needs 755 perms.
6 - check your versions of Postgres & Pg.
7 - post short sample script and full complete errors if the above fails

HTH

Ciao

Zak

--
====================================================================
Zak McGregor
http://www.carfolio.com - Specifications of cars online. Over 7000!
--------------------------------------------------------------------
Of course my password is the same as my pet's name.
My macaw's name was Q47pY!3, but I change it every 90 days.
====================================================================

Re: perl vs php for postgresql

От
Einar Karttunen
Дата:
On Tue, 22 May 2001, John wrote:

> It seems that I having problems locating the DBM:Pg module. I even followed
> the instructions on compiling postgresql to support it.  My perl scripts
> don't seem to know about a Pg module and I have not had any luck finding
> answers. Is is easier to use php with postgresql? Will I have the same kinds
> of problems?  Thanks for any advice.
>
Both perl and php are good alternatives. You should probably use the one
you are more familiar with. I think php is easier to learn, but once you
learned perl, it is IMHO more powerfull. If the application is very simple
php might be better, but if it is very complex I think perl is better.

- Einar Karttunen