paths to uploads not working on new server

6 posts by 2 authors in: Forums > CMS Builder
Last Post: June 2, 2010   (RSS)

By paulmac - June 2, 2010

Hi

I'm just moving server at the moment and having some trouble getting the path to my upload directory working correctly.

I haven't moved my domain to the new server yet so I have a temporary link to view the site and upload my files.

The test path to view the site I have been given from the new hosting company is:

http://ipaddress/~mydomain/

What I have setup in CMS under Directories & URLS is as follows:

Program Directory /home/mydomain/public_html/cmsAdmin

Upload Directory /home/mydomain/public_html/cmsAdmin/uploads/

Upload Folder URL /cmsAdmin/uploads/

I can actually upload files and they do get placed in correct directories, the problem is they don't display on the front end of the site, the path generated in the html to an image (front end) is http://ipaddress/cmsAdmin/uploads/thumb/test.jpg.
I can see the image if I check the following code: http://ipaddress/~mydomain/cmsAdmin/uploads/thumb/test.jpg

Not sure if I'm doing something silly here, tried a number of variations on the paths, but none seem to work.

Thanks for any help

Re: [paulmac] paths to uploads not working on new server

By Jason - June 2, 2010

Hi,

Which field are you using to output the path? For thumbnails, there are 2: 'thumbFilePath' and 'thumbUrlPath'. The thumbUrlPath would be a relative path, so it would probably be the best to use.

Are you putting anything before you output the path?
Once you move your domain name completely, will the URL path be the same as it was on the old server?

Let me know and we'll see what we can do.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [paulmac] paths to uploads not working on new server

By Jason - June 2, 2010

Hi,

I mean how the path is actually being outputted to the page. It would be the php code inside your img tag.

It might look something like this:

<img src="<?php echo $upload['urlPath']; ?> " />

If you can find this, let me know what's there.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] paths to uploads not working on new server

By paulmac - June 2, 2010

Hi Jason

this is the code that is generated:

http://ipaddress/cmsAdmin/uploads/thumb/test.jpg

Using this the image is not found.

If I put the following code in the browser it shows the actual image


http://ipaddress/~mydomain/cmsAdmin/uploads/thumb/test.jpg

So the image is actually uploading, but the path isn't correct.

Re: [paulmac] paths to uploads not working on new server

By Jason - June 2, 2010

If you could attach your .php file, or if you don't want to post it, email it to me at jason@interactivetools.com. I can take a closer look for you.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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