Re: mod_perl caching/delay
If I remember correctly we had a similar problem and the way we solved it was to make sure that at the beginning of the script all variables were initialized to 0 or blank. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: [EMAIL PROTECTED] 08-934-3036 >>> andrew dunn <[EMAIL PROTECTED]> 10/12/2003 02:38:51 >>> Hi, I've just moved a shopping cart I've been working on into mod_perl, and fortunately it all seems to have worked straight away without any code changes. There is one problem though related to the what seems like caching of pages. I'm building each page of categories based on the category id passed in, and when I access one page (e.g. cat_id=10), followed quickly by another of a different category (e.g. cat_id=15) I always get the original page again (cat_id=10). Evened forced refreshing of the page by holding shift in the browser, and setting the expired header to yesterday don't fix it. However, if I then leave the site alone for a minute or two, and refresh the page I will get the new page that I wanted (cat_id=15). It seems to me like mod_perl is somehow caching the results of the script for a short time, and if its called quickly again it will just send out the same results without accepting new parameters. Is there a way to disable this or prevent it from behaving like this ? I'm running apache-1.3.27ensim-0ensim10 and mod_perl-1.26-5. I can't upgrade because my server is running ensim. Thanks for any pointers. Andy. -- Luibh.com E: [EMAIL PROTECTED] W: http://www.luibh.com Web Hosting and Development. -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
running 2 versions of apache and mod perl on the same machine
We are moving to a new web server and we have installed apache 2.0.48 with mod_perl 1.99_12. We are running perl 5.8.1 on a Sun Solaris machine. One of the applications that we run on our web server is an eprints server which is system for archiving documents. When one compiles eprints, one essentially compiles it together with apache and mod perl. As a matter of fact on our present server, we have 2 apache processes running - the standard one on port 80, and the apache process with eprints on port 81. The problem is that we are having problems compiling eprints on our new server using apache 2 and mod perl 2 and I was wondering if we could compile eprints with apache 1.3 and mod perl 1. In other words, is it possible to run 2 apache processes on the same machine, one with apache 2 and mod perl 2, and one with apache 1.3 and mod perl 1. Any help will be appreciated. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: [EMAIL PROTECTED] 08-934-3036 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: running 2 versions of apache and mod perl on the same machine
I am trying to run 2 versions of Apache and mod_perl - Apache 1.3 with modperl 1 and Apache 2 with modperl 2 - on the same machine on 2 different ports. I first installed apache 2 with mod perl 2. Then I went to compile and install Apache 1.3 and mod perl 1. Doing this apparently overwrote some of the modules in my perl library. The modules that were overwritten are in the directories /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/auto/Apache /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/mod* /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/Apache/ After I did the Apache 1-modperl 1 installation, things that previously worked in apache 2-modperl , stopped working. Does this mean that I need 2 different perl libraries? How does one do that? BTW, we are running perl 5.8.1. Thanks for any information. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: [EMAIL PROTECTED] 08-934-3036 -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: running 2 versions of apache and mod perl on the same machine
Thank you very much. We have successfully installed Apache 2 and modperl 2 as well as apache 1.3 and modperl1 on the same machine using the same perl library. thanks to all who gave their help. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: [EMAIL PROTECTED] 08-934-3036 >>> Stas Bekman <[EMAIL PROTECTED]> 13/01/2004 10:03:46 >>> Malka Cymbalista wrote: > I am trying to run 2 versions of Apache and mod_perl - Apache 1.3 with > modperl 1 and Apache 2 with modperl 2 - on the same machine on 2 > different ports. I first installed apache 2 with mod perl 2. Then I > went to compile and install Apache 1.3 and mod perl 1. Doing this > apparently overwrote some of the modules in my perl library. The > modules that were overwritten are in the directories > /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/auto/Apache > /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/mod* > /usr/local/lib/perl5/site_perl/5.8.1/sun4-solaris/Apache/ > After I did the Apache 1-modperl 1 installation, things that previously > worked in apache 2-modperl , stopped working. Does this mean that I > need 2 different perl libraries? How does one do that? BTW, we are > running perl 5.8.1. > Thanks for any information. There is no problem to have both mp generations under the same perl lib, you need to build mod_perl 2.0 with MP_INST_APACHE2=1. http://perl.apache.org/docs/2.0/user/install/install.html#MP_INST_APACHE2 http://perl.apache.org/docs/2.0/user/install/install.html#Configuring_mod_perl http://perl.apache.org/docs/2.0/user/config/config.html#Accessing_the_mod_perl_2_0_Modules __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
Re: mod_perl (1.99_16) fails to begin tests because of assertion "rv == APR_SUCCESS" failed in vhost
We are running: Solaris 9 on Sun Sparc apache 2.0.48 (without ssl) mod_perl 1.99_12 gcc 3.3 perl 5.8.1 Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: [EMAIL PROTECTED] 08-934-3036 >>> <[EMAIL PROTECTED]> 31/08/2004 16:35:39 >>> Apropos previous emails on this subject, has ANYONE gotten mod_perl to run with: Solaris 9 on Sun Sparc Apache httpd 2.0.50 (with ssl and other features enabled) mod_perl(1.99_16) gcc 2.95.3 perl-5.8.4 If you have been able to run with the exact configuration above or even a reasonably close (different gcc perhaps) approximation, I would appreceiate hearing from you. Suggestions to move to Linux are certainly appreciated but only as a last resort (too awful much to compile). Thanks, Marty Renquist [EMAIL PROTECTED] - > dPerl_2dRegistry_t_cgi_2db -- 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
Apache, mod_perl and PHP
We are having a strange problem with our PHP sites and I was wondering of someone has any pointers to offer. We are running apache 2.0.55 with mod_perl 2.0.1 and php 4.3.3 and mod_ssl 2.0.55 on a Sun Solaris machine. Every now and then, when you click on a URL that is a php script, instead of the file executing, a File Download panel opens and it asks if you want to save it to your computer. It is as if it does not recognize that it is a php file. Sometimes it actually displays the code of the file. The really strange thing is that it appears to happen randomly. That is, some times the same link works perfectly well and the links open properky. But sometimes, it asks if you want to save the file. If you click on Cancel and then click on the link again, it usually opens properly. Someone told me that there are problems for mod perl and php and mod_ssl to live together. Most of our site is in perl so I am not about to give up the mod_perl abilities but there are a few people who insist on PHP and I'd like that to be able to work properly as well. Does anyone have any information on this and is there anything I can do so that everything works? Thanks for any help. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
regular expressions
Can anyone recommend a good book on regular expressions. I don't need a beginners book - I know how to work with regular expressions but I want to be able to understand and use everything and anything that can be done with regular expressions -I guess I would say that I need an advanced book. Thanks for any suggestions. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
Connecting to more than one oracle database
I am running Apache 2.0.55 with mod_perl 2.0.1 and Perl 5.8.1 on a Sun Solaris machine. I am using DBI/DBD to connect to an Oracle database. I am running DBI 1.39 and DBD-Oracle 1.16. In order to connect to an oracle database on a different machine I have a tnsnames.ora file with the appropriate definition. I also have a file startup.pl with the following information: $ENV{ORACLE_HOME} = '/usr/local/ora9i/9.2.0'; $ENV{ORACLE_SID} = 'asdb'; $ENV{TWO_TASK} = 'asdb'; $ENV{TNS_ADMIN} = '/usr/local/ora9i/9.2.0/network/admin/DEV_wiccdb'; In httpd.conf I have the line PerlRequire "/www/httpd/conf/startup.pl" I am currently connecting to an oracle database on a different machine and everything is working fine. I would now like to connect to another oracle database on another machine. My problem is how to define my environment variables. ORACLE_HOME and TNS_ADMIN do not seem to be a problem since I assume they can be the same. However, how do I define ORACLE_SID and TWO_TASK so that they allow connecting to 2 different databases on 2 different machines? Thanks for any help. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
Re: Connecting to more than one Oracle database
Hello to all of you, Last week I sent an email asking how to connect to more than one remote Oracle database. My problem was that in my startup.pl file, I am setting the following environment variables: ORACLE_HOME, ORACLE_SID, TWO_TASK and TNS_ADMIN. If I am trying to connect to 2 different databases, then ORACLE_SID and TWO_TASK are not the same and I did not know what to do. SEveral people answered me and said that I should not define ORACLE_SID and TWO_TASK in startup.pl but that I should define both databases in tnsnames.ora and simply connect giving the name of the database. So now, I am doing the following: My tnsnames.ora looks like: asdb = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = computer1.weizmann.ac.il)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = asdb.weizmann.ac.il) ) ) asdb2 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = computer2.weizmann.ac.il)(PORT = 1521)) ) (CONNECT_DATA = (SID = ORCL92) ) ) I connect in the following manner: DBI->connect("DBI:Oracle:asdb","user1","password1"); and DBI->connect("DBI:Oracle:asdb2","user2","password2"); I have a script that works from the command line but does not work when I run it from the web. When I run from the web it gives very inconsistent results. Sometimes it succeeds in connecting to the first database I specify and sometimes it can't connect to either. I tried specifying the environment variables ORACLE_SID and TWO_TASK from within the script but that didn't seem to help consistently. That is, sometimes it worked and sometimes it didn't and we couldn't figure out exactly when it would or would not work. Does anyone know how I can connect via the web to 2 different oracle databases sitting on 2 different machines from within the same script. Thanks for any help. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
Re: Connecting to more than one Oracle database
Thanks for all those who replied. I solved the problem - there was a problem with the syntax of the connect command. thanks again. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036 >>> On 12/11/2006 at 9:01 PM, in message <[EMAIL PROTECTED]>, Perrin Harkins <[EMAIL PROTECTED]> wrote:wrote on > > Malka Cymbalista wrote: >> I have a script that works from the command line but does not work when >> I run it from the web. > > Good, you've narrowed it down then. These are the most common sources > of problems that happen only when run from a web server: > > - Differences in %ENV > - Running as a different user, with different permissions > - Different current working directory > > Check those, and you'll find the problem. > > - Perrin
mod_auth_ldap
I am running Apache 2.0.55 with mod_perl 2.0.1 and Perl 5.8.1 on a Sun Solaris machine. We would like to do http authentication via our ldap server so we need to install mod_auth_ldap. The instrictions I found for installing mod_auth_ldap (http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap_apache2.html) say that before compiling and installing mod_auth_ldap, we need to complile and install LDAP libraries. The instructions for installing ldap libraries seem to force me to also install an ldap server. I do not want to install an ldap server since we already have a working ldap server. I want to use our existing ldap server to do httpd authentication on our web server. Is there a way to install only the ldap libraries? Thanks for any help. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
saving userid
I am running Apache 2.0.55 with mod_perl 2.0.1 and Perl 5.8.1 on a Sun Solaris machine. I am writing a perl script that requires the user to log in with a userid and password in order to access the pages the script creates. We plan on using standard http authentication. Once the user logs in, is there a way to save the userid and check it to make sure that the user who is now working is the same user who logged in? The problem is that users will be entering data and a user can only change the data he has entered. Thanks for any help. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
http authentication via a secure LDAP server
I am running Apache 2.0.55 with mod_perl 2.0.1 and Perl 5.8.1 on a Sun Solaris machine. We would like to do http authentication via our ldap server which is installed with SSL. Are there perl modules that have to be installed or must I recompile apache and mod_perl with specific options? Can anyone point me in the right direction. Thanks for any information. Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036
graphics in perl
We are running perl 5.8.5 on a Linux machine that is running apache 2.2.6 with mod_perl 2.0.3. Our data is in a MySQL database (MySQL 5.0.45) We have been asked to write a web application that requires plotting capabilities. We do most of our web programming in perl so I am looking for a perl module that has the following features: 1. ability to create histograms 2. ability to create x,y plots 3. ability to zoom in on a portion of the graph 4. ability to calculate the distance between 2 points on the graph 5. ability to hover on a point and bring up some text Does anyone have any suggestions for which perl modules we should look into? Thanks for any information. -- Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036