I’m changed recently my OS from Ubuntu 9.10 (amd 64) to OpenSuse 11.2 (64 bit) and I have a little issue when using php command line on terminal : php-cli is a php extension that provide a pretty illustrative executed php code (it’s a way of running PHP Scripts that aren’t on a web server).
Unfortunately ,I haven’t found php-cli when using yast and also I haven’t found an rpm of this extension for php 5.3.0
In fact, I need this extension because it help me wen using command line for symfony framework.
please, can any one help me to install it on suse ?
No no no …
php work fine on terminal, that’s mine that i have no problem with it. I’m speaking about php-cli exentension that colorize php result on terminal to have an expressive show of executed php code on terminal.
My issue is that I cannot install correctly this extension on suse 11.2 (64bit) under php5.3.0 : that’s mine that i can run php file using terminal but there no color on executed code
this is not a big problem for me, but I have worked for a long time on ubuntu (i have installed php-cli extension with synaptic) using terminal because I work with symfony FW and the colored executed code is very useful.
In fact, Ubuntu is always installed on my machine and I’ve tried to uninstall php-cli that require php-commun and after that I could not use php with command line … It seems that ubuntu need php-cli (and eventually php-commun) to enable the command line
On suse , it’s different: there are no php-cli or php-commun installed and I can use the command line php without coloring code
You don’t understand - php5-cli does not exist on SuSE nor installing a Redhat package like you are trying to do above (Yes, the repository says RHEL5 which is Redhat Enterprise Linux 5) will do anything except at worst cripple your php installation by inserting incompatible modules.
What’s this coloring thing anyway? When you execute a PHP program with the CLI PHP interpreter it’s not showing you the code, it’s busy running it. Are you confusing it with the syntax coloring that’s done by vim and other text editors?
Chrysantine
PHP CLI is avaiable on all popular operating systems: Linux, Windows, OSX, Solaris. Popular Linux distibutions (such as Ubuntu, Debian, Fedora Core, Suse and etc.)
Yes, we know what php-cli is. It’s a pretty standard thing. Fact is, it’s included in the php5 package on openSUSE. What I’m questioning is why you think the coloring comes from it. I can’t think of a reason why CLI would do the coloring. It’s just an command line interpreter, duh.
Maybe all you are missing is the php5-ncurses package. Maybe symfony detects there is no ncurses and so can’t colorise the output. Have you tried installing php5-ncurses?
No way php or php-cli is doing this. It’s a console color setting, as you can see from the prompt. And indeed, such things are not possible on windu systems. @ken-yap: if you ever tried one of "jengelh"s kernels, you would have seen things like this. Same thing if you ‘su’, the prompt turns red.
So, in short: AFAIK the colors have nothing to do with php or whatever, just terminal settings.
I think he posted the Windows screenshot to show what no color looks like. He really should have posted an openSUSE screenshot to not confuse the issue.
Let’s be clear on some things. I know what php-cli is. I know what colourisation does. I sometimes see it in ls output or vim syntax highlighting. Sometimes annoying when the color choices are poor. Anyway…
I think the OP is chasing a red herring. Firstly it’s not showing “code”, it’s showing results of a test, or maybe a backtrace. Secondly, I’m 99% sure it’s not php-cli doing the coloring, but rather the PHP script symfony and it can only do that when PHP has ncurses loaded. On Ubuntu, php-cli has the ncurses module compiled in. Hence my suggestion to install php5-ncurses on openSUSE.
thank you for your replay but it seems that the only person who understand me is ken_yap : My suse terminal include color ( red when root, hidden file, executable file …) and that’s not my issue, I just want to have colorized result when I execute php file on my Suse terminal.
I agree with ken_yap but I can’t find php5-ncurses …
I think that the appropriate extension in my case is php5-readline .
in yast detail I see:
######### #php5-readline #PHP interface to libedit, which provides editable command line #as well as PHP interactive mode (php-a)
#########
and oddly, when I install it (following the type of architecture) php return me the following message: “php segmentation fault”
perhaps it will be better if I stop finding a solution …
Where does it come from? Well, in 11.1, and I suspect also in 11.2:
$ zypper info php5-ncurses
Repository: openSUSE-11.1-Update
Name: php5-ncurses
Version: 5.2.11-0.1.1
Arch: x86_64
Vendor: openSUSE
Installed: No
Status: not installed
Installed Size: 85.0 K
Summary: PHP5 Extension Module
Description:
This module adds ncurses support (for CLI and GCI versions only).
which means it was probably in the OSS repository and got updated in the Update repository. Do you have the OSS repository and the Update repository subscribed to?
You’d get the 5.3 version though in 11.2.
PS: Hmm, you might have some valid reason to wonder why you can’t find php5-ncurses. It’s not on the list of the DVD5 contents. This needs further investigation:
PPS: Can’t find php5-ncurses for 11.2 at software.opensuse.org/search. Wonder if it’s included in php5 RPM now and needs to be enabled in cli/php5.ini. Anybody know?