I have two servers, server A) Debian with apache2 running my app on php ( which I want to integrate with OnlyOffice)
and the other server B ) an ubuntu 14.04 with installed the document server as per instructions.
I can see a file .docx (example1.docx) and work on it .My index.php is located on A
and it's like that :
- Code: Select all
<?php
require_once( dirname(__FILE__) . '/config.php' );
require_once( dirname(__FILE__) . '/common.php' );
require_once( dirname(__FILE__) . '/functions.php' );
?>
<html lang="en">
<head>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<title>Open Office Integration Example</title>
</head>
<body>
<div id="placeholder"></div>
<script type="text/javascript" src="http://10.0.0.248/web-apps/apps/api/documents/api.js"></script>
<script>
new DocsAPI.DocEditor("placeholder", {
"documentType": "text",
"document": {
"fileType": "docx",
"key": "Khidsadrz6zTPdfd7",
"title": "example1.docx",
"url": "http://10.0.0.248/web-apps/docs/example1.docx",
},
"editorConfig": {
"callbackUrl": "http://10.0.0.248/callback.php",
"createUrl": "http://10.0.0.248/web-apps/docs",
"lang": "en-US",
"mode": "edit",
"recent": [
{
"folder": "Examples",
"title": "exampledocument1.docx",
"url": "http://10.0.0.248/web-apps/docs/exampledocument1.docx",
},
]
}
});
</script>
</body>
The file is in the directory /var/www/onlyoffice/documentserver/web-apps/docs
callback.php is served by the nginx server running on B.
I can see the files, change it and If i open the editor again changes are there. But If i open the original file it shows no changes at all.
The config has those values :
- Code: Select all
$GLOBALS['DOC_SERV_STORAGE_URL'] = "http://10.0.0.248/web-apps/docs";[b] <<--IS THIS OK??[/b]
$GLOBALS['DOC_SERV_CONVERTER_URL'] = "http://10.0.0.248/web-apps/docs"; [b]<<--AND THIS ??[/b]
$GLOBALS['DOC_SERV_API_URL'] = "http://10.0.0.248/web-apps/apps/api/documents/api.js";
$GLOBALS['DOC_SERV_PRELOADER_URL'] = "http://10.0.0.248/web-apps/apps/api/documents/cache-scripts.html";
What I'm missing ??? Please Help me, it's very important!
Thank you in advance
David