Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP shell interpreter
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
kodos02
n00b
n00b


Joined: 20 Mar 2005
Posts: 12
Location: Luxembourg

PostPosted: Thu Jan 05, 2006 4:25 pm    Post subject: PHP shell interpreter Reply with quote

Hi,

does somebody know how i can install a PHP shell interpreter, so that I can run php scripts from the shell?

thx
Christian
Back to top
View user's profile Send private message
chrbecke
Guru
Guru


Joined: 12 Jul 2004
Posts: 598
Location: Berlin - Germany

PostPosted: Thu Jan 05, 2006 5:08 pm    Post subject: Reply with quote

Code:
emerge dev-lang/php
did the trick for me...
I can run php scripts either with
Code:
php -f script.php
or, if I add the proper shebang
Code:
#!/ust/bin/php
as first line (before the opening "<?php") in my script and make the file executable I can execute it directly, e.g.
Code:
./script.php
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20390

PostPosted: Thu Jan 05, 2006 7:04 pm    Post subject: Reply with quote

Moved from Other Things Gentoo
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
kodos02
n00b
n00b


Joined: 20 Mar 2005
Posts: 12
Location: Luxembourg

PostPosted: Thu Jan 05, 2006 9:26 pm    Post subject: Reply with quote

Hi,

i have installed dev-lang/php but i have no php command, do I need a special use flag?

thx Christian
Back to top
View user's profile Send private message
FLYLM
n00b
n00b


Joined: 25 Mar 2004
Posts: 62
Location: France

PostPosted: Thu Jan 05, 2006 9:42 pm    Post subject: Reply with quote

You need the flag "cli"
Back to top
View user's profile Send private message
chrbecke
Guru
Guru


Joined: 12 Jul 2004
Posts: 598
Location: Berlin - Germany

PostPosted: Thu Jan 05, 2006 9:44 pm    Post subject: Reply with quote

chrbecke wrote:
Code:
emerge dev-lang/php
did the trick for me...

Sorry, didn't recognise there are ebuilds for php in two different categories. I don't have dev-lang/php installed, but dev-php/php.
I think dev-lang/php has to be emerged with "cli" USE flag to get a command line php interpreter. I never used it myself, though, so I can't tell for sure...
Sorry for the confusion.
Back to top
View user's profile Send private message
kodos02
n00b
n00b


Joined: 20 Mar 2005
Posts: 12
Location: Luxembourg

PostPosted: Thu Jan 05, 2006 10:04 pm    Post subject: Reply with quote

Thank you two :D
I'm reemergeing php right now ;)

Christian
Back to top
View user's profile Send private message
FLYLM
n00b
n00b


Joined: 25 Mar 2004
Posts: 62
Location: France

PostPosted: Thu Jan 05, 2006 10:05 pm    Post subject: Reply with quote

You can find some informations about use flag here :

http://svn.gnqs.org/projects/gentoo-php-overlay/wiki/NewUseFlags
Back to top
View user's profile Send private message
alexlm78
Veteran
Veteran


Joined: 08 Dec 2003
Posts: 1265
Location: Guatemala,Guatemala

PostPosted: Thu Jan 05, 2006 10:34 pm    Post subject: Reply with quote

And try to program in phpgtk, is really great.
_________________
"This is a different kind of world, you need a different kind of software"

Linux User# 315201
100% Chapin hecho en Guatemala
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Tue Feb 21, 2006 10:36 pm    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads, please see this topic.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum