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

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.

Posted in Answers, NetBSD, pkgsrc | Leave a comment

Q: Why do I get ‘Undefined symbol “_openpam_debug” referenced from COPY relocation in su’ in NetBSD?

A: This appears most commonly seen after an upgrade from NetBSD 2.2 to 3.0.
This is caused by additional copies of libpam being installed, most likely in /usr/pkg/lib via pkgsrc.

You can first check this by simply

  $ ls /usr/pkg/lib/libpam*

 
If you find these libraries exist, then you should check the following:

/etc/ld.so.conf

  libm.so.0       machdep.fpu_present     1:libm387.so.0,libm.so.0
  /custom/lib/path

 
If you have /usr/pkg/lib defined, a possible option is to remove it or to override it by placing /usr/lib (i.e. the location of the base libpam) before it in the config file. Since ld.so.conf is parsed prior to running the binary, this should be all that is necessary.

A second possibility is you have the LD_LIBRARY_PATH or LD_PRELOAD environment variables defined. Again, you can unset these variables, or modify the variables to include /usr/lib prior to /usr/pkg/lib.

Posted in Answers, NetBSD, System Administration | Leave a comment

Q: Why do I get “read text: Unknown error: code 60 failed(60)” when trying to PXE boot OpenBSD?

A: You will need to add the following option to /etc/dhcpd.conf on your DHCP server.

  next-server 10.0.0.5;

 
The next-server address should refer to your tftp server.

Posted in Answers, Networking, OpenBSD | 1 Comment