LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2008, 05:25 AM   #1
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
Setting up PHP in CGI in RHEL4


hi, guys

How can I setup in cgi not in module my php using apache?
which is the most safe cgi or module.

Thank you.
 
Old 09-11-2008, 09:59 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You're question isn't very clear. You want to use PHP and CGI or one or the other? Exactly what is it that you want to do?
 
Old 09-11-2008, 09:29 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
I think I understand the question ...

Most CGI-support languages (Perl, Python, Ruby and so-on) offer two ways to integrate themselves with Apache.
  1. One way is that "they don't." Apache simply starts an instance of the language to handle the request, each time a request comes in.
  2. The other way is with an Apache "module," which in-effect incorporates the interpreter into the Apache environment. (In effect, Apache invokes the language-interpreter as a subroutine...)
Which is "safer?" "Better?" There is no blanket answer. But I will say that most of the sites I've worked on lately actually use the first scenario. Either Apache invokes a separate process to handle the request, or it passes the request to a separate external program. Kinda surprising but it actually works quite well.

You see, in actual practice the interpreter's memory-segments (and those of the many related-files) are probably going to be paged-in with the very first request and ... in any reasonably memory-equipped computer ... they're just going to stay there, just because they can. Creating and destroying process-table entries is fairly cheap to do when "what you want to execute" is already in-memory.
 
  


Reply



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
Need to re-compile php on RHEL4 buckeyesi Linux - Newbie 1 12-14-2006 12:49 PM
Need to re-compile php on RHEL4 buckeyesi Linux - Enterprise 1 12-14-2006 01:55 AM
Setting up ant in RHEL4 s0n|k Linux - Software 0 11-21-2006 06:47 AM
Setting environment variables in RHEL4 s0n|k Linux - Newbie 12 09-26-2006 10:49 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 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