Something was wrong with the combination of PHP 5.3.5, php-mysql 5.3.5, and MySQL 5.5.8 on FreeBSD 8 earlier this month. Any attempt to run the command
php -v resulted in PHP hanging after outputting the “Zend line”. Either
kill(1) the process or type C-c to put it out of its misery, but neither action is any helpful.
In fact, this bug was only present when PHP was told through the contents of the file
/usr/local/etc/php/extensions.ini to load the
The users of
rkhunter, PHP 5.3.5, and MySQL 5.5.8 would also experience this bug as
rkhunter uses the command
php -v to ascertain which version of PHP is installed on our systems.
My attempt at raising this issue only resulted in my bug report, PR
ports/153790, being changed to fixed while the bug could still be clearly demonstrated in the hours that followed.
Or could the bug really be fixed, and what I’m doing, and how I do it, is plain wrong? If you have any comments regarding the following recipe, please speak up.
- First, boot off the FreeBSD/i386 8.1-RELEASE DVD1.
- Install a basic system, say only
- Create the directory
/usr/ports/packagesusing the command
mkdir -p /usr/ports/packages.
- Download the ports hierarchy using the command
csupand the file
/usr/share/examples/cvsup/ports-supfiletailored to use your nearest CVSup mirror. The mirrors
cvsup.fig.ol.noare two of my closest, and I opted for the latter.
- Compile and install the following ports in the following order. For each port listed below, I used the commands
make config-recursive(I ran this particular command twice or more in a row, just to catch setting options for any new dependencies), and finally
databases/mysql55-server. Accept the default port settings.
lang/perl5.12. Enable the option for threaded Perl.
www/apache22. Enable the option for MySQL support for apr-dbd (
www/apache22) and the option for MySQL support in apr-util (
devel/apr1). Did I just make the wrong turn, twice? Enable the use of
devel/m4). Enable all options but the use of GNU pth for threading/multiprocessing (
databases/php5-mysql. Disable the option for the use of MySQL Native Driver (
databases/php5-mysql). Is this where I should have done the opposite? Enable the option for building the Apache module (
mysql.soreally is listed in
/usr/local/etc/php/extensions.ini. The command
cat /usr/local/etc/php/extensions.inishould accomplish this task.
- Type the command
/usr/local/bin/php -vand watch closely if the command ever exits on its own within a few milliseconds.
- Lo and behold, yes it does! Apparently
mysql-client-5.5.8_2behaves differently than their previous port revisions, i.e.
mysql-client-5.5.8. None of the PHP ports has had any recent changes to their port revision numbers. Hopefully I will soon be up and running with
rkhunteron my affected systems.
All of the above was carried out on between 2011-01-25T14:00 UTC and 2011-01-25T17:00 UTC.
For the sake of the scientific method, here are the contents of the files located in
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for apache-2.2.17_1 _OPTIONS_READ=apache-2.2.17_1 WITHOUT_THREADS=true WITH_MYSQL=true WITHOUT_PGSQL=true WITHOUT_SQLITE=true WITH_IPV6=true WITHOUT_BDB=true WITH_AUTH_BASIC=true WITH_AUTH_DIGEST=true WITH_AUTHN_FILE=true WITHOUT_AUTHN_DBD=true WITH_AUTHN_DBM=true WITH_AUTHN_ANON=true WITH_AUTHN_DEFAULT=true WITH_AUTHN_ALIAS=true WITH_AUTHZ_HOST=true WITH_AUTHZ_GROUPFILE=true WITH_AUTHZ_USER=true WITH_AUTHZ_DBM=true WITH_AUTHZ_OWNER=true WITH_AUTHZ_DEFAULT=true WITH_CACHE=true WITH_DISK_CACHE=true WITH_FILE_CACHE=true WITHOUT_MEM_CACHE=true WITH_DAV=true WITH_DAV_FS=true WITHOUT_BUCKETEER=true WITHOUT_CASE_FILTER=true WITHOUT_CASE_FILTER_IN=true WITHOUT_EXT_FILTER=true WITHOUT_LOG_FORENSIC=true WITHOUT_OPTIONAL_HOOK_EXPORT=true WITHOUT_OPTIONAL_HOOK_IMPORT=true WITHOUT_OPTIONAL_FN_IMPORT=true WITHOUT_OPTIONAL_FN_EXPORT=true WITHOUT_LDAP=true WITHOUT_AUTHNZ_LDAP=true WITH_ACTIONS=true WITH_ALIAS=true WITH_ASIS=true WITH_AUTOINDEX=true WITH_CERN_META=true WITH_CGI=true WITH_CHARSET_LITE=true WITHOUT_DBD=true WITH_DEFLATE=true WITH_DIR=true WITH_DUMPIO=true WITH_ENV=true WITH_EXPIRES=true WITH_HEADERS=true WITH_IMAGEMAP=true WITH_INCLUDE=true WITH_INFO=true WITH_LOG_CONFIG=true WITH_LOGIO=true WITH_MIME=true WITH_MIME_MAGIC=true WITH_NEGOTIATION=true WITH_REWRITE=true WITH_SETENVIF=true WITH_SPELING=true WITH_STATUS=true WITH_UNIQUE_ID=true WITH_USERDIR=true WITH_USERTRACK=true WITH_VHOST_ALIAS=true WITH_FILTER=true WITH_VERSION=true WITHOUT_PROXY=true WITHOUT_PROXY_CONNECT=true WITH_PATCH_PROXY_CONNECT=true WITHOUT_PROXY_FTP=true WITHOUT_PROXY_HTTP=true WITHOUT_PROXY_AJP=true WITHOUT_PROXY_BALANCER=true WITHOUT_PROXY_SCGI=true WITH_SSL=true WITHOUT_SUEXEC=true WITHOUT_SUEXEC_RSRCLIMIT=true WITH_REQTIMEOUT=true WITHOUT_CGID=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for apr-ipv6-devrandom-gdbm-db42-188.8.131.52.3.10 _OPTIONS_READ=apr-ipv6-devrandom-gdbm-db42-184.108.40.206.3.10 WITH_THREADS=true WITH_IPV6=true WITH_BDB=true WITH_GDBM=true WITHOUT_LDAP=true WITH_MYSQL=true WITHOUT_NDBM=true WITHOUT_PGSQL=true WITHOUT_SQLITE=true WITH_DEVRANDOM=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for libiconv-1.13.1_1 _OPTIONS_READ=libiconv-1.13.1_1 WITH_EXTRA_ENCODINGS=true WITHOUT_EXTRA_PATCHES=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for m4-1.4.15,1 _OPTIONS_READ=m4-1.4.15,1 WITH_LIBSIGSEGV=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for mysql-server-5.5.8_3 _OPTIONS_READ=mysql-server-5.5.8_3 WITH_OPENSSL=true WITHOUT_FASTMTX=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for mysql-client-5.5.8_2 _OPTIONS_READ=mysql-client-5.5.8_2 WITH_OPENSSL=true WITHOUT_FASTMTX=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for perl-5.12.3 _OPTIONS_READ=perl-5.12.3 WITHOUT_DEBUGGING=true WITHOUT_GDBM=true WITHOUT_PERL_MALLOC=true WITH_PERL_64BITINT=true WITH_THREADS=true WITHOUT_MULTIPLICITY=true WITHOUT_SITECUSTOMIZE=true WITH_USE_PERL=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for php5-5.3.5 _OPTIONS_READ=php5-5.3.5 WITH_CLI=true WITH_CGI=true WITHOUT_FPM=true WITH_APACHE=true WITHOUT_AP2FILTER=true WITHOUT_DEBUG=true WITH_SUHOSIN=true WITHOUT_MULTIBYTE=true WITH_IPV6=true WITHOUT_MAILHEAD=true WITHOUT_LINKTHR=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for php5-mysql-5.3.5 _OPTIONS_READ=php5-mysql-5.3.5 WITHOUT_MYSQLND=true
# This file is auto-generated by 'make config'. # No user-servicable parts inside! # Options for python26-2.6.6 _OPTIONS_READ=python26-2.6.6 WITH_THREADS=true WITH_HUGE_STACK_SIZE=true WITH_SEM=true WITHOUT_PTH=true WITH_UCS4=true WITH_PYMALLOC=true WITH_IPV6=true WITH_FPECTL=true