Wrox Programmer Forums
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 15th, 2004, 06:51 PM
Authorized User
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP5 CGI or CLI?

I have installed PHP5 CGI but have since read that it leavers the server (Apache) open to attack.

Should I install PHP CLI instead?

What are the pros and cons of each? I've read the PHP Installation notes but and not clear on the differences.
Old August 15th, 2004, 07:06 PM
richard.york's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

Aside from the CGI being more vulnerable from a security standpoint, which I don't fully understand myself but have heard to be true. Installing PHP as an Apache module is also more efficient. For instance, as a CGI the php.ini configuration file has to be opened, parsed and whatnot every time a script is executed. That means that any extra extensions also have to be loaded every time a script executes. Whereas as an Apache module all of that is loaded when Apache starts, eliminating the extra overhead.


Have you some across this manual entry yet? It describes the CGI security vulnerabilities in detail and how to prevent exploits.


[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
Old August 15th, 2004, 07:20 PM
Authorized User
Join Date: Aug 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks Rich for your reply. Yes I used the first reference for installing PHP 5 on XP and looked at the second but with limited understanding of the issues.


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++/cli and c# elvisfeverr C++ Programming 2 December 19th, 2011 02:17 PM
Read an integer in C++/CLI meghaljani BOOK: Ivor Horton's Beginning Visual C++ 2005 1 June 16th, 2008 04:34 AM
C++/CLI to C# jsbsudha XML 1 November 19th, 2007 02:30 PM
c++/CLI dll for c# lavi C# 1 April 23rd, 2007 11:25 AM
PHP5 and php.exe php-cgi.exe php-win.exe freddo Beginning PHP 1 August 16th, 2004 09:28 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.