Author Topic: execute command with Alt-binz  (Read 2642 times)

Offline alik

  • Contributor
  • ***
  • Posts: 3
execute command with Alt-binz
« on: January 12, 2010, 02:06:24 pm »
Hi Guys,

I'm trying to exec a php file with php.exe test.php "$coll"
I just can't make it work ?
What am i missing ?

Is there a log for this that i'll know if this was executed already or not ?

Tnx,

ALik.

Offline davidq666

  • Contributor
  • ***
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: execute command with Alt-binz
« Reply #1 on: January 12, 2010, 06:09:13 pm »
Hi Guys,

I'm trying to exec a php file with php.exe test.php "$coll"
I just can't make it work ?
What am i missing ?

Is there a log for this that i'll know if this was executed already or not ?

Tnx,

ALik.


it's "$col" with one l...

Offline alik

  • Contributor
  • ***
  • Posts: 3
Re: execute command with Alt-binz
« Reply #2 on: January 13, 2010, 09:26:23 am »
tried with one l "$col" still dont work.

What am i missing to make it work ?

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: execute command with Alt-binz
« Reply #3 on: January 13, 2010, 04:13:34 pm »
tried with one l "$col" still dont work.

What am i missing to make it work ?

Little more info: is the php script being called at all?  If not, is php.exe in your %PATH%?  Try with the full path to it. Write a test script that will log if the script is called and check $argc and $argv.
« Last Edit: January 13, 2010, 04:16:01 pm by Hecks »

Offline DAL

  • Contributor
  • ***
  • Posts: 4
Re: execute command with Alt-binz
« Reply #4 on: January 13, 2010, 04:16:23 pm »
Try removing the quotes from "$col".

Offline alik

  • Contributor
  • ***
  • Posts: 3
Re: execute command with Alt-binz
« Reply #5 on: January 13, 2010, 04:40:18 pm »
My script is:

Code: [Select]
<?php

$_SERVER
['argv'];
//echo $argv[1];


$myFile "testFile.txt";
$fh fopen($myFile'w') or die("can't open file");
fwrite($fh$argv[1]);
fclose($fh);

?>


It's working without the "" but i still can't get it work without the par checking.
And for some reason i can't get the $col param

Alik.

tried with one l "$col" still dont work.

What am i missing to make it work ?

Little more info: is the php script being called at all?  If not, is php.exe in your %PATH%?  Try with the full path to it. Write a test script that will log if the script is called and check $argc and $argv.


Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: execute command with Alt-binz
« Reply #6 on: January 13, 2010, 05:29:48 pm »
If I were in your  position, I'd now be trying to get to the root of the problem by asking questions like these:

- is it a prob with the variable subsititution? try passing just a string as param

- is it a prob with just $col? try $d or $u

- is the execute command really being applied to the coll? edit with Ctrl+K.

etc.