Page 1 of 1
Perl CGI problems on newssl.sonic.net
Posted: Sun Jan 08, 2012 9:03 pm
by meyerbo2
Hi,
I've been trying to test out my code on the newssl.sonic.net server before the migration happens and have run into a problem. Running a simple Perl CGI in my cgi directory results in a Internal Server Error. I think it might be because Perl is no longer located in /usr/local/bin/perl. Can you please add a symlink or let me know where it now resides?
My test script at:
https://ssl.sonic.net/cgi-bin/meyerbo2/test.cgi works fine
https://newssl.sonic.net/cgi-bin/meyerbo2/test.cgi has an error
Thanks,
Marcus
Re: Perl CGI problems on newssl.sonic.net
Posted: Mon Jan 09, 2012 10:13 am
by williamt
I have added them symlink: /usr/local/bin/perl -> /usr/bin/perl
If you want to update your code you can. It would probably be best going forwarded.
Thanks,
William
Re: Perl CGI problems on newssl.sonic.net
Posted: Mon Jan 09, 2012 10:43 pm
by meyerbo2
Thanks for the symlink. I have gotten farther in my testing, but have run into another problem. Making a Perl DBI call fails.
Code: Select all
use DBI;
$db="meyerbo2_cs5";
$host="meyerbo2-cs5.db.sonic.net";
$user="meyerbo2_cs5-rw";
$password="xxxxxxxxx";
#connect to MySQL database
my $dbh = DBI->connect ("DBI:mysql:database=$db:host=$host",
$user,
$password)
or print "Can't connect to database: $DBI::errstr\n";
I don't even get the errstr return. This works fine on ssl.sonic.net though. Any ideas?
Thanks,
Marcus
Re: Perl CGI problems on newssl.sonic.net
Posted: Mon Jan 09, 2012 11:39 pm
by williamt
Can you try again?
Re: Perl CGI problems on newssl.sonic.net
Posted: Wed Jan 11, 2012 10:56 pm
by meyerbo2
Thanks for the fix. Everything is working except for one more issue. In one of my Perl scripts, I am calling a precompiled C executable and that is no longer working. Is newssl.sonic.net no longer the same machine type and OS as the shell account that we are on?
Is there a way that I can get a program compiled to work on newssl.sonic.net?
Thanks,
Marcus
Re: Perl CGI problems on newssl.sonic.net
Posted: Thu Jan 12, 2012 11:30 am
by williamt
Whats the name of the file? It's possible that it's just missing a library.
Re: Perl CGI problems on newssl.sonic.net
Posted: Thu Jan 12, 2012 12:03 pm
by meyerbo2
The file is called processEO. It's in ~/www/lib/dbm on newssl.sonic.net. It uses the mcrypt library.
Thanks,
Marcus
Re: Perl CGI problems on newssl.sonic.net
Posted: Fri Jan 13, 2012 12:27 pm
by williamt
Looks like it was missing the libmcrypt i686 library. Try again now?
Re: Perl CGI problems on newssl.sonic.net
Posted: Fri Jan 13, 2012 1:25 pm
by kgc
For the record, the new environment is based on RHEL 6 x86_64 so should you need to compile a binary any RHEL 6 derived distribution ought to work fine. Compiling to a static binary is also a good idea since it will help ensure that changes in the environment do not affect your code. The jump from the current server is pretty big so I wouldn't be surprised if a recompile is needed (even if it was static.)
Re: Perl CGI problems on newssl.sonic.net
Posted: Fri Jan 13, 2012 1:59 pm
by meyerbo2
Thank you very much. Everything is working fine now.
-- Marcus