If you have safe_mode, an option that was deprecated in PHP 5.3 and remove in PHP 5.4, you must always be aware of:
------------------------------------------------------------------------------------------------------------
Safe mode will not permit you to create new files in directories which have different owner than the owner of the script. This typically applies to /tmp, so contrary to Unix intuition, you will not be able to create new files there (even if the /tmp rights are set correctly).
------------------------------------------------------------------------------------------------------------
This is for every script, library, CMS and every other PHP application. PHPDocX is compatible with safe_mode but of course doing needed chages to temp path and files owner
Regards.