Perl CGI problems on newssl.sonic.net

Web hosting discussion, programming, and shared and dedicated servers.
10 posts Page 1 of 1
by meyerbo2 » Sun Jan 08, 2012 9:03 pm
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
by williamt » Mon Jan 09, 2012 10:13 am
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
Sr. Systems Administrator @ sonic.net
by meyerbo2 » Mon Jan 09, 2012 10:43 pm
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
by williamt » Mon Jan 09, 2012 11:39 pm
Can you try again?
Sr. Systems Administrator @ sonic.net
by meyerbo2 » Wed Jan 11, 2012 10:56 pm
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
by williamt » Thu Jan 12, 2012 11:30 am
Whats the name of the file? It's possible that it's just missing a library.
Sr. Systems Administrator @ sonic.net
by meyerbo2 » Thu Jan 12, 2012 12:03 pm
The file is called processEO. It's in ~/www/lib/dbm on newssl.sonic.net. It uses the mcrypt library.

Thanks,
Marcus
by williamt » Fri Jan 13, 2012 12:27 pm
Looks like it was missing the libmcrypt i686 library. Try again now?
Sr. Systems Administrator @ sonic.net
by kgc » Fri Jan 13, 2012 1:25 pm
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.)
Kelsey Cummings
System Architect, Sonic.net, Inc.
by meyerbo2 » Fri Jan 13, 2012 1:59 pm
Thank you very much. Everything is working fine now.

-- Marcus
10 posts Page 1 of 1

Who is online

In total there are 86 users online :: 0 registered, 0 hidden and 86 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 86 guests