Images not displaying in live website - magento

I have live the magento version 1.6.1.0. Live website doesn't uploading the Product image and other images. Under Media folder no images are not displaying in website. I have changed the File Permissin to 755 and 644 but still the images are not displaying. Any one identify my problem and Provide solution for this..

Depending on your server configuration, permission 755 for media/ may not be enough.
If you uploaded Magento with your FTP user, this user is the owner of media/.
If your webserver user (the user which handles the HTTP requests, e.g. www-data) is not in the same user group, he won't have write access.
If you make the webserver user the owner of media/, should be enough.
If you put both users into the same group, permission 775 will suffice.
If this is not possible, you may change the permission for media/ to 777. Every user will be able to write to the directory. Try to avoid this because of security issues.
You may experience the same problem with the directory var/.

I've also had this issue, where Google Chrome would fail to upload images to my production site. I did as Matthias has suggested and ensured the permissions were set correctly...still had no luck.
I tried using Internet Explorer to upload the image and it worked. I suggest trying a different browser.
Magento uses Flash to perform the upload...if a different browser does not work, it might be that you do not have the latest version of the flash plugin? You can view which version you have by visiting Mozilla's plugin check. This works on all major browsers.
Finally, if none of this works for you, you can try the No Flash Image Uploader extension...

Related

Magento product upload images are not appearing

I'm uploading products to my Magento store but products are not being displayed.
I can upload the image using the admin area and when managing my products I can see the images there, but once I go to the front end I just get the Magento logo where the product image should appear.
This has been happening since my server migration so I'm not sure if its related or not.
There are many things that could be causing this issue, but here's a few things for you to look into:
On the Product Information page in your admin backend, under 'Images', make sure the radio buttons have an image selected for 'Base Image', 'Small Image', 'Thumbnail', and that they aren't 'Excluded'
Make sure the product images exist under /media/catalog/product/ (relative to your document root)
Make sure the /media directory is in your Apache web server's group (usually 'www-data' or 'httpd'). Magento also needs to be able to write to this directory, so you can run this command to set those permissions:
sudo chmod -R 775 /path/to/magento/media
In System->Configuration->General->Web, make sure "Base Media URL" is correct under both "Secure" and "Unsecure"
Just rename .htaccess to .htaccess-old inside media directory in Magento Root Directory.
You need to do the following to get this right:
Recursively change permissions -r or via ftp set media folder to 777
Make sure your server has curl, image gd enabled and refresh magento cache
Just adding more information to help: if your SELINUX is enabled, you need additional setup. Here you can find some information http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-installing#install-prereq-selinux
try this code:-
Might be you are not adding below line:-
$_product=Mage::getModel("catalog/product")->load($_product->getId());
Even though late, Hope it will help for someone
If its still not showing even after all the above tweaks. Try to reduce the size of the image to few KBs and try. It worked for Me.:)
For me the issue was php7.0-gd extension. Once I installed it image appears without a problem.
sudo apt-get install php7.0-gd
sudo service apache2 restart

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

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

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.

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

HTTP error when uploading an image using default Flash Uploader in Wordpress

I am getting an HTTP error while uploading an image using the flash uploader, for all users except the admin user. The error is occuring even with users that have administrative priviledges.
Since the admin user does not get an error I doubt is would be a directory security issue - nevertheless I recusively chmoded the uploads directory to 777.
To make things even more strange, I have another blog, using the same plugins and template (through symbolic links) where all authors can upload new images.
The files from both blogs are identical, except for the wp-config that contains different DB and language settings. The blog giving the error in set to fr_FR i18n.
Any help would be greatly appreciated.
This still sounds like a permissions issue. Let me ask you this, what type of hosting environment do you have? Shared, dedicated, semi-dedicated? Sometimes the shared environment blocks you from actually changing the chmod permissions. If you do have the ability to successfully change permissions, chmod 777 for your uploads directory should work, unless your public/php user is impersonating another user account. Could this be the case?
Are the environments the same between both blogs?
What is the error code/message you get when trying to upload with a user other than the admin?
Do you have your uploads directory set properly in your miscellaneous settings? If so, can you view these images at their direct location after uploading them with the admin account?
Sorry pose more questions, but I think it will help narrow it down a little more.
Acorn

Resources