So i'm trying to build PHP 5.5.9 with MongoDB driver 1.5 (i know, we're back in 2014!) but I'm running into an error when I run ./configure :
checking whether to enable MongoDB support... yes ./configure: line 59477: syntax error near unexpected token src/libmongoc/src/common/,' ./configure: line 59477: PHP_MONGODB_ADD_SOURCES(src/libmongoc/src/common/, $PHP_MONGODB_COMMON_SOURCES, $PHP_MONGODB_BUNDLED_CFLAGS)'
It's as if there is supposed to be a function PHP_MONGODB_ADD_SOURCES that does not exist in the configure script... How do I fix this?
I'm running this on an AWS Linux AMI (not verson 2) so that I can create a php runtime for use with Lambda functions, and I need the mongodb driver compiled into it.
Here is all the commands i've used when i've ssh'd into a fresh instance:
sudo yum update -y
sudo yum install -y \
pcre.x86_64 \
libxml2-devel \
libmcrypt-devel.x86_64 \
bzip2-devel.x86_64 \
libcurl-devel.x86_64 \
openssl-devel.x86_64 \
libpng-devel.x86_64 \
libicu-devel.x86_64 \
libedit-devel.x86_64 \
readline-devel.x86_64 \
git.x86_64 \
php-devel.x86_64
sudo yum groupinstall "Development Tools"
curl -o php-5.5.9.tar.gz https://www.php.net/distributions/php-5.5.9.tar.gz
tar xvzf php-5.5.9.tar.gz
cd php-5.5.9
#have to install php to get phpize!
sudo ./configure --prefix=/usr \
--sysconfdir=/etc \
--with-config-file-path=/etc
sudo make
sudo make install
git clone https://github.com/mongodb/mongo-php-driver.git
cd mongo-php-driver
git checkout -b v1.5
git submodule update --init
phpize
sudo ./configure
sudo make all
sudo make install
cd ../../
rm configure
./buildconf --force
sudo ./configure --prefix=/usr \
--sysconfdir=/etc \
--with-config-file-path=/etc \
--with-mcrypt \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--enable-ctype \
--with-curl \
--enable-dba=shared \
--enable-dom \
--enable-exif \
--enable-fileinfo \
--enable-ftp \
--with-gd \
--with-gettext\
--enable-hash \
--with-iconv \
--enable-intl \
--enable-json \
--enable-libxml \
--enable-mbstring \
--with-mhash \
--enable-mysqlnd \
--with-openssl \
--with-pcre-regex \
--enable-pdo \
--with-pdo-mysql \
--enable-phar \
--enable-posix \
--with-readline \
--enable-session \
--enable-shmop \
--enable-simplexml \
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-tokenizer \
--enable-wddx \
--enable-xml \
--enable-xmlreader \
--enable-xmlwriter \
--enable-opcache \
--enable-zip \
--with-zlib \
--enable-sysvsem \
--enable-sysvshm \
--enable-mongodb
Thanks in advance!