Thread:Talk:MediaWiki 1.19/Thumbnails didn't work since Update to 1.19/reply (17)

Excellent work on reproducing the problem since I took too long to get back to you. Could you try this script?

<?php

function dirTest( $label, $dir ) { echo "Test for $label: $dir\n";

if( file_exists( $dir ) ) { echo "Dir exists\n"; $s = @stat( $dir ); if( $s === false ) { echo "Stat failed: $php_errormsg\n"; } else { echo "Permissions: ". decoct( $s[2] ) ."\n"; echo "Is dir: ". ( is_dir( $dir ) ? "true" : "false" ) ."\n"; echo "Is writable: ". ( is_writable( $dir ) ? "true" : "false" ) ."\n";

$file = tempnam( $dir, "test" ); echo "Attempting to create: $file\n"; $fh = fopen( $file, "w" ); if( $fh !== false ) { $written = fwrite( $fh, "stuff" ); if( $written === false ) { echo "Error when writing: $php_errormsg\n"; } else { echo "Wrote $written bytes.\n"; if( fclose($fh) === false ) { echo "Error when closing: $php_errormsg\n"; }               }                if( unlink( $file ) === false ) { echo "Error removing $file: $php_errormsg\n"; } else { echo "Sucessfully removed $file\n"; }           } else { echo "Error opening for writing: $php_errormsg\n"; }       }    } else { echo "Directory does not exist!\n"; }   echo "\n"; }

dirTest( "Unix tmp dir", "/tmp" ); dirTest( "Window temp dir", "c:/windows/temp" ); dirTest( "sys_get_temp_dir", sys_get_temp_dir ); dirTest( "upload_tmp_dir", ini_get( 'upload_tmp_dir' ) );