jackjohnson44
asked on
perl script not working
I had a perl script that was working correctly, then my hosting provider "upgraded" the server to php5 and now nothing is working. They messed up everything even though it should have nothing to do with perl. I have no idea how to diagnose the issue and the tech guy is terrible. I just found a script on a site and tried running it and got the error:
lscgid: execve():/home/xxx/domains /xxx.com/p ublic_html /cgi-bin/e lapsednew. pl: Exec format error
The script uses an account number so it won't help to post it. The issue is defintely some sort of config issue. Does anyone know how I can diagnose this by using some script then show the details to the tech?
I believe that he said it was a lightspeed server.
lscgid: execve():/home/xxx/domains
The script uses an account number so it won't help to post it. The issue is defintely some sort of config issue. Does anyone know how I can diagnose this by using some script then show the details to the tech?
I believe that he said it was a lightspeed server.
Most likely they no longer recognize ".pl" as a CGI script. Either ask them to add in the following in their httpd.conf file:
AddHandler cgi-script .pl
Or perhaps try changing the names of your Perl scripts to ".cgi" instead of ".pl"
AddHandler cgi-script .pl
Or perhaps try changing the names of your Perl scripts to ".cgi" instead of ".pl"
ASKER
that isn't it, I was able to do a quick hello world with perl
Hmmm.. that might not be the problem (looks like it might have been in a 'cgi-bin' directory). So.... either your script is no longer executable (needs a 'chmod +x elapsednew.pl' on it)
How do you reference this script via the web?
http://blah.host.com/~username/cgi-bin/elapsednew.pl
Or is it something special like:
http://blah.host.com/username-cgi/elapsednew.pl
If it's the latter, then they need to add in:
ScriptAlias /username-cgi/ /home/xxx/domains/xxx.com/ public_htm l/cgi-bin/
Back into their httpd.conf file.
Basically, if you didn't change your file and its still executable, then they screwed up their httpd.conf file (or one of the newer style module config files).
How do you reference this script via the web?
http://blah.host.com/~username/cgi-bin/elapsednew.pl
Or is it something special like:
http://blah.host.com/username-cgi/elapsednew.pl
If it's the latter, then they need to add in:
ScriptAlias /username-cgi/ /home/xxx/domains/xxx.com/
Back into their httpd.conf file.
Basically, if you didn't change your file and its still executable, then they screwed up their httpd.conf file (or one of the newer style module config files).
Hmm.. your script is missing its "shabang". It should have as its first line something like:
#!/usr/bin/perl
Did you have that in your 'hello world' program?
#!/usr/bin/perl
Did you have that in your 'hello world' program?
ASKER
yes, I have that
Check the execution permissions on the file - you might have inadvertently removed executable permissions.
You get this same type of error if you try to access a file in a CGI area (or named as such) and the thing you're accessing is *not* a program (like a .doc file or an image).
How do you access your webshare? Can you log in via SSH (or Telnet) or you access it via FTP?
You get this same type of error if you try to access a file in a CGI area (or named as such) and the thing you're accessing is *not* a program (like a .doc file or an image).
How do you access your webshare? Can you log in via SSH (or Telnet) or you access it via FTP?
consider this discussion:
http://www.litespeedtech.com/support/forum/showthread.php?t=1365
It looks like either the shebang is crucial, or on the opposite .pl handling should be abandoned.
Obviously the hosting added fastcgi support that broke your script.
R.
http://www.litespeedtech.com/support/forum/showthread.php?t=1365
It looks like either the shebang is crucial, or on the opposite .pl handling should be abandoned.
Obviously the hosting added fastcgi support that broke your script.
R.
ASKER
I have execute permissions. I don't have ssh or telent access. My file was in the cgi-bin and I can get the same results calling it .pl or .cgi. It doesn't seem to matter.
The link mentions the httpd.conf file. I only have ftp access. I am not sure what to do with this info.
The link mentions the httpd.conf file. I only have ftp access. I am not sure what to do with this info.
Please try adding the shebang line to your script and ftp-upload it again.
ASKER
Thanks, but I already have that at the top.
#!/usr/bin/perl
#!/usr/bin/perl
Have you tried applying the discussion I pointed to?
ASKER
Thanks for checking back. No, I don't have access to the shell.
I was hoping that there was some sort of php_info type script that I could run that would tell me what the issue is. Or if there was a script I could run that would do a test which I could send to the admin. Any advice the mentions shell commands, or anything server related, I can't use. I can only upload files.
I was hoping that there was some sort of php_info type script that I could run that would tell me what the issue is. Or if there was a script I could run that would do a test which I could send to the admin. Any advice the mentions shell commands, or anything server related, I can't use. I can only upload files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window