process.php

All others add-ons (Secure FTP, SCP, Flickr, scripts ...).
Post Reply
jorgeo
Posts: 5
Joined: Mon Mar 03, 2008 10:19 pm

process.php

Post by jorgeo »

I'm using JDiskExplorer with HTTP. It connect fine.

When I make an HTTP upload, the progress bar shows 100%, then "Transfer Completed", but the files do not appear.

The folder I'm uploading to has 755 permissions. 777 didn't work, either.

My applet code looks like this:

Code: Select all

<!--
var _info = navigator.userAgent;
var _ns = false;
var _ns6 = false;
var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
if (_info.indexOf("Opera") > 0) _ie = false;
var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0) || (_info.indexOf("AIX") > 0) || (_info.indexOf("OS/2") > 0) || (_info.indexOf("IRIX") > 0)));
var _ns6 = ((_ns == true) && (_info.indexOf("Mozilla/5") >= 0));
if (_ie == true) {
  document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="768" HEIGHT="320" NAME="fileupload" codebase="http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0">');
}
else if (_ns == true && _ns6 == false) { 
  // BEGIN: Update parameters below for NETSCAPE 3.x and 4.x support.
  document.write('<EMBED ');
  document.write('type="application/x-java-applet;version=1.4" ');
  document.write('CODE="jfileupload.upload.client.MApplet.class" ');
  document.write('JAVA_CODEBASE="./" ');
  document.write('ARCHIVE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/explorerui.jar" ');
  document.write('NAME="fileupload" ');
  document.write('WIDTH="768" ');
  document.write('HEIGHT="320" ');
  document.write('url="http://myserver.com/subdir/process.php" ');
  document.write('paramfile="uploadfile" ');
  document.write('param1="todo" ');
  document.write('value1="upload" ');
  document.write('param2="errorheader" ');
  document.write('value2="custommessage" ');
  document.write('param3="relativefilename" ');
  document.write('value3="true" ');
  document.write('folderdepth="-1" ');
  document.write('encoding="ISO-8859-1" ');
  document.write('transferui="jfileupload.transfer.client.explorer.ExplorerTransferUI" ');
  document.write('resources="i18n_bar" ');
  document.write('transferuiresources="i18n_pane" ');
  document.write('mode="http" ');
  document.write('scriptable=true ');
  document.write('regfile="jfile_license.oxw" ');
  document.write('transferuiparam1="regfile" ');
  document.write('transferuivalue1="jexplorer_license.oxw" ');
  document.writeln('pluginspage="http://java.sun.com/products/plugin/index.html#download"><NOEMBED>');
  // END
}
else {
  document.writeln('<APPLET CODE="jfileupload.upload.client.MApplet.class" JAVA_CODEBASE="./" ARCHIVE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/explorerui.jar" WIDTH="768" HEIGHT="320" NAME="fileupload">');
}
// BEGIN: Update parameters below for INTERNET EXPLORER, FIREFOX, SAFARI, OPERA, MOZILLA, NETSCAPE 6+ support.
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/explorerui.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="myserver.com/subdir/process.php">');
document.writeln('<PARAM NAME="paramfile" VALUE="uploadfile">');
document.writeln('<PARAM NAME="param1" VALUE="todo">');
document.writeln('<PARAM NAME="value1" VALUE="upload">');
document.writeln('<PARAM NAME="param2" VALUE="errorheader">');
document.writeln('<PARAM NAME="value2" VALUE="custommessage">');
document.writeln('<PARAM NAME="param3" VALUE="relativefilename">');
document.writeln('<PARAM NAME="value3" VALUE="true">');
document.writeln('<PARAM NAME="folderdepth" VALUE="-1">');
document.writeln('<PARAM NAME="encoding" VALUE="ISO-8859-1">');
document.writeln('<PARAM NAME="transferui" VALUE="jfileupload.transfer.client.explorer.ExplorerTransferUI">');
document.writeln('<PARAM NAME="resources" VALUE="i18n_bar">');
document.writeln('<PARAM NAME="transferuiresources" VALUE="i18n_pane">');
document.writeln('<PARAM NAME="regfile" VALUE="jfile_license.oxw">');
document.writeln('<PARAM NAME="transferuiparam1" VALUE="regfile">');
document.writeln('<PARAM NAME="transferuivalue1" VALUE="jexplorer_license.oxw">');
document.writeln('<PARAM NAME="mode" VALUE="http">');
   
   
// END
if (_ie == true) {
  document.writeln('</OBJECT>');
}
else if (_ns == true && _ns6 == false) {
  document.writeln('</NOEMBED></EMBED>');
}
else {
  document.writeln('</APPLET>');
}
//-->

explorer.php is the same as the one in the jExplorer server-side directory.

Any ideas?

~Jorge

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php

Post by support »

And did you add the line in process.php to declare explorer.php ?

jorgeo
Posts: 5
Joined: Mon Mar 03, 2008 10:19 pm

Re: process.php

Post by jorgeo »

Yes. It's under
function emu_getallheaders() { /* code here*/ }
and right before ?>

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php

Post by support »

Could you provide a testing URL where I could see the applet ?

jorgeo
Posts: 5
Joined: Mon Mar 03, 2008 10:19 pm

Re: process.php

Post by jorgeo »

http://*****************/*****/sftp.php (edited out by user)

I added the debug version of process.php, which creates the process_debug.log file.

One thing I noticed is that I never reach the

Code: Select all

if ($_FILES['uploadfile']){}
line.
Last edited by jorgeo on Thu Oct 30, 2008 11:39 pm, edited 1 time in total.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: process.php

Post by support »

In the log file I see:
file_uploads:
upload_max_filesize:2M (script max_size:1500000)
post_max_size:8M
max_execution_time:30
memory_limit:128M

Could you check that file_uploads is really On ?
http://www.php.net/manual/en/ini.core.p ... le-uploads

jorgeo
Posts: 5
Joined: Mon Mar 03, 2008 10:19 pm

Re: process.php

Post by jorgeo »

Thanks, I have them turn on file_uploads and that solved the problem.

Post Reply