store isn't updating, error is "Can't locate template.pl in @INC at ./regen.cgi"
ShopSite: Store isn't updating, error is "Can't locate template.pl in
@INC at ./regen.cgi.."
When updating your store, you either get an error like this:
Can't locate template.pl in @INC at ./regen.cgi line 7. BEGIN
failed,compilation aborted at ./regen.cgi line 7.
Other symptoms may be that the publish process stops or you get an Internal Server Error
and the error in the web server error log is the one above.
NOTE: If the error message gives the perl module "Cwd.pm" or "Carp.pm" as the one that
cannot be located, this solution does not apply. Please see S02564.
Solution ID: S03712
This problem is due to the current directory "." not being included in @INC. @INC is an array of directories that perl looks in for include files. There are three ways to fix this problem:
1. Reinstall perl and make sure that the current directory is included in @INC.
2. Modify the require lines of all ShopSite perl scripts* to specify that the files reside in the
current directory. For example, in regen.cgi you would change these lines:
require "template.pl";
require "ssmparser.pl";
require "customparser.pl";
require "i18n.pl";
to say this:
require "./template.pl";
require "./ssmparser.pl";
require "./customparser.pl";
require "./i18n.pl";
3. Add the following line to the beginning of all ShopSite perl scripts*. This adds the current directory to @INC for that script:
push(@INC, ".");
This line must come before your "require" statements.
* "All ShopSite perl scripts" are:
regen.cgi
template.pl
ssmparser.pl
dbapi.pl
customparser.pl
i18n.pl
Related Articles
No related articles were found.
Attachments
No attachments were found.
Visitor Comments