[PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
I am trying to run a shell command with backticks. However, I get a parse error. Is it because I have an array variable in there? $result = `adduser -l=$dist_id -p=$user['password'] --f=$user['name_first'] $user['name_last']`; Do I need to assign the value to a regular variable before I put

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Sebastian
well $user['password'] has no double quotes around it. - Original Message - From: Jonathan Duncan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 11, 2004 8:09 PM Subject: [PHP] php variables in a backtick command I am trying to run a shell command with backticks

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
Ah, that is a good idea, putting the command in a variable and then executing the variable. I have doen that before but did not think of it now. Too many things going on. Thanks! Jonathan Rory Browne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm not sure about variable

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
Duncan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 11, 2004 8:09 PM Subject: [PHP] php variables in a backtick command I am trying to run a shell command with backticks. However, I get a parse error. Is it because I have an array variable in there? $result

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Rory Browne
I'm not sure about variable expansion with backticks(I don't use backticks, if necessary I use shell_exec() instead). I'm just after installing a fresh SuSE 9.1, and php is giving me a segfault at the minute, with that particular code, but if you were using double quotes you could: $command =