Martin,
After closer look, you actually have an error in your PHP
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "". '$imageFolder' ."",
Notice, you have single quotes around your variable... that tells PHP to show the text exactly as it is typed and not process it as a variable.
Your variable should actually be this:
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "". $imageFolder ."",
You could enclose the variable inside double quotes because that tells PHP that processing is required inside the string. The only time where PHP processes something inside single quotes is inside a query statement.
Best regards,
Brian