Ask Questions & Get Answers at ibibo sawaal

113

Rank

8147

1692

26

34

Apache Expat vs. XML perl parsing causing segfaults, what do I do?

Asked by ram lal in Computers & Technology at   5:15 AM on December 04, 2008

Sudipta Deb's Answer

Make sure to compile apache with expat disabled. The ./make_httpd/build_httpds.sh in the distribution will do this for you, with the --disable-rule=EXPAT in particular:
cd ../$APACHE
echo "Building apache ============================== "
./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/ perl/libperl.a \
--enable-module=ssl \
--enable-module=proxy \
--enable-module=so \
--disable-rule=EXPAT

Answered at 6:13 AM on December 04, 2008

Read all answers

Why do variables retain their values between requests?

Asked by ram lal in Computers & Technology at   5:16 AM on December 04, 2008

Sudipta Deb's Answer

Unless scoped by my() or local(), perl variables in mod_perl are treated as globals, and values set may persist from one request to another. This can be seen in as simple a script as this:
<HTML><BODY>
$counter++;
$Response->Write("<BR>Counter: $counter");
</BODY></HTML>
The value for $counter++ will remain between requests. Generally use of globals in this way is a BAD IDEA, and you can spare yourself many headaches if do "use strict" perl programming which forces you to explicity declare globals like:
use vars qw($counter);
You can make all your Apache::ASP scripts strict by default by setting:
PerlSetVar UseStrict 1

Answered at 6:13 AM on December 04, 2008

Read all answers

How can I keep search engine spiders from killing the session manager?

Asked by ram lal in Computers & Technology at   5:19 AM on December 04, 2008

Sudipta Deb's Answer

If you want to disallow session creation for certain non web browser user agents, like search engine spiders, you can use a mod_perl PerlInitHandler like this to set configuration variables at runtime:
# put the following code into httpd.conf and stop/start apache server
PerlInitHandler My::InitHandler

<Perl>

package My::InitHandler;
use Apache;

sub handler {
my $r = shift; # get the Apache request object

# if not a Mozilla User Agent, then disable sessions explicitly
unless($r->headers_in('User-Ag ent') =~ /^Mozilla/) {
$r->dir_config('AllowSessionSt ate', 'Off');
}

return 200; # return OK mod_perl status code
}

1;

</Perl>
This will configure your environment before Apache::ASP executes and sees the configuration settings. You can use the mod_perl API in this way to configure Apache::ASP at runtime.

Answered at 6:11 AM on December 04, 2008

Read all answers

How do I access the ASP Objects in general?

Asked by ram lal in Computers & Technology at   5:20 AM on December 04, 2008

Sudipta Deb's Answer

All the ASP objects can be referenced through the main package with the following notation:
$main::Response->Write("html output");
This notation can be used from anywhere in perl, including routines registered with $Server->RegisterCleanup().
Y ou use the normal notation in your scripts, includes, and global.asa:
$Response->Write("html output");

Answered at 6:10 AM on December 04, 2008

Read all answers

I am getting a tie or MLDBM / state error message, what do I do?

Asked by ram lal in Computers & Technology at   5:18 AM on December 04, 2008

Sudipta Deb's Answer

Make sure the web server or you have write access to the eg directory, or to the directory specified as Global in the config you are using. Default for Global is the directory the script is in (e.g. '.'), but should be set to some directory not under the www server document root, for security reasons, on a production site.
Usually a
chmod -R -0777 eg
will take care of the write access issue for initial testing purposes.
Failing write access being the problem, try upgrading your version of Data::Dumper and MLDBM, which are the modules used to write the state files.

Answered at 6:12 AM on December 04, 2008

Read all answers

Apache errors on the PerlHandler or PerlModule directives ?

Asked by ram lal in Computers & Technology at   5:17 AM on December 04, 2008

Sudipta Deb's Answer

You get an error message like this:
Invalid command 'PerlModule', perhaps mis-spelled or defined by a
module not included in the server configuration.
You do not have mod_perl correctly installed for Apache. The PerlHandler and PerlModule directives in Apache *.conf files are extensions enabled by mod_perl and will not work if mod_perl is not correctly installed.
Common user errors are not doing a 'make install' for mod_perl, which installs the perl side of mod_perl, and not starting the right httpd after building it. The latter often occurs when you have an old apache server without mod_perl, and you have built a new one without copying over to its proper location.

Answered at 6:12 AM on December 04, 2008

Read all answers

Now I've got my server installed, how do I create a test certificate?

Asked by ram lal in Computers & Technology at   5:29 AM on December 04, 2008

Sudipta Deb's Answer

Step one - create the key and request:

openssl req -new > new.cert.csr
Step two - remove the passphrase from the key (optional):
openssl rsa -in privkey.pem -out new.cert.key
Step three - convert request into signed cert:
openssl x509 -in new.cert.csr -out new.cert.cert -req -signkey new.cert.key -days 365
The Apache-SSL directives that you need to use the resulting cert are:
SSLCertificateFile /path/to/certs/new.cert.cert
SSLCertificateKeyFile /path/to/certs/new.cert.key

Answered at 5:50 AM on December 04, 2008

Read all answers

Where to get Digital certificates for Apache-SSL?

Asked by ram lal in Computers & Technology at   5:26 AM on December 04, 2008

Sudipta Deb's Answer

The following companies have requested links to their pages. I do not endorse, recommend, or in any way associate myself with these organisations. They are listed in the order they made the requests.
Digital certificates are available for Apache-SSL from:

Thawte Consulting, at http://www.thawte.com/html/RET AIL/ssl/index.html
CertiSign Certificadora Digital Ltda., at http://www.certisign.com.br
I KS GmbH, at http://www.iks-jena.de/produkt e/ca/
BelSign NV/SA, at http://www.belsign.be
Verisig n, Inc. at http://www.verisign.com/produc ts-services/security-services/ ssl/index.html
TC TrustCenter (Germany) at http://www.trustcenter.de/tc-s erver
Deutsches Forschungsnetz at http://www.pca.dfn.de/dfnpca/c ertify/ssl/
Entrust.net Ltd. at http://www.entrust.net/product s/index.htm
Equifax Inc. at http://www.equifaxsecure.com/e businessid/
GlobalSign NV/SA at http://www.GlobalSign.net
Net Lock Kft. (Hungary) at http://www.netlock.net
Certpl us SA (France) at http://www.certplus.com
GeoTr ust Inc. (USA) at http://www.freessl.com
regist er.com (USA) at http://commercelock.register.c om
lanechange.net (Canada) at http://www.lanechange.net/#ser ver certs
KPN Telecom (The Netherlands) at http://certificaat.kpn.com/
T ier Networking (USA) at http://www.tier-networking.com /sslcerts/
ipsCA (Spain) at http://certs.ipsca.com/FreeCer tsForApacheSSL/
CAcert (Australia) at http://www.cacert.org/
Comodo CA (USA/UK) at http://www.instantssl.com/
Xo lphin (Netherlands) at http://www.sslcertificaten.nl/
usertrust (USA) at http://www.usertrust.com/
Net working4All (Netherlands) at http://www.ssl-beveiligd.nl/
Microsec Kft. (Hungary) at http://www.e-szigno.hu/
DigiC ert Inc. (USA) at http://www.digicert.com

Answered at 5:50 AM on December 04, 2008

Read all answers

From where apache ssl Download?

Asked by ram lal in Computers & Technology at   5:25 AM on December 04, 2008

Sudipta Deb's Answer

Current release: apache_1.3.34+ssl_1.57
Releas e date: December 21, 2005

You will also need openssl-0.9.8a or better, which you can find here.
Apache-SSL source patches can be found on the following UK master distribution sites:

Oxford University.
University of Cambridge Computer Laboratory and their mirrors.
and additional FTP mirrors at:

ftp.zedz.net (The Netherlands)
ftp.win.ne.jp (Japan)
ftp.sage-au.org.au (Australia)
ftp.vwv.com (South Africa)
planetmirror.com (Australia)
ftp.it.net.au (Australia)
ftp.infoscience.c o.jp (Japan)
ftp.funet.fi (Finland)
ftp.raver.net (Canada)
ftp.pca.dfn.de (Germany)
ftp.sekure.net (Sweden)
opensores.thebunker. net (UK)
ftp.gin.cz (CZ)
ftp.cordef.com.pl (Poland)
hal.csd.auth.gr (Greece)
gd.tuwien.ac.at (Austria)
or HTTP mirrors at:
planetmirror.com (Australia)
ftp.it.net.au (Australia)
opensores.thebunk er.net (UK)
gd.tuwien.ac.at (Austria)
confer09.condor-edv .com (Germany)
hostingzero.com (USA)
securehost.com (Bahamas)
O/S specific versions:
RedHat, Caldera and TurboLinux source and executable .rpms can be found on all the above servers in the contrib/rpms directory.
debian stable lives here, and bleeding edge unstable, here.
The FreeBSD port lives at: http://www.freebsd.org/ports/w ww.html.

Answered at 5:51 AM on December 04, 2008

Read all answers

What is Apache-SSL ?

Asked by ram lal in Computers & Technology at   5:23 AM on December 04, 2008

Sudipta Deb's Answer

Apache-SSL is a secure Webserver, based on Apache and SSLeay/OpenSSL. It is licensed under a BSD-style licence, which means, in short, that you are free to use it for commercial or non-commercial purposes, so long as you retain the copyright notices. This is the same licence as used by Apache from version 0.8.15.

Answered at 5:51 AM on December 04, 2008

Read all answers

Editor's Pick

Categories

sawaal signature
sawaal free visiting card