Re: [PHP] php .vs cgi app..
As I know, if you run PHP as a module for Apache is faster than running as CGI. Also Python scripts can be run as a module(faster) or as CGI. The main disadvantage for Python as a module is that you don't get all the facilities of CGI. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php .vs cgi app..
This is one of those questions that will get lot's of different answers depending on your responders perspective. This is my view; PHP can be executed as a CGI or as a MOD by Apache (or most web servers). This means that Apache can load a fresh copy of PHP with each browser request to the server (CGI), or it can load PHP on startup, or first request (MOD) and can continue to use that version for each subsequent browser request to the server (on .php files only, of course). Interestingly enough, I believe Perl can be executed by Apache in either fashion as well. Apache gets config parameters, when PHP is available, that tells it where to find the PHP modules, and will load them from there in either case. The server also has a "Base Directory" where it expects to find it's html/php/perl/etc documents and will make sure the appropriate interpreter is used based on the document file type. There was a time when the first line of the script (beginning with a splash/bang; i.e. #!/usr/local/bin/perl ) determined the interpreter, and this may still be available in Apache. It should still be possible to even write "C" programs and execute the compiled binary as a "CGI", which means in this case no interpreter is required and form input is read from stdin and html is sent to the browser via stdout (if you are familiar with C). While C may produce the fastest code, you should find PHP is much more suited for developing web applications than almost any other option. Just to add to the confusion, PHP can be executed from the command line of a telnet session, or more commonly by a "cron" timer program, which I have also heard referred to as running PHP as a "cgi". The syntax for that is; /path/to/php /path/to/php/script.php Hope this helps a bit, Warren Vail -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: [PHP] php .vs cgi app.. hi.. a really general/basic question... what is the difference between a "cgi" app and a php app.. does it really come down to where the app is being run from.. i mean within apache, if i specify that php/perl/etc... app resides at a given location, and that files with a certain extension are to be handled by the perl/php/etc app, then i can handle the processing of the file by the interpreter anywhere within my site that i grant access to. is there anything/any reason to have a "cgi-bin" portion of my app, other than good design practice... clarification would be useful!!! thanks.. -bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php .vs cgi app..
hi.. a really general/basic question... what is the difference between a "cgi" app and a php app.. does it really come down to where the app is being run from.. i mean within apache, if i specify that php/perl/etc... app resides at a given location, and that files with a certain extension are to be handled by the perl/php/etc app, then i can handle the processing of the file by the interpreter anywhere within my site that i grant access to. is there anything/any reason to have a "cgi-bin" portion of my app, other than good design practice... clarification would be useful!!! thanks.. -bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs CGI ???
PHP comes in three major compilations: module, CGI, and CLI. The module only works for web server (that I know of) and is the fastest way to serve PHP based content from a web server. CGI can be run for either the shell, or from the web server. There is a performance hit when run from the web server since the binary must be loaded on every request; however, many hosting companies offer the CGI solution because it gives the developer complete control over PHP version, extensions, and anything else related to the binary itself. CGI as I said can also be used for shell scripts. It was originally the only way to use PHP for shell scripting until the recent addition of the CLI compilation which provides features and enhancements specifically targeted at shell scripting in PHP. HTH, Rob. On Fri, 2003-09-19 at 10:16, Scott Fletcher wrote: > Looked through all of those 11 README files and they don't say much about > it. > -- .. | InterJinn Application Framework -- http://www.interjin.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs CGI ???
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): > Looked through all of those 11 README files and they don't say much about > it. Traditionally php had two modes: 1. module 2. cgi/commandline the cgi/commandline could be used interchangably. Now there are three modes: 1. module 2. cgi 3. commandline (CLI) some references: http://php.net/manual/en/features.commandline.php http://php.net/manual/en/install.commandline.php > Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs CGI ???
Looked through all of those 11 README files and they don't say much about it. "Donald Tyler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > PHP can be installed as either a CGI or an Apache module. There is > documentation on this in the PHP readme files. > > Pretty much everything I read said that its always better to use the > Apache Module version. (apparently its much more stable and secure) > > -Original Message- > From: Scott Fletcher [mailto:[EMAIL PROTECTED] > Sent: Friday, September 19, 2003 8:38 AM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP vs CGI ??? > > Hi! > > I have a question. Someone said that PHP is CGI, that kind of > turned my > head because PHP is not like that. But I can see one thing, PHP can be > compiled as either a 'Shell-Scripting-Language', 'Webserver Component' > or > 'Both'... PHP would be a form of CGI if it is used as Shell Scripting > Language but if I compile Apache and have it create a PHP module then it > is > not a form of CGI. > > Can anyone point this out or clarify this? It would be very much be > appreciated. > > Thanks, > Scott F. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs CGI ???
PHP can be installed as either a CGI or an Apache module. There is documentation on this in the PHP readme files. Pretty much everything I read said that its always better to use the Apache Module version. (apparently its much more stable and secure) -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 8:38 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP vs CGI ??? Hi! I have a question. Someone said that PHP is CGI, that kind of turned my head because PHP is not like that. But I can see one thing, PHP can be compiled as either a 'Shell-Scripting-Language', 'Webserver Component' or 'Both'... PHP would be a form of CGI if it is used as Shell Scripting Language but if I compile Apache and have it create a PHP module then it is not a form of CGI. Can anyone point this out or clarify this? It would be very much be appreciated. Thanks, Scott F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs CGI ???
Hi! I have a question. Someone said that PHP is CGI, that kind of turned my head because PHP is not like that. But I can see one thing, PHP can be compiled as either a 'Shell-Scripting-Language', 'Webserver Component' or 'Both'... PHP would be a form of CGI if it is used as Shell Scripting Language but if I compile Apache and have it create a PHP module then it is not a form of CGI. Can anyone point this out or clarify this? It would be very much be appreciated. Thanks, Scott F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs. CGI
John Taylor-Johnston wrote: Three advantages I like: 1- no more cgiwrap. 2- thus I can work in any directory and am not bound to cgi-bin 'being bound to cgi-bin' is a function of how the server is set up, not 'cgi' itself. I've worked on systems where anything ending in .cgi was treated as a cgi script, regardless of directory location. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs. CGI
Three advantages I like: 1- no more cgiwrap. 2- thus I can work in any directory and am not bound to cgi-bin 3- Sheer ease of coding. A lot easier to learn, it's open-source and newsgroups are more helpful. Perl groups are less helpful, programmer centred and not newbie-friendly. Just my 2ยข -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs. CGI
Mike -- ...and then SpyProductions Support Team said... % % Does PHP use less system resources than CGI on a server? Now that we know that by 'CGI' you mean 'perl' we're at least getting *somewhere*. We don't really know what you mean, though, so I''ll see if I can fill out the truth table for you. In general, a mod_* version will be faster and lighter than a CGI version (yes, you can have PHP as a CGI as well). In general, php and perl are about on the same footing; both can be heavyweights but certainly don't have to be. perlphp +--+--+ |approx|approx| | some amount | some amount | mod | of resources | of resources | | X | Y | +--+--+ | something | something | |more |more | CGI |than |than | | X | Y | +--+--+ You'll probably find that X and Y are about the same. Your choice of column doesn't matter one way or another. Which row you use is the kicker. % % I have a bulletin board which is incredibly active, but there is a PHP % sister to it. The real question becomes "how are you running the perl version and, figuring that's as a CGI, would you rather switch languages or just modules?". % % Thanks, % % -Mike HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
RE: [PHP] PHP vs. CGI
Sorry, yes. :) -Mike > -Original Message- > From: Leif K-Brooks [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 4:45 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] PHP vs. CGI > > > CGI meaning perl? > > SpyProductions Support Team wrote: > > >Does PHP use less system resources than CGI on a server? > > > >I have a bulletin board which is incredibly active, but there is a PHP > >sister to it. > > > >Thanks, > > > >-Mike > > > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any > unauthorized attempt to decrypt it will be prosecuted to the full > extent of the law. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs. CGI
CGI meaning perl? SpyProductions Support Team wrote: Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP vs. CGI
Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP vs CGI Search ?
On 8/24/2001 10:54 AM this was written: > I know this question has been asked many times before so I am not asking > again :-) What I am asking is how I can search the forum, is there a web > based system that I can use to search??? Well, there's a Newgroup: news.php.net There is an archive on this list but I forget where it is. Perhaps the support page on www.php.net will give it. -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP vs CGI Search ?
Hi, I know this question has been asked many times before so I am not asking again :-) What I am asking is how I can search the forum, is there a web based system that I can use to search??? TIA Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]