Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System function

Status
Not open for further replies.

mns9939

Programmer
Nov 21, 2001
19
US
HI,
In a PHP script, i am using the system function to execute some commands to send file to a printer etc.
How ever, i am unable to execute the following command:

$cmd = 'host sqlplus xyz/abc@adm1 @/home/test.sql'
system($cmd);

Can any one tell if this is not possible to invoke this command from a php script?

Both php and the sqlplus script are on the same Unix box.

Thanks,
 
probably cause you are not allowed to run executables from the shell or the path to the file is not the usual and he can't execute.

Another thing, what's the output of :
`$cmd`? (backticks)

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top