Tags:
create new tag
view all tags

SID-02129: Failed to load the perl module CGI qw(:any).

Status: Answered 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:

  1. CGI qw(:any) is installed,
  2. that the module is available on the @INC path,
  3. 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

  1. 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: Nyl4rVA.png
  2. 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)?
    1. /data/_default
    2. /data/Main
    3. /data/Sandbox
    4. /data/Trash
    5. /data/TWiki
    6. /lib/
    7. /templates/
    8. /pub/_default
    9. /pub/Main
    10. /pub/Sandbox
    11. /pub/Trash
    12. /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

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Failed to load the perl module CGI qw(:any).
SupportCategory CategoryError
TWiki version 5.1.0
Server OS CENTOS 6.4 x86_64 standard
Web server Apache/2.2.29
Perl version v5.10.1
Browser & version Chrome 46.0.2490.86
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2020-04-26 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.