Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

PHP flavors

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
y2kdis
Posts: 32
Joined: 2005-12-08 10:26

PHP flavors

#1 Post by y2kdis »

i have some newbie questions regarding PHP.

can both the php (apache) module and the php cgi binary exist in the same system? which one takes precedence in case both of them can be present?

how will i know which one is installed/working on my debian system? i checked aptitude and found out i have libapache2-mod-php4, php4, and php4-cli on my system.

which is better to have, the module or the cgi binary?

lacek
Posts: 764
Joined: 2004-03-11 18:49
Location: Budapest, Hungary
Contact:

#2 Post by lacek »

You can have both PHPs on your system of course. The packages are:
libapache*-mod-php4: This is the PHP module for Apache (2).
php4: This is a dummy package which depends on the apache PHP module(s)
php4-cli: This is the command-line version of PHP
php4-cgi: This is the CGI version of PHP

I'm not sure about the difference between the CGI and the CLI versions, but if both CGI and the PHP module installed, I think the php module will be invoked for .php files, and any other executable scripts, which are registered as CGI scripts can call the CGI version pf PHP.

I'd say, the module is a much better choice than the CGI, Since CGI scripts require a separate process to spawn upon executing, while the module doesn't.

y2kdis
Posts: 32
Joined: 2005-12-08 10:26

#3 Post by y2kdis »

thanks for the invaluable input sir lacek!
:D

Post Reply