 | |  |
 |

rcrofoot
User
Apr 14, 2008, 4:51 PM
Post #1 of 22
(786 views)
Shortcut
|
|
trying to implement a new DNS-url/link addresses won't change...
|
Can't Post
|
|
Hi Dave- We just changed the DNS to the site I've been working on...I changed all urls/links to the new ones...except I noticed the code from CMS Builder still contains the old address... I think this may be the offending code...specifically $record['_link'] and $upload['urlPath']...do I need to change an address in CMS to fully implement this change...Sorry, I'm lost on this one: <td width="255px"> <a target="_parent" href="<?php echo $record['_link'] ?>"> <!--load this variable in order to test for no main photo--> <?php $uploadList = getUploads($options['tableName'], 'main_photo', $record['num']); ?> <?php if (empty($uploadList)): ?> <img src="images/nophoto.jpg" width="255" height="170" border="0" /><br/> <?php endif ?> <?php foreach (getUploads($options['tableName'], 'main_photo', $record['num']) as $upload): ?> <?php if ($upload['isImage']): ?> <img src="<?php echo $upload['urlPath'] ?>" width="255" height="170" border="0" /><br/> <?php endif ?> <?php endforeach ?> </a> </td> Thanks, Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 14, 2008, 4:59 PM
Post #2 of 22
(785 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Have the relative directory path from your website root changed? Unless you've checked "[_] Save full URL for local links" under Admin > General it shouldn't have the http domain part of the url. Let me know what it's outputting in the source code and what you'd like it to output (or post an url if you can) and we'll see what can do to get it working again quick for you. Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 14, 2008, 7:18 PM
Post #3 of 22
(778 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Dave- I'm not sure what question to ask... The DNS used to be http://www482.pair.com/decaro/kellyassociates/ and this line of code worked as expected: <a target="_parent" href="<?php echo $record['_link'] ?>"> The DNS was changed to http://www.kellyassociates.com and now I have to use an absolute address: <a target="_parent" href="http://www.kellyrealestate.com/<?php echo $record['_link'] ?>"> This line seems to work ok without an absolute address: <img src="<?php echo $upload['urlPath'] ?>" width="255" height="170" border="0" /> My questions: Where do '_link' and 'urlPath' come from? Are they PHP server variables...I'm now wondering if I have to change to the new DNS in the PHP config file... Please let me know if you need access to anything, and I'll send the info to dave@interactivetools.com... Thanks, Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 15, 2008, 8:58 AM
Post #4 of 22
(760 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
It's probably the filepath, not the DNS. So if you used to have your images in say /decaro/kellyassociates/images/ it's coming to look for them there on the new domain: http://www.kellyassociates.com/decaro/kellyassociates/images/ You can confirm that by right-clicking on a broken image on the new site and selecting properties to see the url the image is trying to load from. The quick fix would be to just upload your images to that same folder on the new site /decaro/kellyassociates/images/ If that doesn't work (or isn't appropriate) feel free to email me details and we can work on another solution. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 15, 2008, 3:31 PM
Post #5 of 22
(752 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Dave- I don't know why I'm so confused by this... So, what you're saying is, determine the address through the properties window of a broken image, and move the images there...Then I would have to change the upload directory in CMS to that directory...Correct? Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 15, 2008, 3:44 PM
Post #6 of 22
(750 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
You would have to change the upload directory, but it might make the most sense to do that and have all the uploads together. So previously if all the files were uploaded to /decaro/kellyassociates/images/ then that's the path that is stored in the database for those uploads. It doesn't store the domain name by default because you might change domains. So since you moved domains it's still looking for the images in /decaro/kellyassociates/images/ but they're not there on this new domain. Hope that makes sense. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 15, 2008, 4:15 PM
Post #7 of 22
(748 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Dave- My appologies in belaboring this, but my knowledge regarding domains is next to nothing...Before I make any changes, maybe your response to this will help me understand a bit more of what's going on... The original site my employer set up was (is) located at: /usr/www/users/decaro/kellyassociates That's where I upload all my program files...It contains "images", "css", "inc" folders, etc...It is the website root... The URL I used to view finished web pages was: http://www482.pair.com/decaro/kellyassociates/ A few days ago he told me he had changed the DNS to http://www.kellyassociates.com, and that any absolute addresses in my code should be changed to this new address. (By the way the photos uploaded by CMS Builder are located at: /usr/www/users/decaro/cmsAdmin/uploads) I think my mental dilema is that everything is still in its original place...The only thing that's changed is that there's been an additional "pointer" (http://www.kellyassociates.com) created which point to the same place: http://www482.pair.com/decaro/kellyassociates/ Maybe I have to stop analyzing so much and just try your suggestion... Thanks, Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 15, 2008, 4:49 PM
Post #8 of 22
(746 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Rick, What's happening is it's still looking in the old path /decaro/cmsAdmin/uploads/ but since the domain has changed it's now looking here: http://www.kellyassociates.com/decaro/cmsAdmin/uploads/ instead of here: http://www482.pair.com/decaro/cmsAdmin/uploads/ Just imagine you have an image tag like this: <img src="/decaro/cmsAdmin/uploads/image.jpg">. If you can easily copy the uploads folder from /usr/www/users/decaro/cmsAdmin/uploads to /usr/www/users/decaro/kellyassociates/decaro/cmsAdmin/uploads/ that might be a quick fix because then the same path will exist on both sites. The other option would be to modify the upload paths in the database. You could do that with a program like PHPMyAdmin. Hope that helps! Sorry it's so confusing! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 15, 2008, 5:13 PM
Post #9 of 22
(744 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Dave- But to my understanding, http://www.kellyassociates.com and http://www482.pair.com/decaro/kellyassociates/ both point to the same physical location on the server...nothing on the server's been changed or moved...Both URLs translate to the same IP address... Maybe there are two "/decaro" 's in the address, because in the uploads table the "urlPath" field contains data such as "/decaro/cmsAdmin/uploads/IMG_2108.jpg" and the address "http://www.kellyassociates.com" really points to "/usr/www/users/decaro/kellyassociates"...Now that I think about it more, I'd have to back out 1 directory to have "cmsAdmin/uploads" available...i.e. it's not available from "/usr/www/users/decaro/kellyassociates", but it is from "/usr/www/users/decaro"...If this seems correct logic to you, do you think it would be possible to create a "/decaro" directory within "http://www.kellyassociates.com", and create within that new directory, the existing structure and contents of cmsAdmin/uploads??? Thanks again, Rick Hi Rick, What's happening is it's still looking in the old path /decaro/cmsAdmin/uploads/ but since the domain has changed it's now looking here: http://www.kellyassociates.com/decaro/cmsAdmin/uploads/ instead of here: http://www482.pair.com/decaro/cmsAdmin/uploads/ Just imagine you have an image tag like this: <img src="/decaro/cmsAdmin/uploads/image.jpg">. If you can easily copy the uploads folder from /usr/www/users/decaro/cmsAdmin/uploads to /usr/www/users/decaro/kellyassociates/decaro/cmsAdmin/uploads/ that might be a quick fix because then the same path will exist on both sites. The other option would be to modify the upload paths in the database. You could do that with a program like PHPMyAdmin. Hope that helps! Sorry it's so confusing!
|
|
|  |
 |

rcrofoot
User
Apr 15, 2008, 9:15 PM
Post #11 of 22
(740 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Dave- I create a "/decaro" directory within "http://www.kellyassociates.com", and copied within that new directory, the existing structure and contents of cmsAdmin/uploads, and got it to work! So all existing data displayed correctly from the appropriate directory... Then in CMS in "General/Admin Settings", I changed the "Upload Directory" from "/usr/www/users/decaro/cmsAdmin/uploads/" to "/usr/www/users/decaro/kellyassociates/decaro/cmsAdmin/uploads/", and was able to create a new record and input data and upload photos...At this point however, while still in the new record (before saving it), I couldn't see the thumbnails of the photos I has just uploaded...But when I saved the data, went to the site, and looked at the record, everything was there and all links operational...And when I went back to CMS and looked again at the record, the text data was present, but the photos wouldn't render to thumbnails... So, I went to "General/Admin Settings" again and this time changed the "Upload Folder URL" from "/decaro/cmsAdmin/uploads/" to "/decaro/kellyassociates/decaro/cmsAdmin/uploads/", but still couldn't get the thumbnails to display properly... Any idea how I can get those thumbnails to display??? Also, I think the whole problem was created when I was told to create a new directory off the root, and use that as the "new" root, after CMS had already been installed...The ideal solution I think would be to re-install CMS off the new root, and then again copy all existing data files to "cmsAdmin/uploads/"...What do you think? If you've read this far, I have great respect for you! Many thanks as always, Rick Hi Rick, If this seems correct logic to you, do you think it would be possible to create a "/decaro" directory within "http://www.kellyassociates.com", and create within that new directory, the existing structure and contents of cmsAdmin/uploads??? Yes, I think that's worth a shot. Try copying the contents of: /usr/www/users/decaro/cmsAdmin/uploads to /usr/www/users/decaro/kellyassociates/decaro/cmsAdmin/uploads/ And let me know if that fixes it.
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 15, 2008, 9:23 PM
Post #12 of 22
(739 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Rick, Want to move this over to email and I can login and have a look? It might be quicker? Can you send me FTP and CMS login details to dave@interactivetools.com. I'd be happy to take a look for you and figure out this last little bit so we can get it working again for you. Let me know how I can best help. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 16, 2008, 7:55 AM
Post #13 of 22
(723 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Dave- Thanks for working so late on this...I did some testing last night, and everything seems to work great! It's in the hands of the client now... For me I think the lesson learned here is to make sure CMS is installed at the proper location...With the original DNS, I had to add on 2 directories to get to the web root...With the final DNS those 2 directories were built-in, so there's no way I could back out (easily) to reference where CMS was installed...and all my data... Also, when I copied the cmsAdmin folders and data to the new location, was that considered a valid install??? Is there anything I need to change, such as in the PHP config file??? Thanks again for ALL your help...! I learned alot in the process... Rick
|
|
|  |
 |

rcrofoot
User
Apr 16, 2008, 8:51 AM
Post #14 of 22
(720 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Dave- I have one other concern re: what we were working on...When I "X-out" the old cmsAdmin directory, I get a Warning and a Fatal Error notice regarding the same line which is: require_once "/usr/home/decaro/public_html/cmsAdmin/lib/viewer_functions.php"; This code (the path) is probably looking in the old directory to access the DB...Can this path be changed to the new location somehow, or does CMS need to be "officially" re-installed to its new location??? Thanks, Rick
|
|
|  |
 |

rcrofoot
User
Apr 16, 2008, 9:27 AM
Post #16 of 22
(719 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Dave- I'm trying to figure out the "require_once" fatal error problem...For now (and to keep my client happy) I re-enabled the original cmsAdmin directory, and things seem to be working fine...Just wondering why that old cmdAdmin directory would be needed at all at this point... The require_once code looks like it has an absolute path: require_once "/usr/home/decaro/public_html/cmsAdmin/lib/viewer_functions.php";...so it should be able to access "viewer_functions.php" OK...It would seem like "viewer_functions.php" contains code to reference the old cmsAdmin directory instead of the new one...I haven't looked inside yet... Have to go out until around 2pm... Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 16, 2008, 9:34 AM
Post #17 of 22
(718 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Rick, Good call. Yes, the require_once paths in the viewers will need to be updated as well. I missed that one! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 16, 2008, 3:19 PM
Post #18 of 22
(714 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Dave- I'm going to make the path revision to the require_once statement in a while, after my Connecticut client is sure to be off the site...In the meantime here's what I'm about to do: Here's the original require_once statement: require_once "/usr/home/decaro/public_html/cmsAdmin/lib/viewer_functions.php"; which I'm going to cange to: require_once "/usr/home/decaro/public_html/kellyassociates/decaro/cmsAdmin/lib/viewer_functions.php"; What confused me at first was the presence of "public_html" in the root, but from what I can determine this simply represents "www/users/decaro"...So, I could also use as a path in the require_once statement: "/usr/www/users/decaro/kellyassociates/decaro/cmsAdmin/lib/viewer_functions.php" Before I make the change, does this sound right to you??? Also, it seems to me that CMS in the new location was dealing with some functionality, but CMS in the old location was handling viewer functions...Everything that needed to be accomplished was done, but it was being done by the double install of CMS... Any feedback or suggestions would be helpful... Thanks, Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 16, 2008, 3:24 PM
Post #19 of 22
(713 views)
Shortcut
|
|
Re: [rcrofoot] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Hi Rick, Sounds right, but the quickest way to double check is to go into the code generator on the new install and see what it comes up with for the require_once line. Just copy that. And just try one at a time. This pathing thing sure has been complicated! Glad it's working for you now. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

rcrofoot
User
Apr 16, 2008, 3:34 PM
Post #20 of 22
(712 views)
Shortcut
|
|
Re: [Dave] trying to implement a new DNS-url/link addresses won't change...
[In reply to]
|
Can't Post
|
|
Great idea! I'll let you know how it turns out... Rick
|
|
|  |
 |

rcrofoot
User
Apr 16, 2008, 5:29 PM
Post #21 of 22
(709 views)
Shortcut
|
|
Re: [rcrofoot] all addresses/paths seem OK now...
[In reply to]
|
Can't Post
|
|
Dave- I took the require_once statement from the viewer code and did a search & replace in my pages, and everything appears to be working 100%... Thanks for helping & talking me thru all this...I've learned alot... Rick
|
|
|  |
 |

Dave
Staff
/ Moderator

Apr 17, 2008, 9:13 AM
Post #22 of 22
(699 views)
Shortcut
|
|
Re: [rcrofoot] all addresses/paths seem OK now...
[In reply to]
|
Can't Post
|
|
Glad we could help! :) Dave Edis - Senior Developer interactivetools.com
|
|
|  |
|