Symlinking does not look like a good idea to me. hawthorne wrote that his installation was moved to a different server, propably with a newer OS version, different library versions, different (g)cc version, and so on. Even perl itself may have been compiled differently. So, while the pure Perl part of the modules should survive that quite easily, the XS libraries may not be binary compatible and will probably cause segfaults and other unexpected behaviour.
The best bet here is to install all required modules from CPAN, using Perl's cpan utility.
With access to the old server, creating an autobundle on the old server and installing it on the new server should be the easiest way.
Without access to the old server, you need to find the required modules manually. I would start by grepping all existing code for lines containing "use" or "require", followed by extracting the loaded modules, and finally creating a distinct, ordered list of modules. find, grep, sort, and uniq could help, or a little Perl script with File::Find, grep, sort, and a hash of module names. With that list, I start the cpan utility and make it install each and every module on the list, either manually using the cpan utility or by using the CPAN API.
After that, every single application has to be tested, and watched for errors. (Hint: Read the web server's error log.) All modules that are still missing have to be installed, as above.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] [d/l] |
Hmmm. I tried each of these suggestions and none of them seem to be working.
First I downloaded the 5.8.4 directories in share/perl and in lib/perl, renamed them to 5.8.8, and re-uploaded them. For this approach I also changed the "use lib" lines of my script to 5.8.8. Should I have done that?
Next I tried creating the symbolic link (I do have shell access), but that didn't work either. I changed my "use lib" lines back to 5.8.4 for this.
Last I downloaded the File::Find (it was actually File::Random, and I'm guessing you meant to write that, too?) and uploaded it (as Random.pm) into the 5.8.8 dir I'd already created in my first approach, which overwrote the version of the file that was already there.
In all instances I continued to get the 500 Internal Server Error message. Have I misinterpreted any of your suggestions, or left out a required step due to ignorance? If not, any ideas why these solutions aren't working, and/or suggestions for other approaches to try?
(Also: thank you!)
| [reply] |
I had assumed File::Random was the only file needed. But you can check that, just search /home/jesskilb/perlmods/share/perl/5.8.4 for other files beside File/Random.pm. When I look at the source, the only missing module I can see is Want, everything else should probbly be included in 5.8.8. If there are a lot or more "complicated" ones (for example with *.so files), it is best to install them the normal way, like afoken said.
Since you have a shell you might try the following: Just execute your script on the command line and observe the error messages. First without any libraries, then successively add the ones the script complains about missing. This should give you lots of hints what libraries are missing or whether the problem is elsewhere
| [reply] |