From: | Kevin Lo <jwlo(at)ms11(dot)hinet(dot)net> |
---|---|
To: | Rimi Lehn <Remi(dot)Lehn(at)irin(dot)univ-nantes(dot)fr> |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] Postgres' DBI(Pg) problems. |
Date: | 1999-01-18 14:03:21 |
Message-ID: | 36A33F28.382CE561@ms11.hinet.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Rimi Lehn wrote:
> Your script worked for me (I skipped everything related to
> forms-lib), but :
>
> - /* xxxx */ C-style comments are not allowed by perl (line #2)
> - you should $sth->finish() and $dbh->disconnect() at the end of your
> script to avoid warnings ("Database handle destroyed without
> explicit disconnect.")
OK, added.
> I assumed that your table course has two fields, both are
> type text. Check that your fields are not numbers (inserted values
> are quoted (line #13)).
>
> You can replace $sth->prepare() and $sth->execute() by a
> $sth->do( "your query" ); as your query has no output row.
>
> Check your web server's logs. At least for apache, stderr
> of cgi scripts is dumped in an error log. Try running your script
> offline. A common mistake is not having access to your database
> with the uid endorsed by your web server (apache usually runs
> cgi scripts as nobody which may not have INSERT permissions on
> the table).
I checked the log file of Apache server, I got an error message:
[Mon Jan 18 18:12:01 1999] [notice] httpd: caught SIGTERM, shutting down
[Mon Jan 18 21:48:28 1999] [notice] Apache/1.3.1 (Unix) configured -- resuming
normal operations
install_driver(Pg) failed: Can't load
'/usr/local/lib/perl5/site_perl/i386-freebsd/auto/DBD/Pg/Pg.so' for module DBD::Pg:
Can't find shared library "libpq.so.2.0" at
/usr/local/lib/perl5/i386-freebsd/5.00404/DynaLoader.pm line 166.
at (eval 1) line 2
at /home/kevin/public_html/example.pl line 14
I've already set enviroment variables PGLIB and LD_LIBRARY_PAHT in .login.
libpq.so.2.0 is in /usr/local/pgsql/lib directory. I don't install mod_perl with
Apache.
Should I install mod_perl? Would you tell me how to solve this problem, thanks.
Best regards,
Kevin.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Durrenberger | 1999-01-18 15:27:13 | |
Previous Message | Gilles Darold | 1999-01-18 11:43:44 | Re: [GENERAL] How to display stored image on web page? |