PHP flavors

Need help with C, C++, perl, python, etc?

PHP flavors

Postby y2kdis » 2006-02-28 01:49

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?
Posts: 32
Joined: 2005-12-08 10:26

Postby lacek » 2006-02-28 08:40

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.
Moderator Team Member
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby y2kdis » 2006-02-28 09:38

thanks for the invaluable input sir lacek!
Posts: 32
Joined: 2005-12-08 10:26

Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests