no Cli for php 5.3.x on SUSE 11.2 ?!

Installed Ubuntu 9.10 ‘Karmic’ in a VM, installed php+php-cli and the output is exactly the same as on SuSE, there is no colouring out of the box.

Looks like php-ncurses was moved to PECL.

PHP 5.3 on CentOS 5 | Webtatic.com

About 1/3 down the page. If Karmic comes with 5.3, that would explain the missing ncurses. Yet another gotcha with PHP5.3. I’m glad I’m a cautious person and didn’t madly go update every 11.1 box in sight including some running PHP web apps.

So the answer for the OP is go look for php-ncurses in PECL.

I’m sorry but I cannot find php-ncurses for php 5.3 i386 :frowning:
only php-ncurses-5.2.x are available …

In fact , what about php5-readline extension ?

PECL :: Package :: ncurses

You will have to build this one yourself. Search for an explanation of what PECL is and how to build extensions from its packages.

I’m sorry, I didn’t believe that you specify information could hurt your feelings.

you are talking about a feature and I’m talking about an extension that can include many …

I know that php command line is included in Suse because I am already currently working with it on my suse terminal: what I seek is the difference between the features provided by php-cli (extension in ubuntu) and the other who seems to be missing in Suse

I don’t believe readline would produce your “colourized” output. I know it’s vague but the example you showed does look to me as if it could have been produced by ncurses.

PECL :: Package :: ncurses

from admittedly foggy memory, you will need to install the php-develop package. Then you should be able to follow this.

PHP: Compiling shared PECL extensions with phpize - Manual

Well, I’ve downloaded php-ncurses and unfortunately installation process didn’t succeed :frowning: : After “phpize” and “configure” commands when I try to run “make” These errors appear :

/bin/sh /home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/libtool --mode=compile cc  -I. -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -DPHP_ATOM_INC -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/include -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/main -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ncurses  -DHAVE_CONFIG_H  -g -O2   -c /home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses.c -o ncurses.lo 
mkdir .libs
 cc -I. -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -DPHP_ATOM_INC -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/include -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/main -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ncurses -DHAVE_CONFIG_H -g -O2 -c /home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses.c  -fPIC -DPIC -o .libs/ncurses.o
/bin/sh /home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/libtool --mode=compile cc  -I. -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -DPHP_ATOM_INC -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/include -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/main -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ncurses  -DHAVE_CONFIG_H  -g -O2   -c /home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c -o ncurses_fe.lo 
 cc -I. -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -DPHP_ATOM_INC -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/include -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/main -I/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ncurses -DHAVE_CONFIG_H -g -O2 -c /home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c  -fPIC -DPIC -o .libs/ncurses_fe.o
/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c:29: error: duplicate 'static'
/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c:35: error: duplicate 'static'
/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c:42: error: duplicate 'static'
/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c:169: error: 'first_arg_force_ref' undeclared here (not in a function)
/home/hichem/Desktop/ncurses-1.0.0/ncurses-1.0.0/ncurses_fe.c:183: error: 'second_arg_force_ref' undeclared here (not in a function)
make: *** [ncurses_fe.lo] Error 1

have you any idea ?

I think you need more tools than what you have installed. This was the third hit on “pecl opensuse”

User:Hakre/HowTo PECL on Opensuse « WordPress Codex

I’ve worked with Ubuntu from 8.04 and I always have color on php command line . Perhaps your VM don’t support some packages that are needed to colorize php command line…

To be honest, I think that is better to don’t use a virtual machine for a professional work :wink:

Past performance is no indication of future results, as they say when you buy stocks.

If Karmic went to PHP 5.3 that would explain why ncurses is missing from it.

Edit: Well no, Karmic stayed at 5.2.10. I’ll leave it to Chrysantine to explain why no coloring in Karmic. But the fact is that openSUSE 11.2 has no php5-ncurses and you have to build your own.

ok lol .

when I try to install php-ncurses with pecl ( I’ve checked pecl installation with your link and it think that is correctly installed on my machine ) I got the same error :frowning:


...
 cc -I. -I/tmp/pear/download/ncurses-1.0.0 -DPHP_ATOM_INC -I/var/tmp/pear-build-hichem/ncurses-1.0.0/include -I/var/tmp/pear-build-hichem/ncurses-1.0.0/main -I/tmp/pear/download/ncurses-1.0.0 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/include/ncurses -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/download/ncurses-1.0.0/ncurses_fe.c  -fPIC -DPIC -o .libs/ncurses_fe.o
/tmp/pear/download/ncurses-1.0.0/ncurses_fe.c:29: error: duplicate 'static'
/tmp/pear/download/ncurses-1.0.0/ncurses_fe.c:35: error: duplicate 'static'
/tmp/pear/download/ncurses-1.0.0/ncurses_fe.c:42: error: duplicate 'static'
/tmp/pear/download/ncurses-1.0.0/ncurses_fe.c:169: error: 'first_arg_force_ref' undeclared here (not in a function)
/tmp/pear/download/ncurses-1.0.0/ncurses_fe.c:183: error: 'second_arg_force_ref' undeclared here (not in a function)
make: *** [ncurses_fe.lo] Error 1
ERROR: `make' failed

I’ve found a couple of pages like this one PECL :: Bug #14369 :: Build/Register issue with PHP 5.3.0

but tbh to resolve it, I’d be asking others to help me.

Just a moment ago you said php-cli was the package that provided colours, now suddenly it’s no longer so - getting a little tangled in your reasoning here?

Or perhaps you just have absolutely no clue as to what you’re talking about? Seriously.

Yes because the largest companies in the world are just running virtual machines for fun, not for professional work. rolleyes

I know this topic is pretty old. But it’s still

  1. was on top of search result page
  2. has no answer
  3. my 13.2 has no colored output for symfony console out of the box

so, answer is

sudo zypper in php5-posix