type command in PHP


 
Thread Tools Search this Thread
Top Forums Programming type command in PHP
# 1  
Old 06-16-2010
type command in PHP

Hello, I am having trouble getting the type command to work in PHP whereas it works fine on the command line with only certain functions... example from PHP script:
Code:
echo system('type cp');

returns
Code:
cp is /bin/cp

whereas
Code:
echo system('type mogrify');

returns nothing... whereas from the unix command line typing in
Code:
type mogrify

i get
Code:
mogrify is /usr/local/bin/mogrify

Which is right..! Anyone any ideas...? Cheers Dave
# 2  
Old 06-16-2010
The difference is probably your PATH settings. The barebones PATH a web server gives things almost certainly wouldn't include /usr/local/bin.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Finding the type of AIX server using command line

Hi All, I am trying to find out type of AIX servers , for eg : server A is eServer p5 520 , server B is pSeries 630-6C4 etc. Can some one suggest me the best way to retrive this information through command line. is there any direct command or script by which i can retrieve this information... (9 Replies)
Discussion started by: omkar.jadhav
9 Replies

2. Shell Programming and Scripting

Capture IP and command type in linux script

hi guys, is there any way to capture the ip address of users who log-in to linux then capture the command executed together with the time and date? example output 192.1.1.1 : ls -ltr Aug 6 16:38:40thanks in advance. (2 Replies)
Discussion started by: d3xt3r
2 Replies

3. Shell Programming and Scripting

Find command return type

Hi all does find command return anything if the file to be searched is not found? Like if I search from a file in a dir does it return false or null if the file is not found? Please suggests. (3 Replies)
Discussion started by: Veenak15
3 Replies

4. Shell Programming and Scripting

[php] ftp get all files from a certain file type

Hi all, I googled for this kind of function but didn't find anything. I have an FTP connection with a server, went to the dir. In this dir there are several TXT files. I would like to have function that downloads all this files, based on their .txt extension. In bash, for example, simply:... (10 Replies)
Discussion started by: laurens
10 Replies

5. Shell Programming and Scripting

change file type to hidden using chmod command

I want to make a hidden file with chmod command. Example: I have a file name inputfile.txt -rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt I want to hide that file using chmod command. Please tell me if it is possible or there is some other way to do this. Thanks... (2 Replies)
Discussion started by: rinku
2 Replies

6. Solaris

<drive type unknown> when format command run

Hi, we are running solaris 9 on V280R. Due to power failure, one disk's label and lost its details like drive type etc. Disk details: <SUN72G cyl 14087 alt 2 hd 24 sec 424> single partition on slice 6 with UFS. The below i see when i run "format" command ..... ..... 4.... (1 Reply)
Discussion started by: prvnrk
1 Replies

7. UNIX for Dummies Questions & Answers

is there a content type command?

Hi I run on a Unix webserver at my university. I have a couple of *.inc files which are include files used for php. They are all in one folder without an index file. If you go to the folder, you get to see a list of files in that dir. Some of the .inc have a question mark icon next to... (3 Replies)
Discussion started by: aqh2
3 Replies

8. AIX

Command to determine Tape Type

I have 2 UNIX boxes and I need to determine whether or not they possess the same tape drive. What is the hardware command to determine what type of tape drive is present? Thx in advance. (4 Replies)
Discussion started by: Surdeymon
4 Replies
Login or Register to Ask a Question