As of PHP 5.1.0, the CLI SAPI provides an interactive shell using the -a option if PHP is compiled with the --with-readline option.
I'm having problems using the interactive shell on my FreeBSD box. If I run:
The shell reports:
but this just hangs, with a solid blinking square cursor and no prompt for php i.e.
I have to ctrl-Z to force the process to quit?
I've done a quick check of my PHP installation.
These are the first few lines of the preceding command:
I dont see an entry for --with-readline anywhere. So my first questions would be:
How do I compile PHP with the '--with-readline' option?
And what is the exact syntax?
I'm having problems using the interactive shell on my FreeBSD box. If I run:
# php -aThe shell reports:
Code:
Interactive mode enabled
PHP:
php >
I have to ctrl-Z to force the process to quit?
I've done a quick check of my PHP installation.
# php -i | lessThese are the first few lines of the preceding command:
Code:
phpinfo()
PHP Version => 5.4.10
System => FreeBSD my.domain.org 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Build Date => Jan 5 2013 06:23:10
Configure Command => './configure' '--with-layout=GNU' '--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--enable-mysqlnd' '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr' '--program-prefix=' '--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd9.0'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php
Additional .ini files parsed => /usr/local/etc/php/extensions.ini
...
I dont see an entry for --with-readline anywhere. So my first questions would be:
How do I compile PHP with the '--with-readline' option?
And what is the exact syntax?