<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi all,<br><br>I am trying to create a function that allows me to send binary files from a client and have the server write it into a directory.<br>I have it working right now, but it errors when I try to send a file greater then about 300 Kb.&nbsp; Any file under that size will<br>transfer just fine.<br><br><br><br>Here is the function I have on the server...<br><br>function upload_file2($m)<br>{<br>&nbsp;&nbsp;&nbsp; $param1 = $m-&gt;getParam(0);<br>&nbsp;&nbsp;&nbsp; $write_file = $param1-&gt;scalarval();<br>&nbsp;&nbsp;&nbsp; $convert_file = fopen($write_file, "rb");<br><br>&nbsp;&nbsp;&nbsp; $param2 = $m-&gt;getParam(1);<br>&nbsp;&nbsp;&nbsp; $file_name = $param2-&gt;scalarval();<br><br>&nbsp;&nbsp;&nbsp; $test_write = fopen("/tmp/".$file_name, "w");<br>&nbsp;&nbsp;&nbsp; fwrite($test_write, $write_file);<br>&nbsp;&nbsp;&nbsp; fclose($test_write);<br><br>&nbsp;&nbsp;&nbsp; return new xmlrpcresp(new xmlrpcval($file_name));<br>}<br><br>$upload_file2_sig = array(array($xmlrpcBase64,$xmlrpcBase64, $xmlrpcString));<br>$upload_file2_doc = 'uploads a binary file';<br><br><br><br>I am using a Python client to send the file.&nbsp; I was playing around with a Python server to transfer files and the Python<br>server does not run into any problems with file size.<br><br>This is what I have on the python client...<br><br>import xmlrpclib<br><br>print("Trying to connect...")<br>server_url = 'http://some_url/new_server.php';<br>server = xmlrpclib.Server(server_url);<br><br>handle = open("nova.bmp")<br>file_name = "fetch_nova.bmp"<br>send_file = server.sendFile(xmlrpclib.Binary(handle.read()), file_name)<br><br><br>This is the error I get when trying to use the Python Client/Php Server combo<br><br>Trying to connect...<br>Traceback (most recent call last):<br>&nbsp; File "testProc_client.py", line 20, in ?<br>&nbsp;&nbsp;&nbsp; send_file = server.sendFile(xmlrpclib.Binary(handle.read()), file_name)<br>&nbsp; File "/usr/lib/python2.3/xmlrpclib.py", line 1029, in __call__<br>&nbsp;&nbsp;&nbsp; return self.__send(self.__name, args)<br>&nbsp; File "/usr/lib/python2.3/xmlrpclib.py", line 1316, in __request<br>&nbsp;&nbsp;&nbsp; verbose=self.__verbose<br>&nbsp; File "/usr/lib/python2.3/xmlrpclib.py", line 1070, in request<br>&nbsp;&nbsp;&nbsp; headers<br>xmlrpclib.ProtocolError: &lt;ProtocolError for mmodev.jpl.nasa.gov/frank/xmlrpc/demo/server/new_server.php: -1 &gt;<br><br><br>Any help would be greatly appreciated.<br>Thanks!<br><br>-Frank<br><br><br /><hr />Windows Live™ Hotmail®:…more than just e-mail.  <a href='http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_explore_012009' target='_new'>Check it out.</a></body>
</html>