Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Sylvain on Oct 18, 2009 23:18
open dhtmlx forum
Vault ERROR

Hello,

I tryed to install on my server dhtmlxVault and it doesn't works !
I tryed different path, but I hav always "ERROR".
My server : Linux with php 5.2

The "index.html" of this script is on : /dhtmlx/
The PHP files on : /dhtmlx/test2/

My code :

<html>
<head>
<title>Upload Control</title>
<link rel="stylesheet" type="text/css" href="codebase/dhtmlxvault.css" />

<script language="JavaScript" type="text/javascript" src="codebase/dhtmlxvault.js"></script>

<script language="JavaScript" type="text/javascript">
var vault = null;
function doOnLoad() {
vault = new dhtmlXVaultObject();
vault.setImagePath("codebase/imgs/");
vault.setServerHandlers("test2/UploadHandler.php", "test2/GetInfoHandler.php", "test2/GetIdHandler.php");
vault.onUploadComplete = function(files) {
var s="";
for (var i=0; i<files.length; i++) {
var file = files[i];
s += ("id:" + file.id + ",name:" + file.name + ",uploaded:" + file.uploaded + ",error:" + file.error)+"\n";
}
alert(s);
};
vault.create("vault1");
    }
</script>

<style>
    body{font-family:arial;font-size:12px}
    h1 {cursor:pointer;font-size:16px;margin-left:10px;line-height:10px}
    xmp {color:green;font-size:12px;margin:0px;font-family:courier;background-color:#e6e6fa;padding:2px}
    .hdr{
        background-color:lightgrey;
        margin-bottom:10px;
        padding-left:10px;
    }
</style>

</head>
<body onLoad="doOnLoad()">
<div class="hdr">DHTMLX Vault sample</div>

    <h1>Upload Complete</h1>
    <p>You can place this JavaScript file upload anywhere on your web page, attaching it
    to any div object.<br>
    Set up server handlers for your server type.<br><br>
Click "Add" button to select files.
    </p>

<div id="vault1">
</div>

<XMP>
<div id="vaultDiv"></div>
<script>
    vault=new dhtmlXVaultObject();
vault.setImagePath("codebase/imgs/");
vault.setServerHandlers("test2/UploadHandler.php",
"test2/GetInfoHandler.php",
"test2/GetIdHandler.php");

vault.onUploadComplete = function(files) {
var s="";
for (var i=0; i<files.length; i++) {
var file = files[i];
s += ("id:" + file.id + ",name:" + file.name + ",uploaded:" + file.uploaded + ",error:" + file.error)+"\n";
}
alert(s);
};

vault.create("vaultDiv");
</script>
</XMP>


</body>
</html>

Answer posted by Support on Oct 19, 2009 02:31
Hello,
Please try to run those php scripts directly from your browser and see the server error log for details.