Re: Help, .pl file no longer works after edit
by Corion (Patriarch) on Aug 24, 2012 at 11:42 UTC
|
Inform yourself about whether that web host does regular backups. Maybe you can simply restore from backup.
More information about this error may be available in the server error log.
Have you looked in the error log? Most likely there is information about what went wrong there.
If you have shell access to the machine, you can also try out your Perl script from the command line, and see some error messages directly:
> # Check for compilation
> perl -c that-script.pl
> # Check for running the script
> perl that-script.pl
> # Check for running the script with CGI parameter foo set to bar
> perl that-script.pl foo=bar
| [reply] [d/l] |
Re: Help, .pl file no longer works after edit
by moritz (Cardinal) on Aug 24, 2012 at 11:42 UTC
|
More information about this error may be available in the server error log.
That's the crucial part. You need to find the error log, because it contains the information you need to actually fix problem.
The location of the error log file is configured in the apache (and often in the virtual host) configuration file. On a Debian system it's typically /var/log/apache2/error.log or /var/log/apache2/yourdomain.tld/error.log
| [reply] |
Re: Help, .pl file no longer works after edit
by flexvault (Monsignor) on Aug 24, 2012 at 11:47 UTC
|
CosmoNo1,
This is probably not a Perl problem. Apache2 probably can't find the file because of a change in owner or group. Send an email to the admin and copy your message, it will give them a laugh and hopefully they will fix it for you. They have access to the Apache2 logs.
Good Luck!
"Well done is better than well said." - Benjamin Franklin
| [reply] |
|
|
| [reply] |
|
|
Welcome CosmoNo1,
Another way to look at this...
Everyone makes mistakes, but it's learning from those mistakes that matters!
I suspect that if you had used 'vi' or 'vim' to edit the file you would have been okay. I mentioned the 'laugh' to get it fixed quickly, not for you to stop learning.
Most system admins deal with angry users all day, so if you make them laugh and admit that you're learning, then they will probably help.
Maybe start a new thread and post the code that is a problem and what you changed. Since your not under pressure, make sure you post the code within <code> </code>
You may be pleased to find PM a resource for the future!
Good Luck and keep Learning about Perl!
"Well done is better than well said." - Benjamin Franklin
| [reply] |
|
|
Re: Help, .pl file no longer works after edit
by Anonymous Monk on Aug 24, 2012 at 12:03 UTC
|
| [reply] |
|
|
Thank you all, I have realised what I did wrong.
I did not set the file to be executable (I would be dangerous if I had a brain...)
I have now set it and it works fine...
The CGI Help Guide nailed it as I remember seeing 644 when I uploaded the file...
Thank you Anonymous Monk and everyone else for your suggestions
Dave
| [reply] |
Re: Help, .pl file no longer works after edit
by aitap (Curate) on Aug 24, 2012 at 12:28 UTC
|
| [reply] |
Re: Help, .pl file no longer works after edit
by linuxkid (Sexton) on Aug 24, 2012 at 15:25 UTC
|
Check permissions, and then make sure that the server allows cgi scripts anywhere, some only allow them in the cgi-bin directory.
--linuxkid
imrunningoutofideas.co.cc
| [reply] |