I'm trying to set up development environment for some old projects in PHP 5.1.4. It needs to run as CGI (or fastcgi) under apache and I would like to have cli binary. My configure options are:
./configure \
--prefix=/usr/local/php-dev \
--with-config-file-path=/usr/local/php-dev/etc \
--enable-bcmath \
--enable-calendar \
--enable-dbase \
--enable-exif \
--enable-fastcgi \
--enable-force-cgi-redirect \
--enable-ftp \
--enable-gd-native-ttf \
--enable-mbstring \
--enable-memory-limit \
--enable-soap \
--enable-track-vars \
--enable-trans-sid \
--enable-versioning \
--enable-xslt \
--with-curl=/usr/local/php-libs/curl-7.12.2 \
--with-freetype \
--with-freetype-dir \
--with-gd \
--with-iconv \
--with-jpeg-dir \
--with-mhash \
--with-mime-magic \
--with-mssql=/usr/local/php-libs/freetds-0.64 \
--with-mysql=/usr/local/mysql5 \
--with-mysql-sock=/var/run/mysql/mysql.sock \
--with-openssl \
--with-pdo-mysql=/usr/local/mysql5 \
--with-pear \
--with-ttf \
--with-xslt-sablot=/usr/local/sablot-1.0.3 \
--with-zlib
After installing it, I have only these files in /usr/local/php-dev/bin
:
pear
peardev
pecl
php
php-config
phpize
I would expect also php-cgi
or php-cli
. When running ./php -v
from command line it shows:
PHP 5.1.4 (cgi-fcgi) (built: Sep 23 2010 09:46:33)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
So I only have CGI version and when I try to run CLI specific scripts, variables $argv
and $argc
are NULL
.
Is there a way to have both CLI and CGI versions? (system: slackware 13.0)
From http://www.php.net/manual/en/features.commandline.introduction.php:
So, did you try
make install-cli
? Do you have asapi
dir with those two?