Request to check run php in Unix shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Request to check run php in Unix shell
# 1  
Old 05-17-2012
Request to check run php in Unix shell

Hi I m running a php file in Unix shell

it says php cpmmnad not found



Code:
bash-3.2$ cat echo.php
<? php

echo"heelo world"

>?
bash-3.2$ php echo.php
bash: php: command not found


actually I want to change certain thing a in a website using php script so I m beginner and trying to learn Kindly guide regardign this

Thanks
Mani
# 2  
Old 05-17-2012
try php-cgi. and fixing your syntax

Code:
<?php
echo "hello world"
?>

# 3  
Old 05-17-2012
Request to check

Hi Thanks for the reply.


still it shows the error, my file name is echo.php


Code:
bash-3.2$ php-cgi echo.php
bash: php-cgi: command not found
bash-3.2$


Actually I also want to apply certain changes on a webpage using PHP ny help or info regarding this
# 4  
Old 05-17-2012
what is your OS ? is php installed in your OS ?
# 5  
Old 05-17-2012
Request to check

Hi

I have Unix OS
And, I have downloaded XAMPP on my system accord to some guidelines from websites.

Thanks
Mani
# 6  
Old 05-17-2012
if you execute the below command, what is the output ?

Code:
 
which php

# 7  
Old 05-17-2012
Request to check

Hi

it seems its not installed properly.

can anybody guide about its installation

the error code is below

Code:
bash-3.2$ which php
which: no php in (/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/mgrover/bin)

Thanks
Mani
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies

3. Web Development

Request to check:PHP website design help

Hi I have a website name www.gentrepid.org I have all the setting scripts for this website in php now as a research part, I am new to this as I havent done that before. I have to make certain changes in the website Include some icons on the left like "Drugs" when user click on it... (0 Replies)
Discussion started by: manigrover
0 Replies

4. Web Development

Request to check:PHP help hw to proceed

Hi I am new to PHP. I have to changed a website design adn add certain features and lnks which shuld direct it towards other website. Can any body help me how to proceed. I have some already made templates to do this. I am conpletely new.. So, I have to first install Php from... (0 Replies)
Discussion started by: manigrover
0 Replies

5. Shell Programming and Scripting

Script to run php and check value in txt

Hello, I'm looking for a bash script, that I will run from cron, that executes a php script. After 5 minutes that the php script is executed, the bash script, must check a value in a text file /public_html/check.txt if check.txt = 0 the script will stop, if check.txt is not = 0 it must... (0 Replies)
Discussion started by: andymc1
0 Replies

6. Shell Programming and Scripting

Request for file read option in Unix shell scripting

Hi Friends, I would like to read all the record from one txt file to other file txt For example I have two txt file a.txt and b.txt. I need to read a.txt record by record and I need add the system date @ end of each record before moving it to b.txt. Could you please share the coding for... (4 Replies)
Discussion started by: vinoth124
4 Replies

7. Shell Programming and Scripting

Calling a request set from Unix shell Script

Hi All, I want to call a concurrent request set from a shell script. I am getting the syntax error "syntax error at line 417 : `(' unexpected" in the below script. v_request_id=fnd_request.submit_request(application => 'APPL_SHORT_NAME' ,program => 'PROGRAM_SHORT_NAME' ... (4 Replies)
Discussion started by: swatipevekar
4 Replies

8. Shell Programming and Scripting

Cannot run Shell script in PHP

Hello, I have written a code for uploading a file onto the server.The code is as follows: <? if ($_POST == "Upload File") { if( move_uploaded_file ($_FILES ,$target) ) { $tmpsrc = $_FILES ; echo... (2 Replies)
Discussion started by: michrods
2 Replies

9. Shell Programming and Scripting

check in unix shell script so that no one is able to run the script manually

I want to create an automated script which is called by another maually executed script. The condition is that the no one should be able to manually execute the automated script. The automated script can be on the same machine or it can be on a remote machine. Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies

10. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
Login or Register to Ask a Question