Missing semicolon from the $frmpost variable declaration.
Also note that [man]var_dump/man's return type is void, so not only should you not be trying to use its nonexistent return value, but note that this:
fputs($fp1, "L382 \$frmpost = ".var_dump($frmpost)."\n");
is going to give you nothing more than this:
L382 $frmpost =
every time (due to the aforementioned void return type).
EDIT: To resolve the second issue, either take a look at the 'Tip' in the manual for [man]var_dump/man or instead consider whether [man]print_r/man's output is useful enough for you (and note that it offers a second argument to instruct it to return its result rather than directly output it, unlike var_dump()).