File Uploader Directory Change

Hey, all!

I've built a website in a sub-directory and just replaced the old one with a C5 beauty, moving it up from a '/testing' directory to the root. I changed the site.php config file, cleared my cache and all the bits of advice I found on the discussion forums to make the swap as smooth as possible.

For the most part, it worked...however, I am now faced with an issue with the file uploader. It continues to upload files, images and otherwise, into the '/testing/files/' directory, and not just 'root/files/'. Also, certain files I uploaded this morning are not showing up, despite being in the 'root/files' directory. Not sure why...or how to fix it. I'm not php/js/advanced code savvy (hence my use of C5 for all those fancy functions! heh)

When I upload a file now, it counts it as being there (in the old directory) and the image will not show up in a preview, when I place it in an image block, or anything...except for when I choose to edit the image with picnic (I believe that's what it's called?)

Any idea how to get my file uploader to place all the images where they should now live and actually show up? I'm really at a loss...

View Replies:
MattWaters replied on at Permalink Reply
Hi viriesque,

Andrew and Franz took at shot at answering your problem today on the Totally Random show-- check it out around the 41 minute mark:

Essentially you'll want to take a look at config/site.php and make sure your BASE_URL and DIR_REL aren't set to the old location of the site. See if that helps!
viriesque replied on at Permalink Reply
BASE_URL and DIR_REL have already been changed, at least, to the best of my ability.

I deleted the DIR_REL line, since there's no directory besides the root for the site to deal with. Should I not have?

Also, amid clearing my cache files and such, I did not find any htaccess files. However, after using Cyberduck's handy search feature, I did find some .htaccess file that has not been updated since 3/10/10 (about a year before I build this site)

Should I delete this .htaccess file completely?

((Also, I should update my profile. Viriesque is a 'she' lol))
MattWaters replied on at Permalink Reply
Sure, or just try renaming it to something like .nohtaccess if you think it might contain stuff you don't want to lose.
viriesque replied on at Permalink Reply 1 Attachment
Alas...when I upload an image, I still get no preview in the file manager.

I'm attaching a screenshot. Maybe this will give some more insight to the problem?

You can see that the/testing/ directory is still present in the 'default location' line, there. Even though I keep deleting the /testing/ directory, it keeps showing up.

I never enabled pretty URLs, by the way. Not sure if that does or does not matter.
viriesque replied on at Permalink Reply
So, my C5 is still uploading things into an old directory that I keep attempting to delete out of it's memory. If you read above you'll see where I'm at.

Can anyone offer any insight as to WHY this is happening, or (even better) how to fix it?

The file uploader is one of the big draws to a CMS like this...I don't want to lose it.
norwalkdance replied on at Permalink Reply
I saw your post last month. You may have already fixed this yourself by now. I was having a similar problem after I moved my files from a sub-directory to the root. What I needed to do to fix it is change the "Default Location" of the File Manager's uploads. Unfortunately, I couldn't find an easy way to change this. The solution that worked for me was open my database file and search for the string 'DIR_FILES_UPLOADED' and then I replaced the path assigned to this because it was still assigned the path to my sub-directory.

Below I listed the steps that I took to change my sql file. I don't work with databases, or within cpanel everyday, so there is very likely a better way to do this but I wanted to list what I did in case someone else has a similar problem because it can be frustrating if you don't know where to go.

- Login to cpanel
- Click on the phpMyAdmin icon
- Logged into my database
- this will probably be the same database username and database password you used when you installed concrete unless you changed it for some reason
- After you login, all of your databases are listed along the left side of the page
- Clicked on the database I am using for my concrete cms
- First I clicked on Export tab(I downloaded my database file)
- At the bottom I selected the radio button for "zipped" (this downloads a .zip file of your sql database)
- Clicked "Go" button in the far bottom right corner of the page
- My file was around 4 MB it may take awhile depending on how big your file is

NOTE: Before I made any changes to this I made a copy of it locally to back it up. Just in case I've found it's better to be safe than sorry
- After I downloaded it I opened it in Dreamweaver (use Notepad or any text editor you want)
- Searched for the string 'DIR_FILES_UPLOADED' (only have one instance of this string in my file)
- In the line of code, with 'DIR_FILES_UPLOADED', I had something that looked similar to, '/home1/mynameofd/public_html/nameOfOldDirectory/files'
- If you see that the name of your old directory is still in this line this may be the cause of your problem. That was the case for me
- NOTE: This is assuming that you moved everything to your root directory like me, If this is true, you will just take out the old directory name so it now looks like, '/home1/mynameofd/public_html/files'
- This will change the default location in the File Manager uploads (that was the only thing I changed in this file)

Now I uploaded the sql file back with that one change made
- Went back to phpMyAdmin
- Clicked on the "Import" tab
- In "Location of the text file" I browsed for the sql file I changed.
- Click "Go" at the bottom right corner of the window
- It may take a few minutes to upload depending on how large the file is

When you go to the Dashboard, in the file manager to test this, if you don't see any changes right away, even after you refresh your browser, it may be because you need to clear the cache
from within the Dashboard. I think I just clicked on "Sitewide Settings" in the left column of the Dashboard and found the "Clear Cache" button and clicked it
mike80134 replied on at Permalink Reply
OK, I was having the same problem. Here is what I had to do to fix it.
Go to: Dashboard -> File Manager -> Access
In the "File Storage" section change the "Standard File Location" so that it points to the new directory. Mine was like this
changed to
Hope this helps some people as this was quite frustrating for me. Spent a couple of hours or so trying to figure out what was going on.
khunbill1 replied on at Permalink Reply 2 Attachments
I am having a similar problem. Best I can trace it to is from the day after I took my site live. All images I'd uploaded since then seem to upload fine but their thumbnails would not display in File Manager nor would those images display in blocks I put them in. I could dowmload images from File Manager to my local computer and they were fine.

All the images I have previously uploaded [before going live] display fine - it is just the new ones that I am having problems with.

Here is a look at a file I uploaded before going live followed by the same file uploaded after going live:

Last good image upload
URL to File
Location Default Location (/var/www/vhosts/

Same image uploaded after site went live
URL to File
Location Default Location (/var/www/vhosts/

Attached is a screenshot of my /root where you can see old Dir /concrete5 [october] and new Dir /concrete [january]

Should I change permissons on /concrete or change default location for images? [how?]

- if I try to add an image to a block what appears is just the image file name - see attachment 2

Thanks for any insights you can offer