We help IT Professionals succeed at work.
Get Started

First PERL script - GetLive

phper asked
Last Modified: 2013-12-18
I'm a PHP person trying to use the following PERL script, I have never used a PERL script:

I've installed the PHP Perl mod and can run a simple 'hello world' Perl script as:
print "Hello from PHP!<br />";
$perl = new Perl();
$perl->require("test1.pl"); ////print "Hello from perl! "
print "Bye";

I've uploaded the GetLive.pl into "/usr/local/bin/GetLive.pl" and my config file to "home/myuser/.getliveconfig"

My config file is the following:
UserName = myemail
Password = pswd
Domain  = hotmail.com
FetchOnlyUnread = Yes
Folder  = Inbox
Folder  = Junk
MarkRead = Yes
Downloaded = /mail/mydomain.com/hotmail/downloaded
Processor = /usr/sbin/sendmail -i hotmail

However, when I run the following page:
$perl = new Perl();
$perl->require("/usr/local/bin/GetLive.pl --config-file /home/myuser/.getliveconfig");

I get:
Fatal error: Uncaught exception 'PerlException' with message '[perl] require error: Can't locate /usr/local/bin/GetLive.pl --config-file /home/myuser/.getliveconfig in @INC (@INC contains: /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl .) at (eval 3) line 1 during global destruction. ' in /home/myuser/public_html/GetLive/index.php:12 Stack trace: #0 /home/myuser/public_html/GetLive/index.php(12): Perl->require('/usr/local/bin/...') #1 {main} thrown in /home/myuser/public_html/GetLive/index.php on line 12

I've never done anything like this before and am trying to get my hotmail mail either forwared to my gmail or at least processed by my mail server. I have root access and cPanel/WHM and have not installed the GetLive RPM, I've just uploaded the files GetLive.pl, SmtpAuthForward.pl, SmtpForward.pl, my config file and the php page that calls the .pl. Once I have this working I was going to build a cron for the php page, unless I can just cron GetLive.pl --config-file /home/myuser/.getliveconfig.

Again, I'm very new to this and have tried many things to get it to work so step by step instructions would be very helpful.
Watch Question
Top Expert 2009
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE