Still not sure why my example is not failing, Maybe because the sub is in it's own pm file.
Perhaps my problem is not with variables getting mixed up between the pm file use()d by the parent file. But variables getting mixed up within the pm file, or within the parent program.
I think this...
Make sure you are not printing a single thing above this line in your code
print "Location: http://www.site.com/";
And change this line to
print "Location: http://www.site.com/\n\n";
Tony
Hey Fish,
I used to compile my perl because my boss was worried someone would break into our server and steal all our code. Long story but I wound up not using many modules because of the compiling problems.
Now that I'm a mod_perl guy, I'm more than happy to use CGI.pm, thanks for reminding...
Thanks Fish
I am getting randon results, lol. Can't wait to get strict employed on my scripts.
I'm really confused on the global variable issue. I thought I had to use vars to create a global variable.
So my %something will automatically make it null.
I had been using strict on this library...
Hi,
I saw this post and thought I'd post a bit from my parsing script which parses a site that requires ssl connections. It's get so you have to convert it to post.
use LWP::UserAgent;
require HTTP::Request;
$ua = new LWP::UserAgent;
$ua->protocols_allowed( [ 'http', 'https'] );
$request =...
Hey Jaa,
Thanks a lot for looking over my post. It's a lot of info to review and I greatly appreciate it.
I enjoy a good challenge but this one is quite difficult because I can't make it fail. I have to review the sections called into question and make my best guess or guesses.
I thought...
Hi All,
I was looking for a more appropriate place to post my questions since I am a mod_perl user. This is the closest thing.
Some people have replied to my posts so I know some mod_perl users are in here.
Will someone start a group for mod_perl? I would but I don't want to be the...
On second thought, the problem may be with another sub.
I also have another subroutine in standard.pm which actually builds the information in html. The file which calls first the cookie sub then this sub is called.
application.sd
.sd I made up, I'm using .pl & .cgi for other types of perl &...
I have mod_perl 2.1 installed with Apache 2.5.3.
In a library called, standard.pm, I have a sub routine
sub GetCookies{
undef(%Cookies);
undef(@ReturnCookies);
shift;
@ReturnCookies = @_;
$cookie_flag = 0;
if ($ENV{'HTTP_COOKIE'}) {
if ($ReturnCookies[0] ne '') {...
Have you tried a simple,
`/opt/Acrobat/bin/acroread`;
That's what I use for initiating programs in the system from the browser all the time.
But I'm not sure what your expecting acroread to do.
Tony
Hi Guys,
This is a very very strange occurance. I have a system in place so that when Apache2 has an error it pulls up a cgi which emails me the environment information and details of the error. I mostly focus on 500 errors.
Since I upgraded my site to run on mod_perl 2.0.0 I have been getting...
Does anyone know for sure if google is still factoring in data from Alexa to calculate a sites rank?
Everytime I get my Alexa rank to go up, my listing in google goes up as well. I used to be on the first page until a few years ago. Then It was rumored that Alexa was the reason. I had no rank...
Hey Kevin, Thanks.
If I use strict then I have to declare all variables with my, is there a reason I would want to have a variable not local to the block it was declared in?
And when you say local, I assume that if I declare a variable inside a sub routine or library it's not shared with the...
Looks like you need a space after Content-type:
You have 'Content-type:text/html\n\n', should be 'Content-type: text/html\n\n' as far as I can tell.
If that's not it, check the apache error log for more information.
Hey everyone.
I was chasing down a bug in my mod_perl site and thought initially a variable was being undesirably cached because of my use of the my $var style code with use strict;
Instead of saying
my %Cookies = $standardLibrary->&GetCookies('CookieName');
I used,
my %Cookies...
Well,
The solution was simple.
Just needed to add PerlModule Apache::DBI to the httpd.conf file.
Or add use Apache::DBI; to the startup.pl file.
Apache::DBI makes sure the connection is created if ever lost. The code I used instead of the above code is
$dbh = DBI->connect...
Hello mbaranski,
I made the change, and the phone isn't ringing anymore. It appears the errors have stopped. I have about 20-50 people on the system at any time and this morning some people would be using the system and receive can not prepare statement errors because the script had no...
Hi All,
I had to go live with a well tested mod_perl system this morning and after enough people got on it started to give internal server errors because a DBI connection couldn't be found anymore. Offline it never did that I guess because it was just me testing it.
I am reading through my...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.