• Misc Help
  • apxs:Error: Invalid query string `APR_CONFIG'.

I'm trying to compile PHP 7.4.2 on MacOSX Mojave. I get thefollowing error:
apxs:Error: Invalid query string `APR_CONFIG'.

Here's my configure string:
./configure --disable-phpdbg --enable-bcmath --enable-calendar --enable-cgi --enable-cli --enable-ctype --enable-dba=shared --enable-dom --enable-exif --enable-fileinfo --enable-filter --enable-flatfile --enable-ftp --enable-gd --enable-inifile --enable-ipv6 --enable-json --with-libxml --enable-mbregex --enable-mbstring=all --enable-opcache --enable-pcntl --enable-pdo --enable-phar --enable-phpdbg --enable-phpdbg-webhelper --enable-posix --enable-shmop=shared --enable-soap=shared --enable-sockets --enable-sysvmsg=shared --enable-sysvsem=shared --enable-sysvshm=shared --enable-tokenizer --enable-xml --exec-prefix=/Applications/MAMP/bin/php/php7.4.2 --prefix=/Applications/MAMP/bin/php/php7.4.2 --sysconfdir=/Applications/MAMP/bin/php/php7.4.2/conf --with-apxs2=/Applications/MAMP/Library/bin/apxs --with-bz2=/Applications/MAMP/Library --with-config-file-path=/Applications/MAMP/bin/php/php7.4.2/conf --with-curl=/Applications/MAMP/Library --with-freetype --enable-gd --with-gdbm=$(brew --prefix gdbm) --with-gettext=shared,/Applications/MAMP/Library --with-gmp=$(brew --prefix gmp) --with-iconv-dir=/Applications/MAMP/Library --with-iconv=/Applications/MAMP/Library --with-jpeg --with-kerberos --with-layout=GNU --with-ldap --with-ldap-sasl --with-mhash --with-mysqli=mysqlnd --with-openssl=/usr/local/opt/openssl@1.1 --with-password-argon2=/Applications/MAMP/Library --with-pcre-jit --with-pdo-mysql=shared,mysqlnd --with-pdo-pgsql=shared,/Applications/MAMP/Library/pg --with-pdo-sqlite --with-pdo-sqlite=shared --with-pdo=shared --with-pear --with-pgsql=shared,/Applications/MAMP/Library/pg --with-pspell=shared,$(brew --prefix aspell) --with-readline --with-sodium=/Applications/MAMP/Library --with-sqlite3 --with-tidy=shared,/Applications/MAMP/Library --with-unixODBC=$(brew --prefix unixodbc) --with-xmlrpc KERBEROS_CFLAGS=-I/usr/include KERBEROS_LIBS=-lkrb5 SQLITE_CFLAGS= SQLITE_LIBS=-lsqlite3 JPEG_CFLAGS= JPEG_LIBS=-ljpeg SASL_CFLAGS=-I/usr/include/sasl SASL_LIBS=-lsasl2 --with-xsl=/Applications/MAMP/Library --with-zip --with-zlib --with-zlib-dir=/Applications/MAMP/Library

I'm not finding any reference to APR_CONFIG on the web. The only thing that's close is APU_BINDIR and that issue goes unanswered.

Any suggestions are greatly appreciated.

myk

    I don't know the exact cause/fix, but one possible "solution" is to remove the --with-apxs2=... option if you're planning to use fast-cgi or such instead of the Apache PHP module. If you do need the Apache module, afraid I don't know. 🙁 (Maybe I'd see if installing via Homebrew would work?)

      Write a Reply...