Skip to content

Engineering Tech Blog

Menu
Menu

Allowing doc and docx files to be uploaded to PHP server

Posted on August 20, 2026August 20, 2026 by aschenbach

Trying to write some simple application using PHP 8.4.x w/Apache 2.4.x w/mariadb recently. Ran into a snag on allowing Ms-Docx files to be uploaded to a local temp dir then into a physical location. After some configuration with httpd.conf file to allow both doc and docx extension inside httpd.conf file.

Next, the mime_mod module should be enabled along with uncomment out the mod_type file.

make sure docx extension is uncomment out in this mime.types file.

Finally, check your php.ini inside your php installation to allow the following items.

That should enabled the upload of doc and docx files onto a temp location in your OS from aspect of the programming software. The php code would now need to check for its mime type for both doc and docx extension. Your temp location will be different from my custom location within PHP.

Category: Blog, php

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • WordPress 7.1 with themes
  • CMake Config with Visual Studio on lighttpd
  • Allowing doc and docx files to be uploaded to PHP server
  • FreeBSD in VMPlayer
  • GhostBSd on VmPlayer

Recent Comments

No comments to show.

Archives

  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026

Categories

  • Blog
  • chromebook
  • Code
  • linux
  • php
  • python
  • ruby
  • windows
  • wordpress
© 2026 Engineering Tech Blog | Powered by Minimalist Blog WordPress Theme