Moved to live server - no images?

8 posts by 4 authors in: Forums > CMS Builder
Last Post: March 8, 2010   (RSS)

Re: [jimbly2] Moved to live server - no images?

By Damon - March 5, 2010

Hi Jim,

The issue is that the image paths from your testing server are stored in the database and don't match the live server paths.

The way to fix it is do a "search and replace" on your database to replace the old image path with the new one.

Here is what you do:
1. Backup your database from within CMS Builder - Admin > General Settings.
2. Download the backed up database to your computer.
3. Open your database in a text editor and carefully do a search and replace. Find the old image path and replace with the new one.
3. Upload it again and restore it from within CMS Builder.

Important: Create and keep an additional uneditted backup of your database that you can use to restore if needed.

We are looking at ways to have an automatic way to change this in the future.

I hope this helps. Let us know if you have an questions.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] Moved to live server - no images?

By jimbly2 - March 6, 2010

Hi Damon,

..thans for your response - I tried doing exactly as you said - all went smoothly - but no difference :-( No thumbs, no Images - I don't know what else to try - . any other ideas? Do the paths have to be absolute or can they be relative? This is the path I'm using:

/home/nawcorgu/public_html/cmsAdmin/uploads/

I'm also not clear on the difference between the 'upload directory' and the 'upload folder url'?

I have another two projects waiting which I was going to use CMS Builder on, but I'm a bit anxious now!

Cheers Damon

Re: [jimbly2] Moved to live server - no images?

By gkornbluth - March 6, 2010 - edited: March 6, 2010

Hi Jimbly,

Images can be tricky.

I don't use usually a test server, (images are one of the reasons) and it's good to hear that the folks a IT are working on an automated fix for this issue.

Meanwhile, here are a few other ideas that might get you going.

You probably know this part already, but the path to your image upload folder is stored in 2 fields in the "general" section of your admin panel. Make sure that the path points to your new server and not the test server.

The actual image location information (not the images) is stored in a separate database table called “yourprefix_upload”.

That said, if the easy fix didn't remedy your issue, open a section editor with an upload field and upload a few test images to your live server.

Note that the data may change slightly for each section editor's images. (I'm not sure, so to be safe upload a few new images to at least 2 sections before you change any data.)

Download the “yourprefix_upload” database table and make a backup copy of it.

Then look through the entries in the “yourprefix_upload” database. When you find the path names and location info fields for the new images, paste that information into the columns of data as appropriate.

Replace the old “yourprefix_upload” database table with the new one and with luck, you should be good to go.

Hope that points you in the right direction,

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Moved to live server - no images?

By jimbly2 - March 7, 2010

Hi Jerry,

thanks for taking the time to help - I have done as you suggested - uploaded new test images in two different sections - neither show up, but I carried on. Looking in the CMS_upload table, I found the new entries for the test images, which was the path I would expect them to have had (i.e., /home/nawcorgu/public_html/cmsAdmin/uploads ) but I don't see how copying that path, which doesn't work, to the other images will move me forwards?

Thanks again,

Jim

/home/nawcorgu/public_html/cmsAdmin/uploads/



/home/nawcorgu/public_html/cmsAdmin/uploads/

Re: [jimbly2] Moved to live server - no images?

By jimbly2 - March 7, 2010

Just to update - I managed to get to see the images by inserting the full web address in the add/edit image dislog box, but only by then hitting 'update'. If I try and browse for an image it says '* *.*whatever directory doesn't exist" ( i.e., whatever directory I put in it says it doesn't exist, so I can't actually upload any pictures or see any on the server now, though it will see the ones that are already uploaded if I put the filename in. This all seems so much more difficult than it needs to be - and as a consequence my site is still not deliverable.

Lesson learnt - don't use a test server. Any other ideas on how to fix this? [unsure]

thanks

Jim

Re: [jimbly2] Moved to live server - no images?

By gkornbluth - March 7, 2010 - edited: March 7, 2010

Jim,

This is really outside the box for me, but make sure that:

1) the path to Upload Directory and Upload folder URL in the Admin > general is correct? Based on mine yours should probably be something like:

for the Upload Directory
/home/nawcorgu/public_html/cmsAdmin/uploads/ and for the Upload folder URL /cmsAdmin/uploads/

2) You don't have a custom upload directory specified in your upload field under advanced options.

3) The folders that the error message and the folders in step 1 (and or 2) are the same and you've verified that the folders actually do exist. (if not, after you've tried to upload another image, try creating the missing folders if they still do not exist.)

Don't know where that will get you but they're the only ideas that I can think of.

The gurus (Dave, Chris, Damon, Donna) are pretty good at monitoring these posts but if none of this works, you might try e-mailing Dave@interactivetools.com, tell him that you're still stuck and ask him to look at this post.

Good luck,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [jimbly2] Moved to live server - no images?

By Donna - March 8, 2010 - edited: March 8, 2010

Hi Jim!

The difference between the URL and the path is basically from where you're viewing it. The path is the full server path -- that's the /home/nawcorgu/public_html/cmsAdmin/uploads folder.

The URL is just what the web browser needs, relative to the document root which is your public_html directory. So, the URL would just be:

/cmsAdmin/uploads/

The URL is basically the part that comes after (or could even include) the www.yoursite.com part.

Let me know if that fixes that up for you, and if not feel free to fill in a support request and I can take a look directly for you:

https://www.interactivetools.com/support/email_support_form.php
Donna

--
support@interactivetools.com