Dear Paul

I've updated my Mbuni with the latest sources from CVS. Everything seems to work fine, including HTTP POST to a different machine on LAN.

Quoting you:


"The issue is with PHP: It doesn't provide a unified way to access all form data. (I could be wrong, and that's largely because I am very biased in this regard!) So you need to check the _POST array as well.  I am updating CVS to try and put all the data sent by Mbuni into the _FILES variable (by essentially sending a 'filename' attribute for each of the form-data HTTP POST items as well). "


Well I agree that the issue may be with PHP, but _FILES variable still contains nothing. I've the following PHP code:


<?php 

echo 'This is a test message';

$in='/usr/share/wallpapers/alien-night.jpg';
$out='/tmp/alien.jpg';

if(isset($_POST['userfile']) )
{

     echo $_FILES['userfile']['size'];

     $tmpName  = $_FILES['userfile']['tmp_name'];
     if($tmpName)
      {
        echo "123";
      }
     else
     {
       echo "234";
     }

       $f=fopen($out,'a');
    echo "HELOOOOOOOOOOOOOOOOOOOO";
    copy($in, $out);

}

The file gets copied because _POST is working fine. However "234" is printed on the shell running mmsbox.  Also $_FILES['userfile']['size'] is not printed .

mmsbox.conf -
post-url = "" href="http://107.108.89.199/test-mbuni.php">http://107.108.89.199/test-mbuni.php
catch-all = true
#http-post-parameters = fx=true&images[]=%i&text[]=%t
http-post-parameters = userfile[ ]=%z

If there is an issue with PHP, I'll find an alternative way out. However, if I'm missing out something in Mbuni, kindly let me know.

Sincerely & Gratefully
KM

 


_______________________________________________
Users mailing list
Users@mbuni.org
http://mbuni.org/mailman/listinfo/users_mbuni.org

Reply via email to