jQsafi / mollify

Automatically exported from code.google.com/p/mollify
0 stars 0 forks source link

Can't get it to work, "Error: Server returned unexpected result." #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
Ubuntu karmic, apache2 and php5 from the official repositories

Please provide any additional information below.

2009-12-11 13:47:57,450 [INFO ] Mollify service location: 
http://10.0.0.10/mollify/backend/service.php, timeout: 5 sec
2009-12-11 13:47:57,461 [INFO ] Starting Mollify, protocol version 1_0_0
2009-12-11 13:47:57,467 [DEBUG] Host page location: 
http://10.0.0.10/mollify/
2009-12-11 13:47:57,469 [DEBUG] Module name: org.sjarvela.Mollify
2009-12-11 13:47:57,471 [DEBUG] Module location: 
http://10.0.0.10/mollify/client/
2009-12-11 13:47:57,472 [DEBUG] Requesting session info (protocol version 
'1_0_0')
2009-12-11 13:47:57,474 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=session&action=session_info&protocol_version=1_0_0
2009-12-11 13:47:57,522 [DEBUG] Request response: 200/<?php
/**
* Copyright (c) 2008- Samuli Järvelä
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html. If redistributing this code,
* this entire header must remain intact.
*/
require_once("include/errors.php");
if (!file_exists("configuration.php")) {
function is_debug() { return FALSE; }
echo json_encode(get_error_message("INVALID_CONFIGURATION", "Configuration 
file missing"));
die();
}

require_once("configuration.php");

function return_json($result_array) {
$json = json_encode($result_array);
log_debug("RESULT=".$json);
$ext = isset($_GET["callback"]);
if ($ext) echo $_GET["callback"]."(";
echo $json;
if ($ext) echo ');';
}

function get_success_message($result = array()) {
if (is_debug()) return array("success" => TRUE, "result" => $result, 
"trace" => get_trace());
return array("success" => TRUE, "result" => $result);
}

function get_error_message($error, $details = "") {
global $ERRORS;

if (!isset($ERRORS[$error])) {
return array("success" => FALSE, "code" => 0, "error" => "Unknown error: " 
+ $error, "details" => $details);
}
$err = $ERRORS[$error];
if (is_debug()) return array("success" => FALSE, "code" => $err[0], "error" 
=> $err[1], "details" => $details, "trace" => get_trace());
return array("success" => FALSE, "code" => $err[0], "error" => $err[1], 
"details" => $details);
}

function fatal_error($error = "") {
if ($error === "") $error = "UNEXPECTED_ERROR";
return_json(get_error_message($error));
die();
}

function initialize_session() {
if (check_authentication()) return TRUE;
return_json(get_error_message("UNAUTHORIZED"));
return FALSE;
}

function start_session() {
session_name(get_session_name());
if (isset($_POST["MOLLIFY_SESSION_ID"])) {
log_debug("Restoring session id: ".$_POST["MOLLIFY_SESSION_ID"]);
session_id($_REQUEST["MOLLIFY_SESSION_ID"]);
}
session_start();
if (is_debug()) log_debug("SESSION=".array_to_str($_SESSION));
}

require_once("include/system.php");
import_configuration_provider();
initialize_logging();

log_request();
if (!isset($_REQUEST["type"])) exit(0);
$request_type = trim(strtolower($_REQUEST["type"]));
require_once("include/session.php");

start_session();
if ($request_type === "session") {
process_session_request();
exit(0);
}
if (!initialize_session()) return;
require_once("include/files.php");

$result = FALSE;
$error = "";
$error_details = "";

if ($request_type === "configuration") {
require_once("include/configuration_services.php");
process_configuration_request();
} else if ($request_type === "filesystem") {
require_once("include/filesystem_services.php");
process_filesystem_request();
} else {
$error = "INVALID_REQUEST";
$error_details = "Unsupported request type: ".$request_type;
log_error($error_details);
}

if ($result === FALSE) {
$result = get_error_message($error, $error_details);
log_error($result["error"].":".$result["details"]);
} else {
if ($result === TRUE) $result = array();
$result = get_success_message($result);
}
return_json($result);
?>

2009-12-11 13:47:57,529 [ERROR] Invalid JSON response: 200/<?php
/**
* Copyright (c) 2008- Samuli Järvelä
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html. If redistributing this code,
* this entire header must remain intact.
*/
require_once("include/errors.php");
if (!file_exists("configuration.php")) {
function is_debug() { return FALSE; }
echo json_encode(get_error_message("INVALID_CONFIGURATION", "Configuration 
file missing"));
die();
}

require_once("configuration.php");

function return_json($result_array) {
$json = json_encode($result_array);
log_debug("RESULT=".$json);
$ext = isset($_GET["callback"]);
if ($ext) echo $_GET["callback"]."(";
echo $json;
if ($ext) echo ');';
}

function get_success_message($result = array()) {
if (is_debug()) return array("success" => TRUE, "result" => $result, 
"trace" => get_trace());
return array("success" => TRUE, "result" => $result);
}

function get_error_message($error, $details = "") {
global $ERRORS;

if (!isset($ERRORS[$error])) {
return array("success" => FALSE, "code" => 0, "error" => "Unknown error: " 
+ $error, "details" => $details);
}
$err = $ERRORS[$error];
if (is_debug()) return array("success" => FALSE, "code" => $err[0], "error" 
=> $err[1], "details" => $details, "trace" => get_trace());
return array("success" => FALSE, "code" => $err[0], "error" => $err[1], 
"details" => $details);
}

function fatal_error($error = "") {
if ($error === "") $error = "UNEXPECTED_ERROR";
return_json(get_error_message($error));
die();
}

function initialize_session() {
if (check_authentication()) return TRUE;
return_json(get_error_message("UNAUTHORIZED"));
return FALSE;
}

function start_session() {
session_name(get_session_name());
if (isset($_POST["MOLLIFY_SESSION_ID"])) {
log_debug("Restoring session id: ".$_POST["MOLLIFY_SESSION_ID"]);
session_id($_REQUEST["MOLLIFY_SESSION_ID"]);
}
session_start();
if (is_debug()) log_debug("SESSION=".array_to_str($_SESSION));
}

require_once("include/system.php");
import_configuration_provider();
initialize_logging();

log_request();
if (!isset($_REQUEST["type"])) exit(0);
$request_type = trim(strtolower($_REQUEST["type"]));
require_once("include/session.php");

start_session();
if ($request_type === "session") {
process_session_request();
exit(0);
}
if (!initialize_session()) return;
require_once("include/files.php");

$result = FALSE;
$error = "";
$error_details = "";

if ($request_type === "configuration") {
require_once("include/configuration_services.php");
process_configuration_request();
} else if ($request_type === "filesystem") {
require_once("include/filesystem_services.php");
process_filesystem_request();
} else {
$error = "INVALID_REQUEST";
$error_details = "Unsupported request type: ".$request_type;
log_error($error_details);
}

if ($result === FALSE) {
$result = get_error_message($error, $error_details);
log_error($result["error"].":".$result["details"]);
} else {
if ($result === TRUE) $result = array();
$result = get_success_message($result);
}
return_json($result);
?>

com.google.gwt.json.client.JSONException:
com.google.gwt.core.client.JavaScriptException: (SyntaxError): Unexpected 
token <
stack: SyntaxError: Unexpected token <
at dCb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:654:110)
at s2c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:2064:36)
at F0c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:2039:115)
at fvb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:442:149)
at evb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:441:30)
at Object.ivb [as hc] 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:444:34)
at XMLHttpRequest.onreadystatechange 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:485:132)
type: unexpected_token
arguments: <Caused by: com.google.gwt.core.client.JavaScriptException:
(SyntaxError): Unexpected token <
stack: SyntaxError: Unexpected token <
at dCb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:654:110)
at s2c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:2064:36)
at F0c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:2039:115)
at fvb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:442:149)
at evb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:441:30)
at Object.ivb [as hc] 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:444:34)
at XMLHttpRequest.onreadystatechange 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.htm
l:485:132)
type: unexpected_token
arguments: <
2009-12-11 13:47:57,534 [ERROR] JSON request failed: error=Error 
'DATA_TYPE_MISMATCH' ()

Original issue reported on code.google.com by andrea.c...@gmail.com on 11 Dec 2009 at 12:49

GoogleCodeExporter commented 9 years ago
Do you have PHP enabled web server? This looks like your server does not 
process the
PHP files at all, just reads them and returns the script file contents.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 1:04

GoogleCodeExporter commented 9 years ago
It does process them...
maybe the first time I had installed mollify it doesn't, but later I have added 
php5 
and a test index.php workd here..

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 1:18

GoogleCodeExporter commented 9 years ago
So does it work now?

If it doesn't, try copying the url
(http://10.0.0.10/mollify/backend/service.php?type=session&action=session_info&p
rotocol_version=1_0_0)
from the log and open it in the browser, it should give you json data, not that 
php.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 1:29

GoogleCodeExporter commented 9 years ago
{"success":true,"result":{"authentication_required":true,"authenticated":false},
"trac
e":["REQUEST={HTTP_COOKIE:show_filter=true; show_inspector=true, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=session&action=session_info&protocol_version=1_0_0?log_level=D
EBUG, 
REQUEST_URI:\/mollify\/backend\/service.php?
type=session&action=session_info&protocol_version=1_0_0?log_level=DEBUG, 
SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260538615, 
argv:{0:type=session&action=session_info&protocol_version=1_0_0?log_level=DEBUG}
, 
argc:1}, POST={}, GET={type:session, action:session_info, 
protocol_version:1_0_0?
log_level=DEBUG}","SESSION={}"]}

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 1:36

GoogleCodeExporter commented 9 years ago
That looks right. And it still doesn't work from the Mollify client? Should not 
be
possible

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 1:39

GoogleCodeExporter commented 9 years ago
No, does not work...
and that url shows json just when I run it with ?LOG_LEVEL=DEBUG, otherwise it 
just 
gives me the php

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 1:45

GoogleCodeExporter commented 9 years ago
That "log_level" parameter is actually useless in that url, it is meant for the
client and not for these service calls.

And besides, the way you add it makes the url invalid. URL parameter delimiter 
is
"?", and it can be there only once (right after the URL path). Any following
parameters must be separated with "&".

But that doesn't explain why it acts differently whether you have that or not. 
I have
to check that there is nothing wrong with service.php.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 1:58

GoogleCodeExporter commented 9 years ago
now works!
I didn't touch anything, really, nothing in the server.
(I know how get values works ;) I'm a php coder too)

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:02

GoogleCodeExporter commented 9 years ago
could be some google chrome cache

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:03

GoogleCodeExporter commented 9 years ago
OT: why there's a 8px margin from the browser window? I bet it looks better 
without 
that margin, just like transmission web interface does 
(http://www.transmissionbt.com/images/screenshots/Clutch-Large.jpg)

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:08

GoogleCodeExporter commented 9 years ago
I've just added this at the beginning of the style.css file for the basic theme:
body {
        margin: 0px;
}

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:15

GoogleCodeExporter commented 9 years ago
The file browsing is just read only, I'm receiving the same error everytimg I 
try do do 
a write operation with any file.
Tried with a user and the root user

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:38

GoogleCodeExporter commented 9 years ago
I'm aware of the css, it's intentional. I'm not gonna create css that affects 
the entire page, the idea is that Mollify 
CSS has styles only for the Mollify div, otherwise nobody could integrate it 
with any page. So removing margins 
(or any other styles outside the Mollify div) is something the host page has to 
do.

What do you mean file browsing is read only? So that file listing shows, but 
whenever you do any file action from 
mollify client, it fails? Can you post the error here just to make sure it is 
about same thing (there are other 
possible reasons), it doesn't make any sense that server sometimes processes 
php and sometimes not, never 
heard of such thing.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 2:45

GoogleCodeExporter commented 9 years ago
2009-12-11 15:47:52,870 [INFO ] Mollify service location: 
http://10.0.0.10/mollify/backend/service.php, timeout: 5 sec
2009-12-11 15:47:52,944 [INFO ] Starting Mollify, protocol version 1_0_0
2009-12-11 15:47:52,953 [DEBUG] Host page location: http://10.0.0.10/mollify/
2009-12-11 15:47:52,959 [DEBUG] Module name: org.sjarvela.Mollify
2009-12-11 15:47:52,962 [DEBUG] Module location: 
http://10.0.0.10/mollify/client/
2009-12-11 15:47:52,967 [DEBUG] Requesting session info (protocol version 
'1_0_0')
2009-12-11 15:47:52,983 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=session&action=session_info&protocol_version=1_0_0
2009-12-11 15:47:53,078 [DEBUG] Request response: 
200/{"success":true,"result":{"authentication_required":true,"authenticated":tru
e,"se
ssion_name":"MOLLIFY_SESSION","session_id":"256b4c591170cb93a0364560e837b154","u
serna
me":"root","user_id":2,"features":{"file_upload":true,"folder_actions":true,"fil
e_upl
oad_progress":false,"zip_download":false,"change_password":true,"description_upd
ate":
false,"permission_update":false,"configuration_update":false},"default_permissio
n_mod
e":"RW","filesystem":{"max_upload_file_size":2097152,"max_upload_total_size":838
8608,
"allowed_file_upload_types":[]},"roots":[{"id":"cjE6Lw==","name":"Storage"}]},"t
race"
:["REQUEST={HTTP_REFERER:http:\/\/10.0.0.10\/mollify\/client\/82A665AB10C0B2502A
14702
22E8D6AE9.cache.html, CONTENT_TYPE:text\/plain; charset=utf-8, 
HTTP_COOKIE:show_filter=true; show_inspector=true; 
MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=session&action=session_info&protocol_version=1_0_0, 
REQUEST_URI:\/mollify\/backend\/service.php?
type=session&action=session_info&protocol_version=1_0_0, 
SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542903, 
argv:{0:type=session&action=session_info&protocol_version=1_0_0}, argc:1}, 
POST={}, 
GET={type:session, action:session_info, 
protocol_version:1_0_0}","SESSION={user_id:2, 
username:root, default_file_permission:RW, roots:{r1:{name:Storage, 
path:\/storage1}}, configuration_settings:{permission_update:, 
description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}"]}
2009-12-11 15:47:53,099 [DEBUG] SESSION: {"authentication_required":true, 
"authenticated":true, "session_name":"MOLLIFY_SESSION", 
"session_id":"256b4c591170cb93a0364560e837b154", "username":"root", 
"user_id":2, 
"features":{"file_upload":true, "folder_actions":true, 
"file_upload_progress":false, 
"zip_download":false, "change_password":true, "description_update":false, 
"permission_update":false, "configuration_update":false}, 
"default_permission_mode":"RW", "filesystem":{"max_upload_file_size":2097152, 
"max_upload_total_size":8388608, "allowed_file_upload_types":[]}, 
"roots":[{"id":"cjE6Lw==", "name":"Storage"}]}
2009-12-11 15:47:53,366 [DEBUG] Get directory contents: cjE6Lw==
2009-12-11 15:47:53,378 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&action=get_contents&id=cjE6Lw%3D%3D
2009-12-11 15:47:53,446 [DEBUG] Request response: 
200/{"success":true,"result":{"directories":[{"id":"cjE6L2F1ZGlvLw==","name":"au
dio",
"parent_id":"cjE6Lw=="},{"id":"cjE6L2RhdGkv","name":"dati","parent_id":"cjE6Lw==
"},{"
id":"cjE6L2xvc3QrZm91bmQv","name":"lost+found","parent_id":"cjE6Lw=="},{"id":"cj
E6L3A
ycC8=","name":"p2p","parent_id":"cjE6Lw=="},{"id":"cjE6L3ZpZGVvLw==","name":"vid
eo","
parent_id":"cjE6Lw=="}],"files":[]},"trace":["REQUEST={HTTP_REFERER:http:\/\/10.
0.0.1
0\/mollify\/client\/82A665AB10C0B2502A1470222E8D6AE9.cache.html, 
CONTENT_TYPE:text\/plain; charset=utf-8, HTTP_COOKIE:show_filter=true; 
show_inspector=true; MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=filesystem&action=get_contents&id=cjE6Lw%3D%3D, 
REQUEST_URI:\/mollify\/backend\/service.php?
type=filesystem&action=get_contents&id=cjE6Lw%3D%3D, 
SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542904, 
argv:{0:type=filesystem&action=get_contents&id=cjE6Lw%3D%3D}, argc:1}, POST={}, 
GET={type:filesystem, action:get_contents, id:cjE6Lw==}","SESSION={user_id:2, 
username:root, default_file_permission:RW, roots:{r1:{name:Storage, 
path:\/storage1}}, configuration_settings:{permission_update:, 
description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}","Filesystem action: [get_contents]"]}
2009-12-11 15:47:58,906 [DEBUG] Get directory contents: cjE6L2RhdGkv
2009-12-11 15:47:58,911 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&action=get_contents&id=cjE6L2RhdGkv
2009-12-11 15:47:58,954 [DEBUG] Request response: 
200/{"success":true,"result":{"directories":[{"id":"cjE6L2RhdGkvQmFja3VwLw==","n
ame":
"Backup","parent_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvQmVuY2htYXJrLw==","name"
:"Ben
chmark","parent_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvRGlzcG9zaXRpdmkv","name":
"Disp
ositivi","parent_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvRG9jdW1lbnRpLw==","name"
:"Doc
umenti","parent_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvWGJveC8=","name":"Xbox","
paren
t_id":"cjE6L2RhdGkv"}],"files":[{"id":"cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEuc
GRm",
"parent_id":"cjE6L2RhdGkv","name":"Disciplinare di 
gara.pdf","extension":"pdf","size":440041},{"id":"cjE6L2RhdGkvZ2FyZGFsYW5kLnBuZw
==","
parent_id":"cjE6L2RhdGkv","name":"gardaland.png","extension":"png","size":654584
9}]},
"trace":["REQUEST={HTTP_REFERER:http:\/\/10.0.0.10\/mollify\/client\/82A665AB10C
0B250
2A1470222E8D6AE9.cache.html, CONTENT_TYPE:text\/plain; charset=utf-8, 
HTTP_COOKIE:show_filter=true; show_inspector=true; 
MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=filesystem&action=get_contents&id=cjE6L2RhdGkv, 
REQUEST_URI:\/mollify\/backend\/service.php?
type=filesystem&action=get_contents&id=cjE6L2RhdGkv, 
SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542909, 
argv:{0:type=filesystem&action=get_contents&id=cjE6L2RhdGkv}, argc:1}, POST={}, 
GET={type:filesystem, action:get_contents, 
id:cjE6L2RhdGkv}","SESSION={user_id:2, 
username:root, default_file_permission:RW, roots:{r1:{name:Storage, 
path:\/storage1}}, configuration_settings:{permission_update:, 
description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}","Filesystem action: [get_contents]"]}
2009-12-11 15:48:02,426 [DEBUG] Get file details: 
cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm
2009-12-11 15:48:02,428 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhc
mEucG
Rm
2009-12-11 15:48:02,743 [DEBUG] Request response: 
200/{"success":true,"result":{"id":"cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm
","la
st_changed":"20091211151711","last_modified":"20091113103044","last_accessed":"2
00911
30143107","description":null,"permissions":"rw"},"trace":["REQUEST={HTTP_REFERER
:http
:\/\/10.0.0.10\/mollify\/client\/82A665AB10C0B2502A1470222E8D6AE9.cache.html, 
CONTENT_TYPE:text\/plain; charset=utf-8, HTTP_COOKIE:show_filter=true; 
show_inspector=true; MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGlu
YXJlI
GRpIGdhcmEucGRm, REQUEST_URI:\/mollify\/backend\/service.php?
type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhc
mEucG
Rm, SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542913, 
argv:{0:type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGluYXJlI
GRpIG
dhcmEucGRm}, argc:1}, POST={}, GET={type:filesystem, action:get_item_details, 
id:cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm}","SESSION={user_id:2, 
username:root, 
default_file_permission:RW, roots:{r1:{name:Storage, path:\/storage1}}, 
configuration_settings:{permission_update:, description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}","Filesystem action: 
[get_item_details]","has_modify_rights: 
item= effective=RW"]}
2009-12-11 15:48:05,462 [DEBUG] Get file details: 
cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm
2009-12-11 15:48:05,465 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhc
mEucG
Rm
2009-12-11 15:48:05,547 [DEBUG] Request response: 
200/{"success":true,"result":{"id":"cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm
","la
st_changed":"20091211151711","last_modified":"20091113103044","last_accessed":"2
00911
30143107","description":null,"permissions":"rw"},"trace":["REQUEST={HTTP_REFERER
:http
:\/\/10.0.0.10\/mollify\/client\/82A665AB10C0B2502A1470222E8D6AE9.cache.html, 
CONTENT_TYPE:text\/plain; charset=utf-8, HTTP_COOKIE:show_filter=true; 
show_inspector=true; MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGlu
YXJlI
GRpIGdhcmEucGRm, REQUEST_URI:\/mollify\/backend\/service.php?
type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhc
mEucG
Rm, SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542916, 
argv:{0:type=filesystem&action=get_item_details&id=cjE6L2RhdGkvRGlzY2lwbGluYXJlI
GRpIG
dhcmEucGRm}, argc:1}, POST={}, GET={type:filesystem, action:get_item_details, 
id:cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm}","SESSION={user_id:2, 
username:root, 
default_file_permission:RW, roots:{r1:{name:Storage, path:\/storage1}}, 
configuration_settings:{permission_update:, description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}","Filesystem action: 
[get_item_details]","has_modify_rights: 
item= effective=RW"]}
2009-12-11 15:48:08,282 [DEBUG] Get directories: cjE6Lw==
2009-12-11 15:48:08,291 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&action=get_directories&id=cjE6Lw%3D%3D
2009-12-11 15:48:08,337 [DEBUG] Request response: 
200/{"success":true,"result":[{"id":"cjE6L2F1ZGlvLw==","name":"audio","parent_id
":"cj
E6Lw=="},{"id":"cjE6L2RhdGkv","name":"dati","parent_id":"cjE6Lw=="},{"id":"cjE6L
2xvc3
QrZm91bmQv","name":"lost+found","parent_id":"cjE6Lw=="},{"id":"cjE6L3AycC8=","na
me":"
p2p","parent_id":"cjE6Lw=="},{"id":"cjE6L3ZpZGVvLw==","name":"video","parent_id"
:"cjE
6Lw=="}],"trace":["REQUEST={HTTP_REFERER:http:\/\/10.0.0.10\/mollify\/client\/82
A665A
B10C0B2502A1470222E8D6AE9.cache.html, CONTENT_TYPE:text\/plain; charset=utf-8, 
HTTP_COOKIE:show_filter=true; show_inspector=true; 
MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=filesystem&action=get_directories&id=cjE6Lw%3D%3D, 
REQUEST_URI:\/mollify\/backend\/service.php?
type=filesystem&action=get_directories&id=cjE6Lw%3D%3D, 
SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542919, 
argv:{0:type=filesystem&action=get_directories&id=cjE6Lw%3D%3D}, argc:1}, 
POST={}, 
GET={type:filesystem, action:get_directories, 
id:cjE6Lw==}","SESSION={user_id:2, 
username:root, default_file_permission:RW, roots:{r1:{name:Storage, 
path:\/storage1}}, configuration_settings:{permission_update:, 
description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}","Filesystem action: [get_directories]"]}
2009-12-11 15:48:11,066 [DEBUG] Get directories: cjE6L2RhdGkv
2009-12-11 15:48:11,078 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&action=get_directories&id=cjE6L2RhdGkv
2009-12-11 15:48:11,125 [DEBUG] Request response: 
200/{"success":true,"result":[{"id":"cjE6L2RhdGkvQmFja3VwLw==","name":"Backup","
paren
t_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvQmVuY2htYXJrLw==","name":"Benchmark","p
arent
_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvRGlzcG9zaXRpdmkv","name":"Dispositivi","
paren
t_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvRG9jdW1lbnRpLw==","name":"Documenti","p
arent
_id":"cjE6L2RhdGkv"},{"id":"cjE6L2RhdGkvWGJveC8=","name":"Xbox","parent_id":"cjE
6L2Rh
dGkv"}],"trace":["REQUEST={HTTP_REFERER:http:\/\/10.0.0.10\/mollify\/client\/82A
665AB
10C0B2502A1470222E8D6AE9.cache.html, CONTENT_TYPE:text\/plain; charset=utf-8, 
HTTP_COOKIE:show_filter=true; show_inspector=true; 
MOLLIFY_SESSION=256b4c591170cb93a0364560e837b154, 
SCRIPT_FILENAME:\/var\/www\/mollify\/backend\/service.php, 
SERVER_PROTOCOL:HTTP\/1.1, 
REQUEST_METHOD:GET, 
QUERY_STRING:type=filesystem&action=get_directories&id=cjE6L2RhdGkv, 
REQUEST_URI:\/mollify\/backend\/service.php?
type=filesystem&action=get_directories&id=cjE6L2RhdGkv, 
SCRIPT_NAME:\/mollify\/backend\/service.php, 
PHP_SELF:\/mollify\/backend\/service.php, REQUEST_TIME:1260542921, 
argv:{0:type=filesystem&action=get_directories&id=cjE6L2RhdGkv}, argc:1}, 
POST={}, 
GET={type:filesystem, action:get_directories, 
id:cjE6L2RhdGkv}","SESSION={user_id:2, 
username:root, default_file_permission:RW, roots:{r1:{name:Storage, 
path:\/storage1}}, configuration_settings:{permission_update:, 
description_update:}, 
features:{file_upload:1, folder_actions:1, file_upload_progress:, 
zip_download:, 
change_password:1, description_update:, permission_update:, 
configuration_update:}}","Filesystem action: [get_directories]"]}
2009-12-11 15:48:13,788 [DEBUG] Move 
cjE6L2RhdGkvRGlzY2lwbGluYXJlIGRpIGdhcmEucGRm to 
[cjE6L2RhdGkvRG9jdW1lbnRpLw==]
2009-12-11 15:48:13,796 [DEBUG] Request GET: 
http://10.0.0.10/mollify/backend/service.php?
type=filesystem&to=cjE6L2RhdGkvRG9jdW1lbnRpLw%3d%3d&action=move&id=cjE6L2RhdGkvR
GlzY2
lwbGluYXJlIGRpIGdhcmEucGRm
2009-12-11 15:48:13,851 [DEBUG] Request response: 200/<br />
Warning: rename(/storage1/dati/Disciplinare di 
gara.pdf,/storage1/dati/Documenti/Disciplinare di gara.pdf) [<a 
href='function.rename'>function.rename</a>]: Permission denied in 
/var/www/mollify/backend/include/files.php on line 316<br />
{"success":false,"code":0,"error":0,"details":""}
2009-12-11 15:48:13,876 [ERROR] Invalid JSON response: 200/<br />
Warning: rename(/storage1/dati/Disciplinare di 
gara.pdf,/storage1/dati/Documenti/Disciplinare di gara.pdf) [<a 
href='function.rename'>function.rename</a>]: Permission denied in 
/var/www/mollify/backend/include/files.php on line 316<br />
{"success":false,"code":0,"error":0,"details":""}
com.google.gwt.json.client.JSONException:
com.google.gwt.core.client.JavaScriptException: (SyntaxError): Unexpected token 
<
stack: SyntaxError: Unexpected token <
at dCb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:654
:110)
at s2c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:206
4:36)
at F0c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:203
9:115
)
at fvb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:442
:149)
at evb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:441
:30)
at Object.ivb [as hc] 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:444
:34)
at XMLHttpRequest.onreadystatechange 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:485
:132)
type: unexpected_token
arguments: <Caused by: com.google.gwt.core.client.JavaScriptException:
(SyntaxError): Unexpected token <
stack: SyntaxError: Unexpected token <
at dCb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:654
:110)
at s2c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:206
4:36)
at F0c 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:203
9:115
)
at fvb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:442
:149)
at evb 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:441
:30)
at Object.ivb [as hc] 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:444
:34)
at XMLHttpRequest.onreadystatechange 
(http://10.0.0.10/mollify/client/82A665AB10C0B2502A1470222E8D6AE9.cache.html:485
:132)
type: unexpected_token
arguments: <
2009-12-11 15:48:13,974 [ERROR] JSON request failed: error=Error 
'DATA_TYPE_MISMATCH' 
()

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:49

GoogleCodeExporter commented 9 years ago
As I thought, it is different issue. The actual error is 
"rename(/storage1/dati/Disciplinare di
gara.pdf,/storage1/dati/Documenti/Disciplinare di gara.pdf) [<a
href='function.rename'>function.rename</a>]: Permission denied".

So you have filesystem permission issue, ie PHP process does not have 
permissions to rename files.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 2:52

GoogleCodeExporter commented 9 years ago
how can I add that?

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 2:54

GoogleCodeExporter commented 9 years ago
This is operating system level security issue, nothing that Mollify or any 
other script can do. In a nuthsell, you 
have to give Apache/PHP user write permissions for all folders you publish, 
otherwise PHP cannot make any of 
those actions.

Usually Apache user is "www-data", but could be something else, you should 
check from your system. Then 
you have to make sure this user is owner to the folders (either as user or 
group) with chown command, and 
add proper rights with chmod command (and everything recursively, of course). 
If you have no idea what am I 
talking about, It's a bit too complex thing to explain here, so you should do 
some googling as there are tons 
of tutorials out there.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 3:03

GoogleCodeExporter commented 9 years ago
I have the idea, thanks, will try 

Original comment by andrea.c...@gmail.com on 11 Dec 2009 at 3:17

GoogleCodeExporter commented 9 years ago
OK, good. Let me know if there's something I can do.

Original comment by samuli.j...@gmail.com on 11 Dec 2009 at 3:29