X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Forum FAQs and guides (https://forum.x-cart.com/forumdisplay.php?f=30)
-   -   getting pics out of db (https://forum.x-cart.com/showthread.php?t=8438)

Joshshift 07-13-2004 11:51 AM

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

rjcbear 07-13-2004 01:38 PM

Re: getting pics out of db
 
Quote:

Originally Posted by Joshshift
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


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
11.- Make sure the file you created does not have any extention if it does rename it.
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

Joshshift 07-13-2004 02:35 PM

thank you very much for your insightful walkthrough ricky.

Thanks,
Josh

rjcbear 07-13-2004 02:43 PM

Glad it help you. and maybe some other ones will need it too.

Kind regards
Ricky

Aragorn 08-19-2004 12:43 PM

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:

Originally Posted by rjcbear
Quote:

Originally Posted by Joshshift
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


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"
10.- the htaccess file should have the following line of code
Allow from all
11.- Make sure the file you created does not have any extention if it does rename it.
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


rjcbear 08-19-2004 01:45 PM

Quote:

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
I had that occured to me once and the way i was instructed to fix it was to go to the "func.php" file and make sure there was no blank spaces after the las "}" in the line. I took them out and did not have the problem any more.


Quote:

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
with regards of the above are you trying to import your products or your detail images?

kind regards?
Ricky

Jason @ streetwerke 09-25-2004 02:18 PM

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.

cotc2001 10-07-2004 08:06 AM

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
Product detail images
Location: FS

usr/home/xxxxxx/public_html/files/images/full/d_5.jpg - Failed
usr/home/xxxxxx/public_html/files/images/full/d_6.jpg - Failed
usr/home/xxxxxx/public_html/files/images/full/d_7.swf - Failed
usr/home/xxxxxx/public_html/files/images/full/d_10.jpg - Failed


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

rjcbear 10-07-2004 08:52 AM

Quote:

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

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

cotc2001 10-07-2004 09:03 AM

yup checked, doubled checked, triple checked.

deleted the directory

recreated it, chmod 777 using wsftp

still no go :cry:

cotc2001 10-07-2004 10:54 AM

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

shan 10-07-2004 03:04 PM

Quote:

Originally Posted by Jason @ streetwerke
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.


the reason was that its where your downloadable products get stored if you sell that kind of stuff

giantpeach 11-20-2004 03:24 AM

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

shan 11-20-2004 03:35 AM

Re: thanks!
 
Quote:

Originally Posted by giantpeach
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


use the checkbox that says 'store only in this location'

something like that :wink:

giantpeach 11-21-2004 01:21 AM

Re: thanks!
 
Quote:

Originally Posted by shan
Quote:

Originally Posted by giantpeach
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


use the checkbox that says 'store only in this location'

something like that :wink:


Ok, figured it out. I did a OPTIMIZE TABLE xcart_images and it cleared it down to the correct size :)

dianaal 11-24-2004 09:25 PM

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?

rvargas 12-17-2004 08:07 PM

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

shan 12-18-2004 05:20 AM

add .htaccess file to images directory with this in it

Code:

Allow from all

Taffy 01-17-2005 08:26 PM

This post saved me a LOT of time. Thanks guys!

rjcbear 01-17-2005 08:31 PM

Glad we can help.

Kind regards,
Ricky

mark_d 02-04-2005 08:38 AM

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

rjcbear 02-04-2005 09:23 AM

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

mark_d 02-04-2005 09:29 AM

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.

Danielle 02-06-2005 07:44 PM

OK, I followed the first post exactly, but everything failed...anyone have any ideas???

Thanks!
Danielle

Dybbuk 02-24-2005 08:12 AM

Quote:

Originally Posted by cotc2001
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


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

Danielle 02-24-2005 02:15 PM

And then you had to reupload all your pics right???

Danielle 02-27-2005 08:31 AM

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!

Danielle 02-27-2005 08:46 AM

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!

balinor 02-27-2005 08:49 AM

Make sure they successfully transferred. You should now have images in your Files directory, and the Images location should say File System.

Danielle 02-27-2005 08:55 AM

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.

pauldodman 03-01-2005 04:59 AM

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

rjcbear 03-01-2005 09:54 AM

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]

nfc5382 03-12-2005 02:56 AM

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!

nfc5382 03-23-2005 03:18 PM

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..

PersonalizedFitness 04-27-2005 08:53 AM

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 :?: :?:

jedak 06-13-2005 08:16 PM

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

Danielle 06-13-2005 08:23 PM

Log on to cpanel, go into this file:

Quote:

Originally Posted by jedak
/public_html/config.php


And make sure there are no blank lines at the end. If there are, delete them, save it, and then try again :)

jedak 06-13-2005 08:38 PM

Thanks guys the problem was resolved the 'config.php' file had several blank lines at the end. Removed them and its working again. :D

Danielle 06-13-2005 08:49 PM

Wonderful!!! Isn't it nice when it's an easy fix :D


All times are GMT -8. The time now is 08:16 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.