On our internal MediaWiki (currently 1.1.0) here at Gartner, which we have recently put on a production Linux box, everything works fine except image uploads.
I uploaded several image files onto the development box successfully, and copied them over to the production box, and they display fine.
I am trying to upload a 150K image (nowhere near the hard limit of 1MB) and get the following error:
Internal error Could not copy file "/tmp/php5ZpRoX" to "/srv/www/htdocs/wiki/upload/3/31/Cyclone.jpg".
These are the current versions of the software: * Apache 2.0.48 * MySQL Ver 11.18 Distrib 3.23.54 * PHP 4.3.3 * Mediawiki 1.1.0
LocalSettings.php has uploads enabled i.e. $wgDisableUploads = false;
I tried it with the Powered by Mediawiki image from the Test Wikipedia and get a similar error: Could not copy file "/tmp/phpvyu88k" to "/srv/www/htdocs/wiki/upload/d/d4/Poweredby_mediawiki_88x31.png".
Do you know what might be causing this error? It is consistent and repeatable (except of course the tmp filename changes each time).
Thanks,
Michael Richards
PS This error is now happening on both the production and development boxes, so * something must have changed during the migration * I can't compare one with the other to determine how to fix it
On Wed, 14 Apr 2004 12:18:57 -0400, Richards,Michael wrote:
This error is now happening on both the production and development boxes, so
- something must have changed during the migration
- I can't compare one with the other to determine how to fix it
Are the image dirs writeable to the apache user (often www-data)?
On Apr 14, 2004, at 09:18, Richards,Michael wrote:
On our internal MediaWiki (currently 1.1.0) here at Gartner, which we have recently put on a production Linux box, everything works fine except image uploads.
I uploaded several image files onto the development box successfully, and copied them over to the production box, and they display fine.
I am trying to upload a 150K image (nowhere near the hard limit of 1MB) and get the following error:
Internal error Could not copy file "/tmp/php5ZpRoX" to "/srv/www/htdocs/wiki/upload/3/31/Cyclone.jpg".
Check the ownership and permissions of the upload directory and its subdirs; they must be writable by the web server (usually user "apache", or "web" or "www" or "httpd" or ...) It's easy to accidentally reset the ownership when copying files around.
Are you suppressing PHP errors, or directing them to a log file instead of web output? If there are bad permissions you should see some error messages on the mkdir() and move_uploaded_file() calls.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org