SID-02129: Failed to load the perl module CGI qw(:any).
| Status: |
Answered |
TWiki version: |
5.1.0 |
Perl version: |
v5.10.1 |
| Category: |
CategoryError |
Server OS: |
CENTOS 6.4 x86_64 standard |
Last update: |
5 years ago |
I have just migrated servers and after adding twiki I am receiving the following error on /bin/configure page.
Failed to load the perl module CGI qw(:any). The module could not be found.
Please ensure that:
- CGI qw(:any) is installed,
- that the module is available on the @INC path,
- that the webserver user (prcessmodel) has permission to read the CGI qw(:any).pm file.
The detailed error seen was:
CGI -any pragma has been REMOVED. You should audit your code for any use of none supported / incorrectly spelled tags and remove them at /usr/share/perl5/CGI.pm line 925.
BEGIN failed--compilation aborted at (eval 6) line 2.
I did search the forums and found that I needed to install this package:
https://twiki.org/cgi-bin/view/Plugins/CgiContrib
That did not work for me and the same message appears. This is what I did; I extracted the files from
CgiContrib folder and copied the files to their relevant directories in /bin and /lib/. Was there anything else I needed to do to install this package?
What could be wrong?
--
Waqas Tariq - 2015-12-01
Discussion and Answer
The CGI module is unfortunately a moving target. That's why we created the
CgiContrib - for background see
AddCGIpmToTWikiCore.
You are on the right track to install the CgiContrib extension, and it is correct to copy the files below
lib and
data to the corresponding place in your TWiki installation. Make sure the file ownership and permissions are OK so that your webserveruser can read these files and directories.
Also make sure to specify an absolute lib path in
twiki/bin/LocalLib.cfg
So, did you migrate to a new server using the same TWiki-5.1.0? That version is relatively old. The latest TWiki-6.0.2 has the
CgiContrib pre-installed.
--
Peter Thoeny - 2015-12-02
Peter,
Thank you for getting back to me.
I never did redo the ownership permissions on the folders/files again. I think that might have been the reason for the error. Also the article
CgiContrib never mentioned that we need to do that and it skipped my mind.
What I ended up doing was that I installed the latest version TWiki-6.0.2 and copied my web over to it. Seems to have worked well.
There are two things that I am struggling with now
- Changing the background color of all the webs (the edges - left right and bottom) which I did in my old twiki and now could not seem to figure out how I did that. This:
- If I should copy the following directories from my old twiki to the new one, to get all the settings back (the install url is the same)?
- /data/_default
- /data/Main
- /data/Sandbox
- /data/Trash
- /data/TWiki
- /lib/
- /templates/
- /pub/_default
- /pub/Main
- /pub/Sandbox
- /pub/Trash
- /pub/TWiki
--
Waqas Tariq - 2015-12-02
When you restore TWiki from the backup, make sure not to mix old and new TWiki code and configuration! Only restore
twiki/data and
twiki/pub, but omit
twiki/data/TWiki,
twiki/data/_default,
twiki=pub/TWiki and
twiki/pub/_default. Make sure the file ownership and permissions are correct. Do not restore other dirs, such as
twiki/lib,
twiki/bin,
twiki/templates.
To get the blue window borders, create a user template. See docs
TWikiTemplates and
PatternSkinCustomization.
--
Peter Thoeny - 2015-12-02
Thank you for all your help
@PeterThoeny
. Please consider this ticket closed.
Thank you for all your hard work on the Twiki.
--
Waqas Tariq - 2015-12-02
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.