Re: Apache::DB ported to mp2
Hi Craig, I didn't have to make any changes to the XS code on this module to port it to mp2. Can you do me a favor and grab Apache::DB 0.06 and see if you get the same error? Not being a Windows user or even having access to a Windows installation with a compiler, this is going to be difficult for me to track down. I'm assuming you've built other CPAN modules that have C/XS components on this system with that compiler before without problems? Does anyone know if XS generates C code that .net 2003 can compile? - Frank Wiles [EMAIL PROTECTED] http://frank.wiles.org - On Thu, 8 Apr 2004 19:39:25 -0700 Craig Dayton [EMAIL PROTECTED] wrote: Hi Frank, Thanks for the Update. In compiling with 'VS .Net 2003', the error shown below is generated. -Craig E:\Perl\cpan\build\Apache-DB-0.07nmake Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. cl -c-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1-DVERSION=\0.07\ -DXS_VERSION=\ 0.07\ -IE:\Perl\lib\CORE DB.c DB.c DB.xs(55) : error C2065: 'SIGINT' : undeclared identifier NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. -Original Message- From: Frank Wiles [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 11:42 To: [EMAIL PROTECTED] Subject: Apache::DB ported to mp2 Hi Everyone, I've ported Apache::DB to work with mp1 and mp2. I've done some initial testing, but would appreciate anyone interested to give it a whirl. Let me know if you run into any problems. Note that I haven't ported Apache::DProf or Apache::SmallProf yet, but plan on doing those in the next few weeks as time permits. You can grab it at: http://cpan.org/authors/id/F/FW/FWILES/Apache-DB-0.07.tar.gz Once I've done a bit more testing and get the other modules ported it will be released on CPAN for general consumption. - Frank Wiles [EMAIL PROTECTED] http://frank.wiles.org - -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Weird CGI Caching problem
Perrin, Did both things you mentioned. I upgraded to the latest CGI for ActiveState and made the modification. I still get the same caching problem that I was getting before (try it on your own system). Is this a bug in Mod_perl? In my parent script, why don't I have control over the CGI object? Jeremy Perrin Harkins wrote: On Wed, 2004-04-07 at 17:03, Jeremy Silva wrote: use CGI; my $counter; my $cgi; sub run{ print Content-type: text/plain\r\n\r\n; print HERE; $counter = 0; $cgi=null; You don't need to do this. Just pass the CGI object to your sub: my $cgi = CGI-new(); run($cgi); sub run { my $cgi = shift; # do something with $cgi } Also, be sure that you are using the latest version of CGI.pm. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Weird CGI Caching problem
All, Sorry for the barrage, but I found a solution to my cgi caching problem, using Apache2 and Mod_perl (under Win/ActiveState). The simple answer, is to not use the default CGI.pm module, but instead use the CGI::Simple module instead. From what I've read, it is faster than the default CGI module. As soon as I installed CGI-Simple in the PPM, and edited the Simple.pm module found in the perl\site\lib\cgi\ directory according to the comment # comment this and the __DATA__ token out under mod_perl, the cgi caching problem dissapeared under Mod_perl. JS js wrote: Perrin, Did both things you mentioned. I upgraded to the latest CGI for ActiveState Perrin Harkins wrote: On Wed, 2004-04-07 at 17:03, Jeremy Silva wrote: use CGI; my $counter; my $cgi; sub run{ print Content-type: text/plain\r\n\r\n; print HERE; $counter = 0; $cgi=null; You don't need to do this. Just pass the CGI object to your sub: my $cgi = CGI-new(); run($cgi); sub run { my $cgi = shift; # do something with $cgi } Also, be sure that you are using the latest version of CGI.pm. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: mod_perl and JavaScript
On Thu, 2004-04-08 at 18:04, Kemin Zhou wrote: The bug is the classical problem with named subroutin inside another subroutine. This is one shortcoming of mod_perl. PHP would not have such a problem. It doesn't actually have much to do with mod_perl. It's just a coding mistake, tripping over perl's scoping rules. It's still a mistake when writing for CGI, but you wouldn't see it because the interpreter exits after every request. PHP has unusual scoping rules. In order to access a variable declared in a higher scope in PHP, you have to make the variable global. If you were to use a global variable in perl, that would also avoid the closure issue. Glad to hear you fixed the problem. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Weird CGI Caching problem
On Fri, 2004-04-09 at 12:00, Jeremy Silva wrote: The simple answer, is to not use the default CGI.pm module, but instead use the CGI::Simple module instead. From what I've read, it is faster than the default CGI module. Glad to hear CGI::Simple is working for you. CGI.pm's mod_perl support is somewhat tricky, because it uses a lot of global variables. However, it does work. If it didn't work for you, it was probably due to a scoping problem somewhere in your code, like an unintentional closure. If you have further problems with apparent caching, look for something like that. - Perrin -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
RE: Apache::DB ported to mp2
On Thu, 8 Apr 2004, Craig Dayton wrote: Hi Frank, Thanks for the Update. In compiling with 'VS .Net 2003', the error shown below is generated. E:\Perl\cpan\build\Apache-DB-0.07nmake cl -c-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\0.07\ -DXS_VERSION=\ 0.07\ -IE:\Perl\lib\CORE DB.c DB.c DB.xs(55) : error C2065: 'SIGINT' : undeclared identifier This needs the definition of SIGINT in signal.h on Win32. For some reason just including signal.h results for me in a syntax error, probably because of some other header files also being needed, but as a workaround, putting in #define SIGINT 2 in DB.xs will allow it to compile. -- best regards, randy kobes -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
RE: Apache::DB ported to mp2
Frank, I get the same error exact error with Apache::DB 0.06. Compress-Zlib-1.33 has compiled installed successfully just now and it appears to be using XS. VS .Net (prior version) is generating the same error too. Note: The option '-Gf' was changed to '-GF' in the makefile because the compiler didn't like '-Gf'. I don't mind doing compile tests, if you need that support. -Craig -Original Message- From: Frank Wiles [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 08:17 To: Craig Dayton Cc: [EMAIL PROTECTED] Subject: Re: Apache::DB ported to mp2 Hi Craig, I didn't have to make any changes to the XS code on this module to port it to mp2. Can you do me a favor and grab Apache::DB 0.06 and see if you get the same error? Not being a Windows user or even having access to a Windows installation with a compiler, this is going to be difficult for me to track down. I'm assuming you've built other CPAN modules that have C/XS components on this system with that compiler before without problems? Does anyone know if XS generates C code that .net 2003 can compile? - Frank Wiles [EMAIL PROTECTED] http://frank.wiles.org - On Thu, 8 Apr 2004 19:39:25 -0700 Craig Dayton [EMAIL PROTECTED] wrote: Hi Frank, Thanks for the Update. In compiling with 'VS .Net 2003', the error shown below is generated. -Craig E:\Perl\cpan\build\Apache-DB-0.07nmake Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. cl -c-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1-DVERSION=\0.07\ -DXS_VERSION=\ 0.07\ -IE:\Perl\lib\CORE DB.c DB.c DB.xs(55) : error C2065: 'SIGINT' : undeclared identifier NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. -Original Message- From: Frank Wiles [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 11:42 To: [EMAIL PROTECTED] Subject: Apache::DB ported to mp2 Hi Everyone, I've ported Apache::DB to work with mp1 and mp2. I've done some initial testing, but would appreciate anyone interested to give it a whirl. Let me know if you run into any problems. Note that I haven't ported Apache::DProf or Apache::SmallProf yet, but plan on doing those in the next few weeks as time permits. You can grab it at: http://cpan.org/authors/id/F/FW/FWILES/Apache-DB-0.07.tar.gz Once I've done a bit more testing and get the other modules ported it will be released on CPAN for general consumption. - Frank Wiles [EMAIL PROTECTED] http://frank.wiles.org - -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
RE: Apache::DB ported to mp2
Thanks Randy, You got it. After adding '#define SIGINT 2' to DB.xs, it compiled just fine. -Craig -Original Message- From: Randy Kobes [mailto:[EMAIL PROTECTED] Sent: Friday, April 09, 2004 17:15 To: Craig Dayton Cc: 'Frank Wiles'; [EMAIL PROTECTED] Subject: RE: Apache::DB ported to mp2 On Thu, 8 Apr 2004, Craig Dayton wrote: Hi Frank, Thanks for the Update. In compiling with 'VS .Net 2003', the error shown below is generated. E:\Perl\cpan\build\Apache-DB-0.07nmake cl -c-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\0.07\ -DXS_VERSION=\ 0.07\ -IE:\Perl\lib\CORE DB.c DB.c DB.xs(55) : error C2065: 'SIGINT' : undeclared identifier This needs the definition of SIGINT in signal.h on Win32. For some reason just including signal.h results for me in a syntax error, probably because of some other header files also being needed, but as a workaround, putting in #define SIGINT 2 in DB.xs will allow it to compile. -- best regards, randy kobes -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html