About nixCraft

Topics

Lighttpd webserver wordpress image uploading problem - offers inline.php as download options

Posted by Vivek Gite [Last updated: June 9, 2007]

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.in
Set upload_tmp_dir to /tmp or /var/tmp:
upload_tmp_dir = /var/tmp

Next make sure web sever can write to temporary upload directory:
# 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

As usual restart lighttpd to make changes:
# /etc/init.d/lighttpd restart
# tail -f /var/log/messages

Tell us how we're doing: Please answer a few questions about your experience to help us improve nixCraft.

You may also be interested in other helpful articles:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.