Re: AJAX pseudo-push

2009-11-12 Thread Jean-Damien Durand
Le jeudi 12 novembre 2009 21:33:48, Nicolas George a écrit :
 he fact that HTTP is not connection-oriented
 means that the server have to implement cookies and timeouts itself to
  track clients instead of relying on the OS TCP stack, but that is not very
  hard.

Just to clarify your meaning, sole HTTP remains a stateless protocol - 
independantly to the fact that tcp connection can be permanent (default but 
not guaranteed behaviour since HTTP/1.1- unless stated otherwise in the  
headers).

Cheers, JD.


Re: mod_perl on win32

2009-08-25 Thread Jean-Damien Durand

Michiel Beijen a écrit :

I'd like to know if it's possible to build mod_perl on Win32; I'd like
to use mod_perl with StrawberryPerl. It seems to be that the only way
that could be done is to compile Apache also with MinGW, and that's not
possible because of limited support for Windows Shared Memory in MinGW
  
Here is how I installed StrawberryPerl + mod_perl + apache2 on Windows 
(tested onVista):


1. Apache
Go to http://httpd.apache.org/download.cgi
Click on /Win32 Binary including OpenSSL 0.9.8i (MSI Installer) /
Some recommend to install it in a directory without space, although I 
did not do that and it still work.


2. Perl
Go to http://strawberryperl.com/ and install the latest kit

3.  I then use the script send in attachement to install all modules I 
need, e.g. perl install_modules.pl


At the top of the script you will see how to get mod_perl2 and various 
other stuff I need for my project. Just the lines for the modules you do 
not need.


HTH,

Cheers, JD.

#!/usr/bin/perl

#
## This script, intended to be run by an installer on Windows
## will hopefully verify packages needed by Freecity are
## installed - and will attempt to install them if needed
#
## (c) 2008 by Jean-Damien Durand jeandamiendur...@free.fr
#
use 5.10.0;
use strict;
use diagnostics;
use Config;
use File::Spec;
use CPAN;

my %required_modules = (
'mod_perl2' = 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd',
'Apache2::Request'  = 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/libapreq2.ppd',
'GD'= 'http://www.bribes.org/perl/ppm/GD.ppd',
'GD::Text'  = 'http://www.bribes.org/perl/ppm/GDTextUtil.ppd',
'Template'  = 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/Template-Toolkit.ppd',
'Config::General'   = 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/Config-General.ppd',
'Apache::DBI'   = 'http://trouchelle.com/ppm10/Apache-DBI.ppd',
'CGI::Simple'   = 'http://trouchelle.com/ppm10/CGI-Simple.ppd',
'HTML::Tree'= 'http://trouchelle.com/ppm10/HTML-Tree.ppd',
'File::Type'= 'http://trouchelle.com/ppm10/File-Type.ppd',
'Image::Size'   = 'http://trouchelle.com/ppm10/Image-Size.ppd',
'Net::Telnet'   = 'http://trouchelle.com/ppm10/Net-Telnet.ppd',
'I18N::Charset' = 'http://trouchelle.com/ppm10/I18N-Charset.ppd',
'XML::RSS'  = 'http://trouchelle.com/ppm10/XML-RSS.ppd',
'Win32::Process'= 'http://trouchelle.com/ppm10/Win32-Process.ppd',
'Win32::DriveInfo'  = 'http://trouchelle.com/ppm10/Win32-DriveInfo.ppd',
'List::MoreUtils'   = 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/List-MoreUtils.ppd',
'Win32::FileOp' = 'http://trouchelle.com/ppm10/Win32-FileOp.ppd',
'Win32::Service'= 'http://trouchelle.com/ppm10/Win32-Service.ppd',
'Win32::OLE'= 'http://www.bribes.org/perl/ppm/Win32-OLE.ppd',
'Text::Chomp'   = 'http://trouchelle.com/ppm10/Text-Chomp.ppd',
'Number::Format'= 'http://trouchelle.com/ppm10/Number-Format.ppd',
'Object::Multitype' = 'http://trouchelle.com/ppm10/Object-MultiType.ppd',
'Win32::IPHelper'   = 'http://trouchelle.com/ppm10/Win32-IPHelper.ppd',
'NetAddr::IP'   = 'http://trouchelle.com/ppm10/NetAddr-IP.ppd'
);
   
print \n;
print \n;
print Freecity va verifier et installer si necessaire des \n;
print modules perl necessaires a son fonctionnement.  \n;
print \n;
print \n;
print Appuyez sur Entree ou Return pour continuer   \n;
print \n;

my $dummy;
read(STDIN, $dummy, 1);

#  -
## Get install directory of perl
#  -
my $installbin = $Config{installbin} || die No installbin in perl config !?\n;
my $installsitelib = $Config{installsitelib} || die No installsitelib in perl 
config !?\n;

#  ---
## This is for Time::ParseDate
#  ---
$ENV{TZ}='PST8PDT';

#  --
## Check required modules
#  --
my $module;
my $cpanmod;
my $ppm = File::Spec-catfile($installbin, 'ppm.bat');
foreach $module (sort keys %required_modules) {
my $found = 0;
#
## For GD we force the installation
#
if ($module ne 'GD') {
foreach $cpanmod (CPAN::Shell-expand(Module, $module)){
++$found;
if ($cpanmod-inst_file) {
print $cpanmod-id,  is already installed\n;
next;
}
install_module($module);
last;
}
} else {
print Forcing $module installation\n;
}
if ($found == 0) {
install_module($module);
}
}

#
## Special hook for Params::Validate that is since recently... buggy - move to 
a perl only solution
#
my $validatedll = File

Re: mod_perl on win32

2009-08-25 Thread Jean-Damien Durand

Jean-Damien Durand a écrit :
Here is how I installed StrawberryPerl + mod_perl + apache2 on Windows 
(tested onVista):


Ah yes of course you will need to add lines like

LoadFile C:\strawberry\perl\bin\perl510.dll
LoadModule perl_module modules/mod_perl.so
LoadFile C:\Program Files\Apache Software 
Foundation\Apache2.2\bin\libapreq2.dll

LoadModule apreq_module modules/mod_apreq2.so

in your httpd.conf (change paths if needed)

Cheers, JD.




Re: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

2009-06-01 Thread Jean-Damien Durand

Mahesh Khambadkone a écrit :

Thanks for the revert.

I'm running Apache 2.2.x and perl-5.10.0, using binary build 1104 of
ActiveState.

1)	Yes, the ppm package was taken from 
 http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd, as per

instructions at
http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages, and I
specified that the mod_perl.so be installed at c:\mod_perl.

2)  Yes, my .conf file includes a loadfile before the LoadModule :

LoadFile D:/Perl/bin/perl510.dll
LoadModule perl_module C:/mod_perl/mod_perl.so


I used c:\mod_perl as per http://perl.apache.org/docs/2.0/rename.html.

In anycase, I went ahead and uninstalled mod_perl, reinstalling directly
into c:\apache\modules, but I still get the same error.
  


Perhaps a hidden dependency to apreq ? 
http://cpan.uwinnipeg.ca/PPMPackages/10xx/libapreq2.ppd .

Who knows. Cheers, JD.