Env: Perl5.8 Apache2.0 mod_perl2.0(1.99xx?) PS: I did try to find the solution through mod_perl and apache documents, but in vain. Please help me, thanks.
For example, I have a script file named "index.cgi" for my website entrance, and there are some template files in the same directory with it. index.cgi used to run correctly under "use warnings(FATAL => 'all'); use strict....." when I try using mod_perl, problems occur: 1. when access my site http://localhost, it shows error"cann't open http://localhost"; I can only use http://localhost/index.cgi, how to sovle this? 2. it shows many error"sub1 redefined.....sub2 redefined...."when the second time or more to access the index.cgi. 3. I use relative path in index.cgi, but it seems all goes mad when mod_perl::register reports" can't find file1.tmpl...cann't find file2.tmpl" I think when mod_perl::register works the current working directory is somewhere else than where index.cgi is. then i use chdir to change the working directory to where index.cgi is, I just want to know is there any better way to achieve this since we nearly always want the current path to be where your script is, rather than mod_perl::register . I also wonder if chdir will cause any problem with mod_perl::register . 4. Another error, mod_perl::register: Unrecognized character \x11 at mark.gif. Anything wrong with the gif? 5. all globle var in index.cgi used to be "my", but it says requires explicity package name? I change it to "local", same proble occurs. When it be"our", no such error any more? I know difference among them in Perl. But can anyone explain them to me for mod_perl? Also, why mod_perl2.0 documents has no info about this? At least, I didn't find. 6. use lib './' doesn't work when second(maybe third?) time invoke index.cgi. I don't want to put the lib file in perl/lib, nor put the line" use lib './' " in "start_up.pl". So is there any way to solve this? Thanks very much. -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html