LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-07-2005, 12:44 AM   #1
computerdaves
LQ Newbie
 
Registered: Jan 2005
Location: canada
Posts: 23

Rep: Reputation: 15
.CGI scripts enabled with #!/usr/bin/perl -i??


Is there a reason why I have to use -i in all my cgi scripts to get them to work under fedora core 2 / 3 and apache2??

#!/usr/bin/perl -i
 
Old 02-07-2005, 05:03 PM   #2
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
FWIW, doesn't make sense to me.
 
Old 02-08-2005, 01:51 PM   #3
computerdaves
LQ Newbie
 
Registered: Jan 2005
Location: canada
Posts: 23

Original Poster
Rep: Reputation: 15
Well if I try to run a cgi script domain.com/cgi-bin/myscript.cgi

The only way to do so is have a "-i" after #!/usr/bin/perl on the first line of the script..

anyone know why this is? I don't even know where I found that answer and the problem went away. Now I would like to know why it fixed it, cause it's not a usuall thing to have to do, and how I can set up perl to run without having to do the fix mentioned above.
 
Old 02-08-2005, 01:59 PM   #4
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
What do you get without the -i?
 
Old 02-09-2005, 12:44 AM   #5
computerdaves
LQ Newbie
 
Registered: Jan 2005
Location: canada
Posts: 23

Original Poster
Rep: Reputation: 15
a display of the files code on screen.
 
Old 02-09-2005, 07:53 AM   #6
gcobb
LQ Newbie
 
Registered: Oct 2004
Location: Southaven, MS
Distribution: Fedora Core 2
Posts: 24

Rep: Reputation: 15
I just noticed the same thing last night. When I run a /pl script it just shows the code. Maybe someone will give us an answer!
 
Old 02-09-2005, 08:03 AM   #7
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Unable to reproduce that. This simple test CGI script works as expected on FC3.

#!/usr/bin/perl
print<<EOF;
Content-type: text/html

EOF
print "<b>Hello, World!</b>\n"
 
Old 02-17-2005, 11:49 PM   #8
computerdaves
LQ Newbie
 
Registered: Jan 2005
Location: canada
Posts: 23

Original Poster
Rep: Reputation: 15
I am not using susex or whatever it's called.
 
Old 02-18-2005, 05:03 PM   #9
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
suexec related mistakes would result in a different error.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where do I put my cgi-bin scripts? BrianK Linux - Software 2 10-12-2005 11:59 PM
Running perl scripts outside of cgi-bin ylikone Programming 1 09-08-2005 05:34 AM
Disabling Perl/CGI Scripts totally renegadeavenger Linux - General 1 08-14-2005 08:28 PM
Of Perl CGI scripts and Sendmail Chrax Programming 2 06-06-2005 05:21 PM
Running Perl/CGI scripts hso_sof Linux - Newbie 3 08-22-2003 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration