LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2009, 12:41 PM   #1
getmizanur
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Rep: Reputation: 0
debian php5 - command not found


elloo,

i have install php5 on my debian however i get "bash: php: command not found".

i think i have to setup environment variable pointing to php however how do i set this or am i barking up the wrong tree.

thanks in advance

Code:
user@debian:/var/www$ php
bash: php: command not found
Code:
+++-=========================-=========================-==================================================================
un  libapache2-mod-php4       <none>                    (no description available)
ii  libapache2-mod-php5       5.2.6.dfsg.1-1+lenny3     server-side, HTML-embedded scripting language (Apache 2 module)
un  libapache2-mod-php5filter <none>                    (no description available)
un  php-pear                  <none>                    (no description available)
un  php4-mysql                <none>                    (no description available)
ii  php5                      5.2.6.dfsg.1-1+lenny3     server-side, HTML-embedded scripting language (metapackage)
un  php5-cgi                  <none>                    (no description available)
ii  php5-common               5.2.6.dfsg.1-1+lenny3     Common files for packages built from the php5 source
un  php5-json                 <none>                    (no description available)
un  php5-mysql                <none>                    (no description available)
un  phpapi-20060613+lfs       <none>                    (no description available)

Last edited by getmizanur; 09-19-2009 at 12:44 PM.
 
Old 09-19-2009, 12:48 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,641

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Hi and welcome to LQ

You need to install also php5-cli package.

Regards
 
Old 09-19-2009, 01:01 PM   #3
getmizanur
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
thank @bathory, it worked.
 
Old 09-19-2009, 01:08 PM   #4
getmizanur
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
i've got another problem now.

when i use php command it works fine however when i try to execute php on a web browser i get download dialog. i assume that i get a download dialog 'cause php script is not executing.

can some one tell what i may be doing wrong.
 
Old 09-19-2009, 04:48 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,641

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
I think it's a browser cache problem, as you have the php module installed (libapache2-mod-php5). Close your browser, or clear the cache and try again.

Cheers
 
Old 09-20-2009, 01:36 AM   #6
getmizanur
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
thanks again @bathory. hooray it works!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Debian - Etch] GDLib with php5 not working? Zac_tw Debian 0 05-28-2008 01:36 AM
PHP5 and Apache2 doesn't cope om Debian 4,0 (AMD64) bumbibear Linux - Server 1 01-31-2008 02:52 PM
php5 not working with apache2 in debian 4.0 mohtasham1983 Linux - Server 2 08-08-2007 09:19 PM
Debian Etch and php5 problem paddyjoy Linux - Newbie 4 12-02-2006 05:54 PM
to run a html or php script with php5 command vincent_fr_60 Linux - Software 1 01-20-2006 06:41 AM


All times are GMT -5. The time now is 07:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration