You can easily upload small files but large upload fails and offers inline.php as download option.
This error is caused because of improper php configuration. Make sure upload_tmp_dir is set and webserver user such as httpd/nobody/lighttpd can write to this directory.
$ grep upload_tmp_dir /etc/php.ini
$ grep -iR upload_tmp_dir /etc/php/
Set upload_tmp_dir to /tmp or /var/tmp:
upload_tmp_dir = /var/tmp
session.save_path = "/var/lib/php/sessions"
Next make sure web sever can write to temporary upload directory (only use this in chrooted jail):
# chown lighttpd:lighttpd /var/tmp
Now you should able to upload files. A final note if you need to upload files larger than 2MB set maximum allowed size for uploaded files using upload_max_filesize directive:
upload_max_filesize = 5M
Save and close the file. As usual restart lighttpd to make changes:
# /etc/init.d/lighttpd restart
# systemctl restart lighttpd
# tail -f /var/log/messages
# tail -f /var/log/lighttpd/error.log