Flummoxed by 500.5 server error on IIS 8 running WordPress - wordpress

I'm running WordPress on an IIS test server. Mod_rewrite is enabled and I've modified my web.config to support permalinks. c:\windows\temp has been modified to allow Modify access to both IUSRS and IIS_IUSRS.
Although the permalinks themselves work, I'm having an issue with broken images. But only SOME broken images. Any image I've uploaded myself via the media manager is broken. Any image that WP generates (e.g. the featured image), is appearing.
I've checked that the images I've uploaded actually exist in the location stated (they do) but they are showing up broken. When I try to pull the images up in the browser, I get that 500.5 error.
What am I missing?

I figured out the problem. I had permissions set right on the TEMP folder but I needed to add Modify permissions to IIS_IUSRS on wp-content/uploads

Related

Wordpress Server unable to read htaccess file, denying access to be safe

I am running wordpress on my own managed server so I have complete access to the box. The issue I'm having is that users can upload images to my image library but any uploaded are not loading due to 403 errors.
When I go directly to one of the images I get the message "Server unable to read htaccess file, denying access to be safe"
I have set the permissions on the .htaccess file and all files to 775 but it made no difference.
I also tried nuking the file and uploading a new .htaccess from a fresh wordpress download in case it was corrupted but it made no difference.
The strange thing is the images do display in one context, when you use the wordpress image editor.
Not sure what to do about this, I'm a drupal developer and only have a passing familiarity with wordpress.
Example working legacy image:
http://www.bonnybridgeanglingclub.com/wp-content/uploads/2016/06/DSC_0671.jpg
Example broken recent image:
http://www.bonnybridgeanglingclub.com/wp-content/uploads/2017/02/652-1024x640.jpg
Any help would be greatly appreciated.
It turned out the problem was that for some reason when the 2017 directory was created inside the uploads folder it was created with the wrong permissions, very odd, I've fixed the permissions and all is well now.

WordPress Upload Media to a post issue

I'm struggling from an error on WordPress 3.8.1.
Whenever I try to upload a media to a post, it does not add, it says An error occurred in the upload. Please try again later..
But the weirder thing is that it is shown on dashboard/media/library even after this issue.
I also cannot see uploaded attached media to my posts (edit post / [add media button]) / media library / uploaded to this post, but in dashboard/media/library section , these old uploaded images are shown properly that which is uploaded to what post.
I have tried the followings:
Re-installed both my local version and en_US from both update manager and manually
Deleted wp-includes and wp-admin folders and replaced them manually.
I have checked chown and chmod of the wp-content/uploads folder. To make sure they are working, I have deleted wp-content/uploads/2014 folder, and after first upload that shows this error, the folder is created with right chown and chmod and files were there (wp-content/uploads/2014/01/26/file with resolutions.jpg)
I have deleted unneeded plugins, deactivated all plugins and themes, switched back to WordPress's default plugin, I have even reset active plugins json object at wp_options from SQL, did not help.
I have enabled php error logs, nothing related is shown
I have altered the WP_DEBUG definition to true, I have even defined WP_DEBUG_DISPLAY to true, no help.
When I try to add from wp-admin/media-new.php , using multi uploader, file is freezing at "Crunching…" step, but old browser upload works flawlessly.
I'm managing the VPS and hosting the blog myself with CentOS 6.5 x64. safe_mode is set as off. There is not a mod_security option in my php.ini. My upload_max_filesize in php.ini is set to 20M, memory_limit is 256M, only 3 sites are hosted and memory is quite empty while testing these. This also happens even with 50kb .jpg images, so this should not be related.
I have re-uploaded all wordpress files from a clean downloaded zip, no help.
I have tried adding AddType x-mapp-php5 .php .php4 to the end of .htaccess as suggested here, that did not help at all.
The thing is that, I have tried a clean installation to another domain on the same server, it is working as it should.
What could be the problem? How can I fix this?
Thanks in advance,
See if custom post type has any files that are in UTF-8. If you change it to ANSI, that should help, if thats an issue.
I had the same issue, and found that there is a problem with my theme itself... try doing the same action using the twentyten theme. if that works, then take a look and see if there is any conflicting code in the functions.php of the theme...
if you are using a child theme can I suggest making another child theme, or using an alternative them as in my experience not all themes "like" being used as a child...
If you are trying to upload into a custom post-type, change the capability_type setting in your functions.php file to 'post' and it should fix your problem.
Check permissions of your wp-content or wp-content/upload folders, If folder permission is not 755 then change it to 755 and re-upload again. I hope it will solve your problem.
If you are using a low scale server and added a plugin named "WP-SmushIt" then it will surely cause an error. Reason is simple this plugin uses CPU resources to minimize the size of images in process of optimizing it and so it crosses the server limited execution time. Solution is simple-> Go with higher plan servers or try changing server execution time listed in php config file.
Not directly related to this, but I have experienced the exact same issue after moving the very same site to a different server now. Only difference is now I've been using Nginx instead of Apache. I have checked the ownerships before and they were all correct (else the normal upload wouldn't work earlier either). I'm leaving this here just as a reference.
The fix on my newer case was simply changing the ownership of the web root and all the files inside.
Nginx and PHP5-FPM were running with same user: www-data, which is at the group with same name: www-data.
So changing of all the ownership of the files fixed in this case:
su
chown -R www-data:www-data /path/to/wordpress/root/
And the issue was gone.
I still don't know the original reason of my old issue, I had to wipe, start from clean and restore the posts, plugins etc. from scratch.
I was facing same issue in wordpress like media not loaded in popup. then i have resolved.
I think, Some times problem created by ajax response.Means ajax response comes with some additional content.
Wordpress media popup is loaded content by ajax(json Response) and ajax give response with some content like style and other.
For Example:-
<style>
.class{}
</style>
then json(ajax response).
So First check your ajax response in console.We have to disable all plugins then check it is work or not.If no then activate default theme. because content comes from plugin and theme.
check your folder permission, and mod_security settings, also try to increase max_execution_time and memory,

WordPress and Windows IIS Server Problems

I am currently working on a WordPress project on a remote IIS server. I consider myself well versed in the use of WordPress, however, most of my previous projects have been on Apache servers and I am really running into problems on the IIS server.
I have contacted the host, and made sure that I have the correct file permissions. However, I cannot upload files or edit themes/plugins from the WordPress backend.
For example, when I use the WordPress theme editor panel, I make changes in the text, but when I click save there is no "Your changes have been saved message" and the file is just reverted to what it was before.
When I try to upload an image inside a post, I receive the following message:
The uploaded file could not be moved to C:\xxx\wwwroot\xxx.com\www\dev/wp-content\uploads.
I notice the slash to the right of dev is incorrect, but I cannot figure out how to change this. I have tried defining this in the wp-config file with several different variations with no luck. For example, I have tried adding define('UPLOADS', '\wp-content\uploads') and I have also tried using the absolute path.
Does anyone have any idea how I can fix this? I need to get this squared away as soon as possible, but I am not sure where to go from here. Any advice is appreciated.
Thank you for reading.
.
.
.
Edit
I have tried altering the "upload_path" via wp-admin/options.php with no success, and the following results:
When I try the absolute path, C:\xxx\wwwroot\xxx.com\www\dev\wp-content\uploads, I get the following
The uploaded file could not be moved to C:\xxx\wwwroot\xxx.com\www\dev\wp-content\uploads.
When I try wp-content\uploads in the "upload_path", I get the following
The uploaded file could not be moved to C:\xxx\wwwroot\xxx.com\www\dev/wp-content\uploads.
Chris's Blog » Wordpress upload permissions on IIS 7 Fix or Google for the IIS6 fix:
...You need to give the IUSR account Read/Write/Modify permission on
your wp-content folder.... and you need to give the IIS_IUSRS group
Read permissions on your “C:\Windows\Temp” folder.
See 10 Reasons Why Not to Host Your Wordpress Blog on a Windows/IIS Platform
you need to give php temp dir full permissions (iusr) (network service) c:\winnt\temp is the default upload dir before it moves to the wp site so this has to be set
in php admin (in iis applet) u can change the temp dir if your not liking the fact its in your NOS dir
next issue u will have is max_fileupload size also in php admin
iis works great best if your the admin of the server to quickly make the needed changes

Bring Live Drupal site to Local Host

I've made a local version of my companies live website. My problem is that none of the links work and I can't sign into the admin control panel. I think it has something to do with clean-urls module. Any Ideas? The error I'm getting is url request was not found on this server.
If you made a full copy including the database, you must clear all caches, e.g. directly in the database, or using the Devel-Module. If no other settings have changed in the .htaccess, and there is no fixed url given in the settings.php (the $base_url), it should work.

Permalinks not working for wordpress MU, images not showing up - .htaccess Problem

I moved 3 different wordpress installations to one single Wordpress MU.
Every thing except Permalinks are not working and images are not loading on the webpages.
Image URL style
http://subdomain.domain.com/files/2009/05/image.gif I get 404.
but if change i change it to wp-content/blogs.dir/4/files/2009/05/image.gif It works perfectly fine.
I tried almost everything with .htaccess file.
My mod_rewrite is active.
I am setting up this on an EC2 Instance.
Pls help.
Are you are using suPHP as your PHP handler? If so and you have all of your files set to executable, then this could trigger your problem.
Under suPHP you must have strict and secure file permissions (644 for files, 755 for directories) or else your site will not function as you intend it to. Using suPHP also runs php as the domain's user rather than nobody, which is another security gain.

Resources