Forbidden You don't have permission to access /appetitclic/wp-content/themes/Apc/img/logo.png on this server - image

Hello all :)
I am currently working on a WP website and a the moment I am working locally with Wampserver.
None of my pictures happen to appear on my website.
Here is the error I get when I put the image url in my browser :
Forbidden
You don't have permission to access
/appetitclic/wp-content/themes/Apc/img/logo.png on this server.
I have no problem accessing phpmyadmin and image from TewentyTwelve template work fine.
Things I have tried :
-Editing (and creating) .htaccess in wp-admin.
-Editing phpmyadmin.conf
-Puting Wamp on online mode
-Working through http://127.0.0.1/ instead of locally.
I am pretty sure the problem doesn't have to so with the code because I have access to the /appetitclic/wp-content/themes/Apc/img/ folder and I see the list of images (not working). I maybe missed one or two workarounds but I am pretty sure I tried most of the common ones.
If you need any info on my setup / configs I have tried ask away.
Thank you very much,
Cheers.

If you start your relative url with a backslash '/' that means go to the servers root folder and work up from there.
Try loosing the leading slash and see what that does.

I have that same problem when I downloaded random images for img preloading testing.
So I went to change permission from no access to read & write (if on Mac then > Get info. You shall see that permission section at the very bottom).
You might use chmod to change permission to particular users.
Hope this help.

I had the same problem today. I created a static webpage put in the html folder of my web server. It turned out that some images could not be loaded. The solution is quite simple. I just right click the image folder and changed the properties to allow readers to view the images.

Related

Trying to introduce CAS in a website uploaded to a shared host

I'm trying to make my Laravel project work on a shared host as well as it does in localhost but I don't get how to do that... I uploaded my project following the steps of this tutorial: https://www.youtube.com/watch?v=_0ixeeACvZE and it worked.
I think the problem is with the folders structure because following that video I change my public folder to the public_html folder, so I lose the first one. Two problems appear here: I can't upload an image because in localhost I used to use the path public/images to do that and now I've tried to change the path but it doesn't work... However I don't wanna focus on this, the biggest problem appears when I try to add my login structure throgh CAS...
Once more, it works in localhost but in the shared host, from the moment I add these lines of code:
#if (!Cas::isAuthenticated())
#include('login')
#else
#include('partials.nav')
#yield('content')
#endif
The system gets lost in the !Cas::isAuthenticated() method and this is what it shows:
Error
To install CAS in my site I used this https://codedog.net/2017/12/19/laravel-and-cas/ and as I said, it worked locally...
Please I really need this... any help is huge. If you need more details please just let me know.
Thank for your time

cannot show image in codeigniter

Actually, in my localhost, my website run without any problem.
However, in the living server, there are some problem of showing image.
If I put image in the web root, image can be showed in web. But if I put image into folder, image can't be showed.
Example:
/post/1/1.jpg
If I click the link directly:
http://website/post/1/1.jpg
it will be error 403. As below:
Forbidden
You don't have permission to access /post/1/1.jpg on this server.
Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Discover some hints:
If I put all files into the web root, including codeigniter framework itself.
The website run without any problem.
However, it is not the good practice. Actually, I want to put the codeigniter framework out of the web root.
Open your FTP via Filezila or any other program. navigate to your root folder and find the folder /post/ right click on it and change the select File Permissions... change it to 755 and re view the image in the browser.
Thanks for all reply.
I find the solution.
1) codeigniter framework can place out of web root without changing .htaccess file.
2) folder of image should be place under web root.
3) make sure the folder of image are 755 / 777 file permission.

Megento dev site re-directing to live site URL

I'm having a huge issue with accessing my dev site. I two magentos sites on different servers. One is the dev site, the other live. However I needed to copy the database from the live to the dev site.
Ever since i did this i've had problems with accessing the dev URL. As it keeps re-directing me to the live site. I've googled the issue and tried the following:
Accessed the 'core_config_date' and changed the unsecure/BASE_URL & secure/base_url and changed them back to the dev URL.
I then went to clear the cache on the dev site, which had already been cleared from when i was installing a plugin.
Set everything to 0 in 'core_cache_option'.
Cleared cache on my browser
But i'm still getting the issue of the site re-directing to the live URL.
I've noticed a few people had had the same problem, but the above solution doesn't seem to be working for me. Any help would be much appreciated.
Thanks
Right so managed to sort it. It was a permissions issue. I overlooked it as I didn't have a linux user setup for this site. However the folder user was set to 'root' as opposed to 'www-data'.
For anyone with this issue in the future, I strongly recommend checking permissions on the server/folder for caching.
Steps to fix the issue:
Change base URL in the 'core_config_data' table (can be found on line 5 or 6, give or take)
Check permissions on your siteroot/var folder. Delete everything from /var/session & /var/cache
Run 'chown websiteuser -R siteroot' and then 'chmod u+w -R siteroot' for permissions changes.
That should be enough to get it working.
Do the below steps in your development server :
1) Check the development server database hostname,username, password in your config.xml file in below path : app/etc/.
2) Open your live server database in any editor and find the live site url entirely.
and replace with your development server url with searched result.
above two steps will solve your issues.
here after it will now solve.
3) Check your .htaccess file in your root folder to check the any redirection rule.
Check your file permissions and set them properly so Magento doesn't end up creating a MagicCache in the system /tmp folder which is where your core configs are being cached, allowing for you to clear var/cache till the end of time and have the settings in the database never take.
All over here Can't change Magento base URL -> Stuck in cache

Localhost is no longer working properly

I just built a site using Xampp and it worked great. I just transferred my site (that I used to develop by updating to live server) to localhost, and it isn't working right at all.
The images do not show and the pages are not refreshing properly.
I had to change the CSS images to /folder/x instead of just x, which I can understand I guess, but why are my HTML images suddenly not working?
One of the pages, the paths are even absolute, but the page just isn't updating even though it's saved in the local folder.
What gives? All I did differently was added a password to root user in MySQL and tried (and failed) at some mod_rewrites, which I removed.
It points the images from localhost/ instead of localhost/folder, even adding folder/x doesn't work.
You probably forgot to convert a link or made a mistake.
Remember that /images/x.png means that it's trying to find the folder images from root and not from the current folder your site is located in. Try using ./images/x.png instead.
Perhaps you could post an example from your site?
Try looking at the Apache access logs and see whether you can find a request for an image with the wrong path.

Cannot upload images when WordPress is sat on a virtual host configuration

This is my first post to this Forum, please forgive me if this has been answered elsewhere--I did search and was unable to find an answer to my particular problem, so any help would be greatly appreciated.
I am working on a WP site for a client who wants to upload images to new posts (who doesn't hey?). In setting up the site I have done the following:
1) Enabled File Upload by CHMOD default dir to 777.
2) Changed max file size.
3) Changed allowed filetypes to include necessary file types.
When I try to upload anything I get the following error:
“Bobst Expertfold 80 110 (Dec 2010).jpg” has failed to upload due to an error
The uploaded file could not be moved to /var/www/vhosts/glossopcartons.com/httpdocs/wp-content/uploads/2010/12.
The above error mentions 'glossopcartons.com', this WP site is actually sat on glossopcartons.co.uk. It's obvious that there is some kind of virtual host configuration going on and the image is trying to be uploaded to a folder on a different domain (glossopcartons.com instead of glossopcartons.co.uk).
I don't manage the hosting, I have just been assigned with the build. However, I have access to the plesk cpanel but I dont know what I need to do?
Does anyone know what is causing this problem? The site has actually been made live and this issue has been spotted after the launch(everything worked fine on the test server), and I am scratching my head trying to figure it out.
Is there something I can put in my wp-config.php or .htaccess file to tell WP to upload to a different location.
Any help would be greatly appreciated.
Dan
First thing is 777 permisions are too loose and will get you hacked; they should be no more than 755. Hardening WordPress « WordPress Codex
For the difference in URLs: that sounds like a DNS or virtual host config, but try adding the full URL path in Settings>>Media Settings. Might not work.
Why are there sites at both domains? Why not domain forward glossopcartons.com to glossopcartons.co.uk?
Make sure PHP lets you upload files larger than what you are trying to upload.
Experienced the same problem on several old sites. This problem occurs sporadically and is not commonly occuring on other websites on the same server
Try going to your "Media Settings" page... do you see a "Store uploads in this folder" option with a long path to your uploads folder? If so... this is your problem... WordPress 3.5+ does not seem to require this long path, but more of a site relative path (which is great!)
Change your "Store uploads in this folder" to "wp-content/uploads"... when you "save settings" you should see that field disapear entirely, never to bother us again ;-)
This occured for me when my hosting provider changed the folder structure on the server making this long URL incorrect. Therefore WordPress could not find the "uploads" directory at all.
Hope that helps...
Here's some things you might want to check in case your still having problems...
Update to WordPress 3.5 +
Update all plugins
Check file permissions 755 on the uploads dir/
Check PHP version

Resources