You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Nicolas Parody <in...@nicodev.com> on 2001/04/12 18:46:16 UTC

Problem with Embperl/mod_perl/Apache

Hi,

I am not sure if this belongs in the Embperl mailing list but here is my question:

I have installed the debian packages for embperl(1.3.0-1) that were compiled in with support for mod_perl. I have an index.epl file which does something like this (simplified version):

[- require '/home/httpd/cgi-bin/testsite/initialise.pl' -]
<html>
<body>
	this is a test.
</body>
</html>

In initialise.pl I have the following:

#!/usr/bin/perl
package TEST;
use DBI;
$dbh1 = DBI->connect("DBI:mysql:testdb", "testusr", "testpass");
return 1;


Now every time I try to connect to the site I get "Document contains no data". When I comment out the line connecting to the db everything seems to work fine. This design worked without problems when I used Embperl through CGI. I would like to keep all my functions in the package test and even do the session management there. I used to do this along the lines of:
<a href="page2.epl[+ &TEST::session_params +]" which would attach "?session_id=6346zguzg&other_stuff=blabla".

Could anyone please point me in the right direction?

Thanks,

Nico

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Problem with Embperl/mod_perl/Apache

Posted by Gerald Richter <ri...@ecos.de>.
>
> [- require '/home/httpd/cgi-bin/testsite/initialise.pl' -]
>
> Now every time I try to connect to the site I get "Document contains no
data".

I guess something with your DBI connect went wrong. Take a look into your
httpd error log. Any messages there ?

Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org