Writable by the web server

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

"$wgEnableUploads = true;"

Um, I didn't find that the above line was necessary in my LocalSettings.php file.

I uncommented the line "$wgDisableUploads = false;", made sure that php.ini had "file_uploads = On" instead of "Off", and made sure the directory was writable by the web server.

To do this last step, see who owns the web server (on a linux/unix system, type "ps -ef|egrep httpd" to see the owner - it will probably be "apache"), and then chown the directory used for uploads ($wgUploadDirectory value in LocalSettings.php) to that user. I left the folder as 0755 mode (writable only by the owner, readable by the rest of the world) and it works just fine.

Where is the php.ini file located?[edit]

It varies depending on many factors. If you have shell access to the machine, you can try this command at the shell prompt:

  • locate php.ini

Otherwise try these popular locations:

  • With php4: /etc/php4/apache/
  • Fedora 5: /etc/php.ini
  • Red Hat Enterprise Linux 5: /etc/php.ini