Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.
I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning.
The script is called cwrmail.pl and is located in my cgi-bin.
When I run the script I get a 500 error. The script is called from a CGI Post form on another page. I have narrowed it down to the "read" statement...as follows:
If I comment out this section and add a "print" function, it works and prints to the screen so I am positive this section is the problem. The "read" statement is correct. The chmod is 755 for both the script and the cgi-bin.I have tried uploading via FTP in both ASCII and binary to no avail. I have edited in both NotePad ++ and WordPad.
The support at justhost is pretty good except they seem to be lacking Perl techs. I don't think this is a Perl issue but really not sure!
Anyone have any other ideas??
Thanks,
Bob
Moderator's Comments:
Code tags for code, please.
Last edited by Corona688; 04-18-2012 at 04:22 PM..
Hello Moto
I hope someone can help
We's here at work, have a unix box with sco openserver 5 on it, so it has a nice gui interface.. and also a fair few windows computers..
a system admin guy b4 me, has set up a user called neil, which can, when u try to access the unix box using windows... (2 Replies)
i need to move apache 2.2 from one server over to another server..... my servers are in atlanta and i'm logged in here in florida... what commands do i use ???? somebody mentioned the fetch command... please help.... i'm an idiot when it comes to unix (2 Replies)
I have a .sh script which was running fine on all the UNIX Servers (AIX, SunSolaris). The script requires two mandatory parameters and many optional parameters. Now at a different client place who are on a Windows Server, when I try to execute the script through MKS Toolkit, there are couple of... (5 Replies)
We are using subversion as a version control system in our project. We are connecting to client`s sun Solaris box through check point VPN. Client has installed subversion .
We have created repository and add files to it. Now we want to access the same from our windows machine (through... (0 Replies)
I'm trying to write a Perl script where a file from a UNIX server box connects to a Windows server box and copies that file into the Window box.
The main problem I have right now is that whenever I try to connect to the Windows box, the connection is refused.
The error message that always pops... (2 Replies)
Can anybody please help me on how to code for the below requirement:
I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
hi guys,
i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not
and again i have to reverse sftp the files from unix to windows server.....
regards,
Vasa Saikumar. (13 Replies)
I need to transfer files from a Windows server to the Unix server and have to run some shell script on it to get the required output.
Is it possible to transfer files from Windows server to unix server through any shell script?
If so can you please help me with the details.
Thanks in... (8 Replies)
I have two servers linux and windows and i want to compare files which are in unix server that to windows server and find out which are missing
that means i have 50 files with 6000 records in each file on linux server and i want to verify weather these 50 files are present in windows server... (5 Replies)
Hi All
I need to transfer a file from a UNIX server to a windows server.
I saw that it is possible to do this using scp command by looking at the forum listed below:
... (2 Replies)
Discussion started by: vx04
2 Replies
LEARN ABOUT DEBIAN
web::simple::deployment
Web::Simple::Deployment(3pm) User Contributed Perl Documentation Web::Simple::Deployment(3pm)NAME
Web::Simple::Deployment - various deployment options
DESCRIPTION
This file documents common deployment methods for Web::Simple. If you feel one is missing, please ask in the IRC channel and we'll work
with you to add it.
CGI
The most basic deployment option is as a CGI script loading and running your Web::Simple-module:
#!/usr/bin/env perl
use Your::Web::Simple::App;
Your::Web::Simple::App->run_if_script;
Save that as script.cgi and your web server will handle it correctly.
Plack-Server
This works in with exactly the same code as CGI deployment. However instead of letting your web server load script.cgi, you run this on the
command line:
plackup script.cgi
Self-contained CGI
Sometimes your app is so small that you have only one or two tiny classes that you want to run as a CGI script. Web::Simple offers a
helpful mechanism to achieve that.
#!/usr/bin/env perl
use Web::Simple 'HelloWorld'; # enables strictures and warnings for the file
# additionally, HelloWorld is upgraded to a
# Web::Simple application
{
package HelloWorld;
sub dispatch_request {
sub (GET) {
[
200,
[ 'Content-type', 'text/plain' ],
[ 'Hello world! It is a fine ' . HelloWorld::Helper->day ]
]
},
sub () {
[ 405, [ 'Content-type', 'text/plain' ], [ 'Method not allowed' ] ]
}
}
}
{
package HelloWorld::Helper;
use DateTime;
sub day {
return DateTime->now->day_name;
}
}
HelloWorld->run_if_script;
AUTHORS
See Web::Simple for authors.
COPYRIGHT AND LICENSE
See Web::Simple for the copyright and license.
perl v5.14.2 2012-05-07 Web::Simple::Deployment(3pm)