Try the fastest and simplest way to install ONLYOFFICE

Error editing file with the PHP example

Any issues about docs (uploading, editing and etc.)

Error editing file with the PHP example

Postby luis.mas » Wed Aug 26, 2015 9:03 am

Hi everyone,

I've installer OnlyOffice Document Server using docker without problems. In fact, I can access Docker IP and use Document Server and everything works fine.

I'm currently developing an integration with another application developed in PHP. So I downloaded the PHP example, configured it and I'm getting an error. Can you help me? Thanks!!! :cry:

These are the steps I've followed to make the things work:

1. Download de PHP example zip file from here:
2. Configure an Apache VirtualHost with the URL
3. Modify /etc/hosts file to add the URL to
4. Uncompress it and modify the config.php file with my configurations ( is the Docker IP and 8080 is the Docker mapped port):

Code: Select all

define('WEB_ROOT_URL', '');

$GLOBALS['FILE_SIZE_MAX'] = 5242880;

$GLOBALS['MODE'] = "";

$GLOBALS['DOC_SERV_VIEWD'] = array(".ppt",".pps",".odp",".pdf",".djvu",".fb2",".epub",".xps");
$GLOBALS['DOC_SERV_EDITED'] = array(".docx",".doc",".odt",".xlsx",".xls",".ods",".csv",".pptx",".ppsx",".rtf",".txt",".mht",".html",".htm");
$GLOBALS['DOC_SERV_CONVERT'] = array(".doc",".odt",".xls",".ods",".ppt",".pps",".odp",".rtf",".mht",".html",".htm",".fb2",".epub");




$GLOBALS['ExtsSpreadsheet'] = array(".xls", ".xlsx",
                                    ".ods", ".csv");

$GLOBALS['ExtsPresentation'] = array(".pps", ".ppsx",
                                    ".ppt", ".pptx",

$GLOBALS['ExtsDocument'] = array(".docx", ".doc", ".odt", ".rtf", ".txt",
                                ".html", ".htm", ".mht", ".pdf", ".djvu",
                                ".fb2", ".epub", ".xps");

if ( !defined('ServiceConverterMaxTry') )
    define( 'ServiceConverterMaxTry', 3);

if ( !defined('ServiceConverterTenantId') )
    define( 'ServiceConverterTenantId', '');
if ( !defined('ServiceConverterKey') )
    define( 'ServiceConverterKey', '');


5. Access to and it shows the upload form
6. Upload one .doc file and it uploads ok
7. Click in "Edit" button and finnaly I get this error:

Code: Select all

Code: Select all

Code: Select all
Posts: 8
Joined: Wed Aug 26, 2015 8:55 am

Re: Error editing file with the PHP example

Postby luis.mas » Thu Aug 27, 2015 7:25 am

Ok so I found the error and apply the solution. The problem was the config file: the server converting and server api URL's where pointing to not to my local server.

You can close the post! :)
Posts: 8
Joined: Wed Aug 26, 2015 8:55 am

Return to Documents

Who is online

Users browsing this forum: No registered users and 4 guests