Take the 2-minute tour ×
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It's 100% free, no registration required.

I recently migrated our sites over to Nexcess EE hosting. After that I notice that some images are not showing up. Some images in certain directories work as expected, while others in the very same directory do not. Upon further investigation in the source the image paths read the following:

//chrootimages/uploads/image.png

We are expecting to see:

http://example.com/images/uploads/image.png

Has anyone seen this? What is a possible remedy?

share|improve this question
    
Need more info I think. What is the EE code that results in this? First guess is that there is a site preference not set properly. Do you have a value for Admin > General Config > URL to the root directory of your site ? What result are you expecting here? /chrootimages/uploads/image.png ? or something else? –  AllInOne Dec 26 '12 at 17:08
    
Edited with more info. Thanks! –  Dan Johnson Dec 26 '12 at 17:18
    
[edited] The problem with Ad Man was unrelated. –  Dan Johnson Dec 28 '12 at 19:59
add comment

4 Answers 4

up vote 5 down vote accepted

So it was an issue with CE-Image and the paths it uses to find images. Since we moved directories it was looking for some images in the old location and the rest in the current which is why the fact that some worked was somewhat perplexing.

Added this config setting to our bootstrap and we are looking good.

$config['ce_image_src_regex'] = array( $images_url . '/' => $images_path . '/' );
share|improve this answer
    
should in future mention that you're using something like CE Image as well ;-) –  Steven Grant Dec 28 '12 at 22:04
1  
Indeed. I should have but I didn't even think it could be the issue (at the time). Until I read about how CE Image actually works :) Thanks for the help and getting me to dig into it! –  Dan Johnson Dec 28 '12 at 22:35
1  
As stated by Kara Todd, an easier way to accomplish this is to use the: $config['ce_image_document_root'] = '/some/server/path/to/document_root/'; setting. It appears the document root that is set for the server is not pointing to the correct web root path for some reason (I bet Nexcess would be happy to correct that for you). The ce_image_src_regex solution is basically a workaround to accomplish the same thing. It works, but setting the correct document root is favorable, in my opinion, since a regular expression doesn't need to be run for each image path (and because it is simpler). –  Aaron Waldon Feb 3 '13 at 18:40
add comment

I had this issue as well, but for me it turned out be a misconfigured server "base path" issue. Which is explained in the CE Image Common Solutions docs. Setting the config variable in my (NSM) config bootstrap file solved the issue for me:

'ce_image_document_root' => NSM_BASEPATH

or as stated on the solutions page:

$config['ce_image_document_root'] = '/some/server/path/to/document_root/';
share|improve this answer
add comment

I would look at your image paths Content > Files > File Upload Prefs and make sure that your image directories have the appropriate paths.

It's a good idea to bootstrap your config for upload directories so that they work regardless of what server you're on.

share|improve this answer
    
I also highly recommend you bootstrap your config and add the file upload override settings for each of your upload directories. It'll save you a ton of time and headaches as you deploy to multiple environments. See the file upload override settings here for reference: ellislab.com/expressionengine/user-guide/cp/content/files/… –  Nuno Albuquerque Dec 27 '12 at 0:10
    
Upload prefs are bootstrapped already. All paths are correct in the control panel. –  Dan Johnson Dec 28 '12 at 18:35
    
All images also appear as expected in the CP file manager, just a few images have " /chrootimages" rather than the full path as explained in original post. –  Dan Johnson Dec 28 '12 at 18:41
    
Seems to be an issue with CE image not parsing the {made} path correctly. See if I can figure that out. –  Dan Johnson Dec 28 '12 at 18:51
add comment

I had a similar problem with CE Images -- some images working and others not after migrating to a remote Linux server. I turned on Template Debugging and found that the /~user segment of my temporary URL was messing things up. Causing Effect has the answer to this problem in their CE Image user docs here: http://www.causingeffect.com/software/expressionengine/ce-image/user-guide/common-solutions#base_path. Adding the additional lines to the config.php file fixed the base path issue for me.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.