Install ncurses for php on Debian

From Andreida
Revision as of 11:35, 16 February 2016 by Andreas (talk | contribs) (Created page with "== Check for installation == Check for ncurses with: php -m | grep -i curs If you get "ncurses" you are done. == Install == === install files === Otherwise you need * p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Check for installation

Check for ncurses with:

 php -m | grep -i curs

If you get "ncurses" you are done.

Install

install files

Otherwise you need

  • php5-dev for phpize
  • libncursesw5-dev for wide char support
  • php-pear for pecl
apt-get install php5-dev libncursesw5-dev php-pear

Ncurses for php is a pecl lib:

pecl install ncurses

update php.ini

Make ncurses lib known to php, search for "Dynamic Extensions":

#/etc/php5/cli/php.ini
extension=ncurses.so

Reload the ini

/etc/init.d/apache reload

test

try ncurses with a minimal program:

<?php
ncurses_init();
ncurses_end();

If you get no error, you are done.