OS Info:
Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-104-generic x86_64)
Linux pydio 4.4.0-104-generic #127~14.04.1-Ubuntu SMP Mon Dec 11 12:44:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Diagnostic Results:-
Client : Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0
Command Line Available : Yes
DOM Enabled : Yes
Exif Enabled : Yes
GD Enabled : Yes
Upload Max Size : 128M
Memory Limit : 128M
Max execution time : 30
Safe Mode : 0
Safe Mode GID : 0
Xml parser enabled : 1
MCrypt Enabled : Yes
Server OS : Linux
Session Save Path : /var/lib/php5
Session Save Path Writeable : Yes
PHP Version : 5.5.9-1ubuntu4.19
Locale : C
Directory Separator : /
PHP APC extension loaded : No
PHP INTL extension loaded : Yes
PHP Output Buffer disabled : Yes
PHP File Uploads enabled : Yes
Magic quotes disabled : Yes
Upload Tmp Dir Writeable : Yes
PHP Upload Max Size : 134217728
PHP Post Max Size : 134217728
Users enabled : Yes
Guest enabled : No
Writeable Folders : [<b>cache</b>:true,<br> <b>data</b>:true]
Zlib Enabled : Yes
Apache Log when error occurs at file upload
[Tue Jan 09 10:40:59.960733 2018] [:error] [pid 17601] [client 192.23.10.104:41572] PHP Parse error: syntax error, unexpected '.', expecting ']' in /usr/share/pydio/core/vendor/zendframework/zend-diactoros/src/UploadedFile.php on line 21, referer: xxx
Therefore I tried to change the code as below
class UploadedFile implements UploadedFileInterface
{
//const ERROR_MESSAGES = [ //Remarked for debugging
ERROR_MESSAGES = [
UPLOAD_ERR_OK => 'There is no error, the file uploaded with success',
UPLOAD_ERR_INI_SIZE => 'The uploaded file exceeds the upload_max_filesize directive in php.ini',
UPLOAD_ERR_FORM_SIZE => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form',
UPLOAD_ERR_PARTIAL => 'The uploaded file was only partially uploaded',
UPLOAD_ERR_NO_FILE => 'No file was uploaded',
UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder',
UPLOAD_ERR_CANT_WRITE => 'Failed to write file to disk',
UPLOAD_ERR_EXTENSION => 'A PHP extension stopped the file upload.',
];
I tried to fix it but failed, and finally got the following error.
[Tue Jan 09 10:57:39.115139 2018] [:error] [pid 23869] [client 172.23.11.204:43294] PHP Parse error: syntax error,
unexpected 'ERROR_MESSAGES' (T_STRING), expecting function (T_FUNCTION) in /usr/share/pydio/core/vendor/zendframewor
k/zend-diactoros/src/UploadedFile.php on line 17, referer: xxx