![]() |
getting pics out of db
this may seem like a dumb question, but i was wondering if i could get a walkthrough on this. i have read all the posts concerning this and couldnt get a real straight answer. i have all my images in my database and want to put them in a "file system" how can i do this, i saw no option in phpmyadmin to do so. am i missing it? i have phpmyadmin version 2.4.0 and mysql version 4.0.20. im really lost on this, any info would be greatly appreciated.
Thanks in advance, Josh |
Re: getting pics out of db
Quote:
Josh, here, is how to do it. do not use phpMyadmin. 1.- Login into your store admin section. 2.- Make sure you create the folders on your server for the Thumbnails and the Detail Images and giving the proper permission if you have a UNIX server. 3.- Select "Images location" Product thumbnails 4.- Store images in "File system" 5.- Type the path of your thumbnails (i.e. ../xcart/files/thumbnails) Detailed product Images 6.- Store images in "File System" 7.- Type the path of your detail images (i.e. ../xcart/files/details) 8.- Select "Submit" buttom 9.- now create a file name ".htaccess" in the folder that has your Thumbnails and details Images as well. 10.- the htaccess file should have the following line of code Code:
Allow from all 12.- upload the .htaccess file to both of your folders where your images are. and that will do it. If you have any question please drop me a line Kind regards, Ricky |
thank you very much for your insightful walkthrough ricky.
Thanks, Josh |
Glad it help you. and maybe some other ones will need it too.
Kind regards Ricky |
Re: getting pics out of db
Hi rjc,
This is great... I'm also a "newbie"... Have tried to do this... but I keep getting the message... Warning: fopen(_htm/home/maxtarco/public_html/store/files/master/t_3.jpg): failed to open stream: No such file or directory in /home/maxtarco/public_html/store/admin/images_location.php on line 136 Warning: Cannot modify header information - headers already sent by (output started at /home/maxtarco/public_html/store/admin/images_location.php:136) in /home/maxtarco/public_html/store/include/func.php on line 181 but I'm not sure what this means or what I'm doing wrong. All my image files (like 8416.jpg) are located in .../store/files/master Also... I've uploaded my products in a product file with the .jpg file name in the thumbnail field. Can you help? thanks, Aragorn :) Quote:
|
Quote:
Quote:
kind regards? Ricky |
Good tip from rjcbear.
People need to understand that for some reason, X-Cart thought it would be really funny to have the default .htaccess file include the text: Code:
Deny From All So, you must change it or create a new file. I simply edited it, and copied it to my two image folders (Thumbnails & Detailed Images) that I have created under the .../xcart/files/ directory. Also, you won't see the .htaccess files on most FTP programs. They are hidden files. I have to use my Control Panel File Manager application (off of my hosted server) to see them. |
Arggghh this is driveing me crazy!!
I've followed the instructions to the letter. chmod folders (thumb & full) in files removed the deny from all .htaccess file uploaded allow access from all to both the thumb and full folders set file location to use filesystem set location to usr/home/xxxxxx/public_html/files/images/full/ (xxx being the account name on my server) click submit and I get Code:
LOG CREATED: 2004-10-07 17:06:08 then click on the continue link from the error log and although the same file location is still in the input box the datbase or file selection drop down has reverted back to database The stupid thing is that i've got it working for the thumbnails (dont ask me how) but not for the detailed images Following on from the above, i just changed the category icons to filesystem and that worked fine as well, the only problem im having this with is the detailed images This is on version 4.0.3 |
Quote:
Did you check your permission codes? I think the BD is having trouble writing to the folder you specify. Hope this will help. Kind regards Ricky |
yup checked, doubled checked, triple checked.
deleted the directory recreated it, chmod 777 using wsftp still no go :cry: |
Ok i've found out that it just won't export from the database to the filesystem BUT if i delete all detailed images from products and then change the image location and then upload a detailed image it WILL then place it into the file system.
Very, Very strange |
Quote:
the reason was that its where your downloadable products get stored if you sell that kind of stuff |
thanks!
Wow, thanks for this quick how to. It worked perfectly for me!
One question though. The files are still in the db under 'xcart_images' as well (I only moved the detailed images). When it moves the images from db to the file system, does it not automatically delete them from the db? I'm trying to bring the size of my database down. If not can I delete them and how? thanks, j |
Re: thanks!
Quote:
use the checkbox that says 'store only in this location' something like that :wink: |
Re: thanks!
Quote:
Ok, figured it out. I did a OPTIMIZE TABLE xcart_images and it cleared it down to the correct size :) |
Help!!!
I try everything for import my images and I follow all the steps that you wrote here...but doesnt work. When I run the process it show me:
16177 /home/httpd/vhosts/swansterling.com/httpdocs/files/thumbs/DD0001.gif Success #16181 /home/httpd/vhosts/swansterling.com/httpdocs/files/thumbs/DD0002.gif Success #16185 /home/httpd/vhosts/swansterling.com/httpdocs/files/thumbs/DD0005.gif Success #16179 /home/httpd/vhosts/swansterling.com/httpdocs/files/thumbs/DD0010.gif Success etc etc but when I see the products dont show me the images...what happen? what I am doing wrong? |
missing images
I followed the instrucctions to move my images to file system,
I puut them outside .../store/files, then I realized I would not be able to see them when I was modifying or creating a product, so I changed them to 'store/files/detailed' and 'store/files/thumbnails' I had no problems doing that, but now when I click on a product the detailed image do not appear, any ideas how can I fix this? Thanks |
add .htaccess file to images directory with this in it
Code:
Allow from all |
This post saved me a LOT of time. Thanks guys!
|
Glad we can help.
Kind regards, Ricky |
Hello all,
I'm trying to get the images to be stores NOT IN FILES directory, I want the here. WEB ROOT ..IMAGES/Thumb ..IMAGES/detail ..XCART DIR So, the directory for the images is at the same directory level as x-cart. I see how I can change the template files to display the to the customer. BUT, why does the full paths that are asked (durring import, products and detail images) for not being used, if they HAVE to be in the x-cart/FILES directory, why ask for the full path? Also, I did a complete install of the V4.0.11 and the config.php had that extra last line feed inthe config.php - no one fix that for how many versions..?? Any input/direction/enlightenment would be greatly appreciated. Mark |
Mark,
When you are importing your images using a cvs file X-cart uses the path to find and load the images into the DB. Once they are loaded in the DB they get assing a name that has to do with your product number and after you take them out of your DB they will be named as follows: t_######.jpg for thumbnails d_#####.jpg for detailed images I hope this will help you Kind regards, Ricky |
My images were never in the database - I CANT toooo many for even for temp (10MB database size limit) So I want to import right into the file system.
But, thanks, I think what I needed to know is that (if I am correct?) The paths asked at import ARE ONLY for importing and NOT for displaying? In other words; The full path to images specified durring product and detail image import, are ONLY to read and insert BLOB into the database when 'Stored in database' option is used. Am I understanding correctly? Thanks Mark. |
OK, I followed the first post exactly, but everything failed...anyone have any ideas???
Thanks! Danielle |
Quote:
Hi, I had exactly the same problem affecting the thumbnail directory having already added images to the database. The only way I could remove thumbnail images from the database in order to set up an image file directory was to install phpMyAdmin and truncate the xcart_thumbnails table in mysql. This cleared the images and allowed me to change the image location in xcart from database to file directory. Works fine now. DB |
And then you had to reupload all your pics right???
|
Can someone help me with this? I am trying to switch my pics to the file system, but they keep saying failed. My permissions are 777. I really do not want to have to reupload all my pics as I have a TON. Does anyone know I make the switch?
Thanks! |
Whew OK I finally got them to move and it says success. BUT, the images are all still in my database. I tried the optimize table thing suggested earlier in this thread and it did nothing. Even worse, I tried deleting a few of the images from the database manually, and now the thumbnail isn't showing. I looked and all the images are in the file system like they're supposed to be. Why aren't they showing on the product?
Thanks! |
Make sure they successfully transferred. You should now have images in your Files directory, and the Images location should say File System.
|
Yep, the images are in the folders in the file system and the image location says file system. It all worked perfectly except that the images are still coming from the database, because if I delete an image in the database, it makes the product image disappear.
|
I don't know if this will help anyone here, but I have just performed the dreaded move images to the file system (if only we knew this when we started). Anyway, when I first did it, I thought that the images were still in the DB and as others have done, deleted them only to find they were no longer in the shop.
My point is this, when I checked carefully, it only appears that the images are still in the DB, when in fact they are now just references to the images now on the server. The DB no longer has the massive Blob data just the new file locations, so should be smaller. Like others, I was worried about doing this operation with the fear of it failing and having to reload tons of photos, but followed the help here and it was fine. Paul Dodman e-business consultant Lumino Internet luminointernet.co.uk |
I am glad that help you.
Now you can always look at your logs to see if they were moved from the DB to the FS. If it did not move it will be label as "FAILED" Kind regards, Ricky[/b] |
I'm getting ready to move images out of the DB. Below is the current stats:
# products: ~3000 Thumbnails: 34MB Images: 113MB Those that have successfully moved to the filesystem are there any problems with larger stores? Am I going to have to worry about timing out or anything with these numbers? I'm of course going to backup before doing this but I wanted to ask first. thanks! |
Ok, I tried this on a backup which went OK without any problems so I did it on the live site. No problems and my DB has changed from ~190MB to ~30MB.
Thanks again for all your help! Now I just have to change my cron job to zip up the images weekly.. |
Here is my issue, we created a new website called exercise wisdom and xcart (ver 4.0.10), we have an existing website called vitaman cafe with an older cart (ver 3.5.1), we have now decided that we want to take our old cart, that is on a different site, and delete is and install a new cart (ver 4.0.10) export all the data and images from the exercise wisdom site and import it into the newer vitaman cafe site.
Is this possible, whats the easiest way? We tried and were able to export the csv but doesnt contain paths to images, we also managed to export the images and copied them over thanks to these posts. The images were originally stored in the database. We were able to import the products but not the images. I could use some help :?: :?: |
Hi all like everyone I attempted the move from db to fs. Followed instructions as directed. Here are the errors that I receive:
Warning: Cannot modify header information - headers already sent by (output started at /home/simply4/public_html/config.php:666) in /home/simply4/public_html/referer.php on line 61 Warning: Cannot modify header information - headers already sent by (output started at /home/simply4/public_html/config.php:666) in /home/simply4/public_html/include/get_language.php on line 134 Warning: Cannot modify header information - headers already sent by (output started at /home/simply4/public_html/config.php:666) in /home/simply4/public_html/include/get_language.php on line 135 Can someone please lend a hand none of my store's images are appearing. :( Thanks |
Log on to cpanel, go into this file:
Quote:
And make sure there are no blank lines at the end. If there are, delete them, save it, and then try again :) |
Thanks guys the problem was resolved the 'config.php' file had several blank lines at the end. Removed them and its working again. :D
|
Wonderful!!! Isn't it nice when it's an easy fix :D
|
All times are GMT -8. The time now is 10:57 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.