SELinux

Uploading Images
If the MediaWiki directories were copied or moved to migrate from an old system to another system that has SELinux enabled (enforcing) then the copied/moved files and directories may not have the correct SELinux context types. If this is the case, image uploads and thumbnail creation could be prevented by SELinux enforcement even if the owner and permissions are already set correctly.

The includes/GlobalFunctions.php script file (and possibly other .php files in the MediaWiki install directory) must have the SELinux context type httpd_sys_script_exec_t to permits use of the PHP function.mkdir command. Without the correct context on the script, file uploads or thumbnail creation may fail on the attempt to create a hashed directory on the server. From the wiki base install directory, check for the correct SELinux context by entering the command:

ls -Z includes/GlobalFunctions.php

If the listed SELinux security context type is not httpd_sys_script_exec_t, change it with the command:

chcon -t httpd_sys_script_exec_t includes/GlobalFunctions.php

Assuming the permissions (755) and owner (usually 'apache') on the images directory are correct, the entire images directory tree must have the httpd_sys_script_rw_t SELinux context type so that scripts (.php files) running in the web server process are allowed read/write access. Check this with the command:

ls -dZ images

If the listed SELinux security context type is not httpd_user_rw_content_t, change it with the command:

chcon -R -t httpd_user_rw_content_t images

Thumbnail generation may fail with error messages like ulimit: cpu time/virtual memory/file size: cannot modify limit: Permission denied. To allow this you should enable httpd_setrlimit:

setsebool -P httpd_setrlimit 1

Pygments for SyntaxHighlight
NOTE: This section is under discussion on the | Talk page.

Extension:SyntaxHighlight use a library called pygments that provides the syntax highlight. If Syntax highlight doesn't work you may need to enable execution on the pygments folder:

semanage fcontext -a -t httpd_sys_script_exec_t '//extensions/SyntaxHighlight_GeSHi/pygments(/.*)?' restorecon -R -v //extensions/SyntaxHighlight_GeSHi/pygments/