I'm trying to get a web application working using Perl scripts but am getting various errors such as the inability to find the "Encode.pm" module and other internal server errors.
It seems that by default (using "/usr/bin/perl") the BT web hosting service is using a very old version of Perl (5.6.1 - nearly 10 years old, I think!) which does not support this module.
Is there anyway I can access a more recent version of Perl? BT seems to provide absolutely no documentation on which Perl versions and modules are installed on their web servers. Am I missing something?
Solved! Go to Solution.
Hi again,
I did a Perl refresher class today and thought of your forum question. You can actually run Perl modules from within your cgi-bin directory. You can upload the Perl module of your choice to the cgi-bin directory. You can then call it in your scripts with the "use" command.
If you have multiple modules you want to do this with, just place them in their own directory and use the "use lib" command:
use lib '/directory name/';
use perlmodule;
This works well, although I haven't had time to test it on BT yet. I'll give it a go over the weekend and see how it goes. It's defnitely worth trying though. Have a great weekend.
Peter
Hi there,
I found that the current Perl version is 5.2.9. To obtain detailed information about Perl on the server, creat a text document with the following:
<?
phpinfo()
?>
Save the file as phpinfo.php and upload it to your public directory. When you run the script in a browser it will return all of the Perl information from the server, including a list of all installed modules.
Peter
Thanks Peter, your suggestion is indeed useful, but it displays information about the PHP installation on the server, not the one for Perl, which is a different scripting environment.
-Mike.
I'm so sorry......that's the result of me trying to do too many things at once....a terrible multi-tasker. lol
If you download the latest PerlDiver, version 2.33 I think, you an unzip it and extract all files and directories into your "cgi-bin" directory. Then you can run the perldiver.cgi script to get Perl info.
I hope this helps more than the php info. lol
Peter
Thanks, Peter, the "PerlDiver" scripts tell me everything about the default Perl environment - much more than my formal support request to BT which was never answered 🙂
It does show that the Perl environment provided by BT is very out of date and I suspect it's not worth struggling to get my application to work properly. Time to find a new ISP...
-Mike.
Hi Mike,
Looking for a new ISP can be such a pain. Maybe there's a workaround for what you're trying to do? Just a thought...... lol
Peter
Hi again,
I did a Perl refresher class today and thought of your forum question. You can actually run Perl modules from within your cgi-bin directory. You can upload the Perl module of your choice to the cgi-bin directory. You can then call it in your scripts with the "use" command.
If you have multiple modules you want to do this with, just place them in their own directory and use the "use lib" command:
use lib '/directory name/';
use perlmodule;
This works well, although I haven't had time to test it on BT yet. I'll give it a go over the weekend and see how it goes. It's defnitely worth trying though. Have a great weekend.
Peter
Thanks, Peter.
Yes, I have experimented with running several Perl modules from within the CGI-BIN directory, with partial success. Unfortunately, some modules require a shared library to access native C code and I couldn't work out how to handle these (e.g. processor architecture, shared library compatibility, load search path). Other modules have explicit dependencies on the version of the Perl interpreter itself (due to bugs and features), and I'm afraid Perl 5.6.1 just doesn't cut it these days!
So the only real answer is for BT to provide a decent and up-to-date Perl environment. And I still haven't lost hope completely!
Obviously it is difficult to maintain version compatibility with thousands of third-party applications, which is why Web hosting companies tend to just offer a small number of rather old and "stable" versions of the common execution environments such as Perl, PHP and MySQL.
But there is a balance to be found here. If your environments are too old, you won't be able to support many popular applications and your Web hosting business will decline as a result. BT seems to have recognised this to some extent, given that they allow customers to choose between PHP 4 and PHP 5. But you are still stuck with a single version of Perl and MySQL (as well as the defined point releases of PHP 4 and PHP 5).
The application I am trying to run is the popular blogging package Movable Type Pro. I would have thought that this is exactly the kind of application that BT would want to support through their Web hosting offering, along with its competitors such as Wordpress for example. Unfortunately, it seems that this is not possible, unless I can persuade them to offer better support for such applications in the future [note, I know that Wordpress uses only PHP and not Perl, but my distinct preference at the moment is for Movable Type Pro].
Perhaps something neat could be done with protected environments, "chroot()" and so on to enable a similar customer configuration switch for Perl (and maybe MySQL) as for PHP. Even better would be to allow customers to select from several specific versions of each environment to suit their application needs, for example between a "almost the latest", "middling" and "old but stable" release. Even if there was a bit if inconvenience for customers (such as editing paths in source code, environment variables and so on), I'm sure most would find this preferable than being unable to run their applications at all!
-Mike.