Title: Warning: mime_content_type():
Last modified: October 15, 2019

---

# Warning: mime_content_type():

 *  Resolved [danielmoorehbd](https://wordpress.org/support/users/danielmoorehbd/)
 * (@danielmoorehbd)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/warning-mime_content_type/)
 * Hi,
 * I uploaded a PDF file in the WP Media section, when I open it directly, I get
   this error:
 * `Warning: mime_content_type(): Can only process string or stream arguments in/
   wp-content/plugins/advanced-access-manager/application/Core/Media.php on line
   137`
 * Any ideas what it means? Never came across it before and Google returns nothing!
 * Kind Regards

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [danielmoorehbd](https://wordpress.org/support/users/danielmoorehbd/)
 * (@danielmoorehbd)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/warning-mime_content_type/#post-12030274)
 * I fixed the issue!
 * I found that using the Hide My WordPress Plugin, this fiddles with the path on
   the front end…
 * Solution was adding:
    `RewriteCond %{REQUEST_URI} my-contents/(.*)$` into htaccess,
   so it looks like this as a whole:
 *     ```
       # BEGIN AAM Media Access Control
       <IfModule mod_rewrite.c>
           RewriteEngine On
           RewriteBase /
           RewriteCond %{REQUEST_FILENAME} -f
           RewriteCond %{REQUEST_URI} \.(pdf|doc|docx|ppt|pptx|pps|ppsx|odt|xls|xlsx|psd)$
           RewriteCond %{REQUEST_URI} wp-content/uploads/(.*)$
           RewriteCond %{REQUEST_URI} my-contents/(.*)$
           RewriteRule . /index.php?aam-media=1 [L]
       </IfModule>
       # END AAM Media Access Control
       ```
   
 * New here? Read this: [https://aamplugin.com/article/how-to-manage-access-to-the-wordpress-media-library](https://aamplugin.com/article/how-to-manage-access-to-the-wordpress-media-library)
 *  [cocacool](https://wordpress.org/support/users/cocacool/)
 * (@cocacool)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/warning-mime_content_type/#post-12047388)
 * Hi,
 * I have the same problem.
    I use Elementor and have a file in
 * . /wp-content/uploads/elementor/thumbs/150px-Coat_of_arms_of_Berlin-ofi3z58ba0smvu00f7jufefe2cqb2z2rndy3dgnrpc.
   png
 * that is not shown upon activation of the media protection.
    However the media
   protection for direct access to media files wors very well – no access being 
   logged out, access being logged in. Only said file is NOT accessible being logged
   in. If I am going for the solution mentioned by Daniel Moore, all files become
   accessible again even if not logged in. I tried to add RewriteCond %{REQUEST_URI}
   my-contents/(.*)$ as well as RewriteCond %{REQUEST_URI} wp-content/uploads/elementor/
   thumbs/(.*)$
 * what am I doing wrong?
    thanks in advance for any suggestions.
 * greetings
 * Seb.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Warning: mime_content_type():’ is closed to new replies.

 * ![](https://ps.w.org/advanced-access-manager/assets/icon-256x256.png?rev=3447421)
 * [Advanced Access Manager – Access Governance for WordPress](https://wordpress.org/plugins/advanced-access-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-access-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-access-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-access-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-access-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [cocacool](https://wordpress.org/support/users/cocacool/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/warning-mime_content_type/#post-12047388)
 * Status: resolved