Instead of executing perl script,Mozilla Firefox opens it,why?
Hello Friends,
The following perl script successfully runs in the terminal: Quote:
|
you didn't install php correctly!
remove it, find good tutorial at www.howtoforge.com and you will be fine. |
But I am running the php script files successfully. Only the perl script encounters this problem...
|
mq15 you do know that fedora 9 is UNSUPPORTED and has not has a security update in 5 months
|
How are you expecting the Perl script to be executed? Is it supposed to be used through CGI or through mod_perl? Do you have the Perl script in a directory configured to use CGI or mod_perl? Do you have these set up correctly in your server config? It sounds like Apache is just displaying it as a normal file, rather than running it as a script.
Also, see John VV's comment about Fedora 9 being out of support. |
OK guys. Immediately after my exam(Oct 10), I will thrust myself to upgrading my fedora9. But at the time please make me do it with whatever I have by telling me how I have to configure the Perl script in a directory to use CGI or mod_perl?
:newbie: Thanks in advance.. |
have you searched the Apache docs for perl ?
http://www.google.com/search?as_q=pe...e.org&safe=off from above http://httpd.apache.org/docs/2.2/howto/cgi.html |
install mod_perl and restart apache.
|
Thanks a lot John VV. From http://httpd.apache.org/docs/2.2/howto/cgi.html I found what was the problem.
1. I was not using: Quote:
2. I was saving the .pl files in directory /var/www/myowndirectory/ instead of saving it in /var/www/cgi-bin What now I get is Quote:
|
Friends, please tell the solution or tell me how to read the error log to identify the problem..
|
there is a saying about a fish....
...give a fish.... teach to fish..... |
I 100% agree with you John VV and deeply thank you for that. But please give only the HINT at least.
Believe me, if I were not to appear in exam on coming 10th, I would happily hangout with it as long as it would take. But now the problem is of my exam.. |
at the moment i am not running an apache server so this is from memory ...
first can you post the part of the apache log when you try to run the script and the part of your httpd.conf for the folder that the perl script is in ( cgi-bin AND /var/www both folders) AND the file permissions of both folders you can get them this way Code:
cd /var ( mod perl might be built in so it might not be there) and this ( default ) LoadModule cgi_module modules/mod_cgi.so this tells me that perl IS working "The following perl script successfully runs in the terminal:" so it is apache OR there is one other "SELinux" is there an error in SELinux TroubleShooter ??? it is in the menu under Applacations/systemtools and i take it that this is at the top of the perl script? " #!/usr/bin/perl " |
I have already shown the apache logs when I try to run the script [in 9th post, 500 Internal Server Error]
Part of httpd.conf for cgi-bin: Quote:
Quote:
LoadModule: Quote:
Permissions for /var: Quote:
Quote:
Quote:
|
I also have the same problem. But I am not running the perl file on my localhost. I run it on a different server and when I try to run it on the browser it opens a download window instead. This is what I have written on my shebang line #!/usr/bin/env perl . I have checked the usr/bin/env of the server and it exists. perl.exe is also there. the server follows linux environment.
|
All times are GMT -5. The time now is 03:34 PM. |