Store

Feed

Categories

Ads

Recent Posts

Ads

Security Advisories

RSS FreeBSD Advisories

RSS NetBSD Advisories

Q: I tried to compile pkgsrc’s PHP with fastcgi support but it didn’t work, why?

AddThis Social Bookmark Button


A: First, make sure you are passing the fastcgi option correctly, one way to do this is simply:

  $ sudo env PKG_OPTIONS.php=fastcgi make install

 
Once that completes, there are now two php binaries on your system.

The cli binary:

   $ /usr/pkg/bin/php -v
   PHP 4.4.4 (cli) (built: Dec  5 2006 07:12:02)
   Copyright (c) 1997-2006 The PHP Group
   Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

 
When most people see “cli” and no “fastcgi” they immediately think the process failed.

The second binary and the one you’re looking for is /usr/pkg/libexec/cgi-bin/php

   $ /usr/pkg/libexec/cgi-bin/php -v
   PHP 4.4.4 (cgi-fcgi) (built: Dec  5 2006 07:11:59)
   Copyright (c) 1997-2006 The PHP Group
   Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

 
Make sure this is the php binary you reference for all your fastcgi needs.

Write a comment