When I click on “generate your favicon html” I get this error.
ERROR 403 – FORBIDDEN – Hostgator.
Do I need to set the permission on the .htaccess file? Where is this located on the file manager and how or what do I change it to.
With the latest versions of the plugin (v1.1.1 or v1.2.0), there is no need for the .htaccess file anymore. Could you check the version, and update if needed?
I am also having this problem. My plugin version is 1.2.1 When I developed my site offline it worked great. When I uploaded it to hostgator, the favicon went away. Using the plugin again to fix it I get the hostgator 403 page. A different site that I made offline and uploaded to siteground.com hosting did not have this issue. Let me know if you need any other pieces of the puzzle to help solve this.
I contacted hostgator and all they did was changed the permission for said error.
I was able to install the favicons.
I also tried to install the generated codes from their website, uplaoded the generated icons to my host. but it didn’t work.
Do we need the plugin to get this work work? I thought the codes and uplaoded icons would be good enough without the plugin.
Thank you for the feedback. Do you know which file or directory was modified by Hostgator to let you install the favicon?
Sure, you do not need the plugin. The process is described at http://wptavern.com/how-to-create-a-platform-agnostic-favicon , yet this is not exactly a tutorial. I suggest you to:
– Create a directory in your WP blog, for example wp-content/upload/favicon.
– Go to RealFaviconGenerator to create the favicon. In the options, indicate that you will place the files in a specific path /wp-content/upload/favicon in this example.
– Place all generated files in… wp-content/upload/favicon .
– From your WP administration area, edit header.php and insert the generated HTML code to the head section.
After all this, it should work. If that still doesn’t work, please indicate your URL here (or mail it to me at firstname.lastname@example.org) so I can review the code and check if there is no additional, onflicting code inserted by Hostgator.
As eatlovepray reported above, Hostgator support team should be able to solve the issue. Well, it is not great to have to contact support just to make a plugin work but at least you can get the whole thing fixed.
Same remark as above: if you contact them and they fix the 403 for you, I would be glad if you could indicate which file/directory was the cause of the 403 (they might give you the information… or not).
And a question: when you developed your site, do you know if the plugin put the favicon files in the root directory of your blog, or somewhere else (normally wp-content/upload/fbrfg)?
It’s fixed on my site! It did take a conversation with hostgator. Here is the relevant portion of my chat:
(11:59:33am)Colin T.:Please clear your browser cache and try the 403 page again.
(12:01:02pm)Ben Slocum:Thank you, reloading the page fixed it. Is this permanently fixed? or will I need to do something in case I want to run this plugin again?
(12:03:53pm)Colin T.:Yes this should be permanent.
(12:04:12pm)Ben Slocum:what was the problem?
(12:04:18pm)Colin T.:What happened here is that your plugin had a low priority block placed on it in the mod_security service. This is a common incident for many WordPress plugins.
(12:05:00pm)Ben Slocum:how was that block placed there?
(12:05:54pm)Colin T.:It was automatically put in place for a perceived, low level threat on the server. I have permanently whitelisted that rule at this time.
(12:06:08pm)Colin T.:Obviously there is no real threat, so it can easily be whitelisted permanently.
(12:06:29pm)Ben Slocum:but just for my account or for everyone using hostgator?
(12:08:41pm)Colin T.:Just for your cPanel username.
(12:09:47pm)Colin T.:This should not happen again as this whitelisting is permanent. I apologize for any inconvenience caused by this, but rest assured this is a fairly common occurrence and should not happen again for this account in particular.
(12:11:09pm)Ben Slocum:Is there anything that the plugin author can do so that other users hosting with hostgator do not have this problem when they attempt to use “Favicon by RealFaviconGenerator”?
(12:14:29pm)Colin T.:Unfortunately it is unlikely that there is something the author of the plugin can do short of re-configuring the security settings in place on HostGator shared servers.
To answer your question on the localhost install… it put the images in wp-content/upload/fbrfg
Hope all that helps!
I think hostgator just want to make it harder for people to get rid of the hostgator favicons. Not sure why they force their favicons on our sites.
My previous host didn’t do it.
Ah great, now I understand what’s happening!
So the short term solution is: contact Hostgator support. This is a common issue and they know how to address it easily.
The long term solution is: I’m going to contact them to understand what the security issue is. Maybe the fix is as simple as saving the favicon files in another directory.
Thank you again for the feedback, that was very helpful!
I mailed Hostgator and the support mailed me back a few hours later with a very comprehensive answer. I must say I was pleasantly surprised. I pasted it for reference at the end of this comment.
With the clues Hostgator gave me, I was able to spot the likely culprit in the plugin’s code. However, I failed at reproducing the issue on a local instance of cPanel: the plugin just worked as it was before I fixed it. As a consequence, I fixed the issue… but I don’t know if it is really fixed. Only a new user (who didn’t contacted Hostgator support about the 403 error yet) could confirm the fix works.
The fix is already available: any new user will get it when installing the plugin. But I didn’t make a new release (1.2.2) since I have absolutely no proof that the problem is solved. So this ticket will still be opened for some time.
Thank you for contacting Host Gator. We have reviewed the issue at it appears that your plug-in installs with permissions set to a configuration that is incompatible with the Apache Web Server as run under Cpanel. In the Cpanel Hosting environment directories need to be set with permissions as 755 and files must be set 755 OR 644. Any other permissions setting represents a conflict of permissions OR a security risk in our environment and the Apache web server will not execute the script(s).
We would recommend testing during install for the presence of the CPanel installation (e.g. /usr/local/cpanel/cpsrvd ) and adjusting the plug-in’s file permissions accordingly.
If you have any questions please let us know.
Linux Administrator / Security Administrator
I just got this error on a fresh install of your plugin. Let me know if you need any additional info to debug!
Edit: I had installed it before if that makes any difference.
Damn, I was hoping the latest version could get rid of this one 🙁
Are you using Hostgator? Can you access your Apache’s logs to spot the error message related to the 403?
Just in case, could you make sure you have the fix I talked about above? To do this, go to your dashboard, Plugins > Installed plugins > Favicon by RealfaviconGenerator > Edit > favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.php, then search for “mkdir” the page. You should find something like :
mkdir( $zip_path, 0777, true ). If you see the
0777, that’s fine. Else, for some reason, you didn’t get the fix.
OK I checked the “class-favicon-by-realfavicongenerator-admin.php” file and both mkdir functions were set to 0775. So I must have gotten the old version from the plugin repository somehow. I tried to change both mkdir to set permissions to 0777 but I’m still getting the error. Also my Apache log was huge! I tried searching for a number of different things I thought would show the 403 error but I couldn’t find anything. If you send me the fixed plugin, I can try it again. Thanks for putting the effort in to tackle this permissions bug!
Sorry for the very late answer… (I’m on vacation, if that can serve as an excuse :-/ )
Thank you for having chased the error in the logs. Yeah, Apache logs can be extremely boring…
Did I wrote
0777? Damn, that was
0755! 🙁 I think you had the latest version of the plugin. The problem must be caused by something else.
Regarding the Apache log, don’t you have the ability to ‘tail’ it? Like
tail -f error.log, to see only the errors as they occur? Unless your blog receives high traffic, this command should not output much data.
Further relevant information:
I had the same problem (403 permissions error + my sites are hosted by Hostgator). I checked the code in favicon-by-realfavicongenerator/admin/class-favicon-by-realfavicongenerator-admin.php but the Mkdir was set to 755 so I had the latest version and it still wasn’t working.
I used an FTP client (Transmit) to make a folder called ‘favicon’ as a subfolder of wp-content/uploads (note uploads with an S) and copied all of the png files and the browerconfig.xml file generated by realfavicongenerator.net into that folder AS WELL AS the root folder (where the wp-content, wp-admin and wp-includes folders are). So I copied them over twice. I don’t know for sure if that was necessary, but it works. I’d been copying favicon.ico into the root folder, and everywhere else I could think of, including the theme main folder (as instructed through a codex.wordpress posting) for hours and none of that had worked.
When I run the ‘check favicon’ facility on realfavicongenerator.net now, my site passes every test. Thanks.
Further, even more relevant information (can’t seem to edit my previous post).
I didn’t like my icon and wanted to update it. I uploaded the new ones first to the root directory without changing anything else. They worked.
I deleted all the old ones in the wp-content/uploads/favicon folder, didn’t upload the new ones to that folder, tested it again and my site pass all tests on the realfavicongenerator.net. So it looks like all you have to do is upload everything to the root folder and put the html in header.php. I’m confused because I thought I’d done that before and it hadn’t worked. Too many late nights.
- The topic ‘403 Error when generating Favicon’ is closed to new replies.