5

have an MSM site that I’ve just moved from test to production and we’re white screening on the front-end. I suspected CE Image straight off - commented out my tags and sure enough, the site loaded sans images. I’ve set 128M for CE Image via the config file and then inside index.php we’ve got

$assign_to_config['global_vars'] = array(); // This array must be associative
$assign_to_config['global_vars']['ce_image_document_root'] = '/home/user/public_html/msm-site/';
$assign_to_config['global_vars']['ce_image_src_regex'] = array();
$assign_to_config['global_vars']['ce_image_made_regex'] = array();
$assign_to_config['global_vars']['ce_image_encode_urls'] = 'no';
$assign_to_config['global_vars']['ce_image_disable_xss_check'] = 'yes'; 

This works fine on the test server (although we didn’t set the memory limit on test). Interestingly though, the config file editor in the CP is showing ce_image_memory_limit set at 64 and even changing it there isn’t allowed. Where’s it going wrong?

2
  • Have you tried commenting out any of your code which you aren't using? Also, where are your non-msm configs at, could $config['ce_image_memory_limit'] = 64; be set there and why you aren't able to change it in the CP?
    – Natetronn
    Commented Nov 17, 2012 at 19:49
  • Did any of the answers help you? If yes, please mark the answer correct by clicking on the checkmark to the left of the answer.
    – Anna_MediaGirl
    Commented Dec 22, 2012 at 6:28

2 Answers 2

5

You need to fill in the array for all of your domains that are part of MSM. I copied this from config.php for a 9 site MSM install and reduced it to just 3 sites to demonstrate:

// ce_img stuff here
$config['ce_image_src_regex'] = array(
  '^http://maindomain.com/' => '/var/www/vhosts/maindomain.com/httpdocs/',
  '^http://domain1.com/' => '/var/www/vhosts/domain1.com/httpdocs/',
  '^http://domain2.com/' => '/var/www/vhosts/domain2.com/httpdocs/'
);

Once you fill in the correct domains and server paths, you should be good to go.

3

So it turns out to be a server issue where GD support hadn't been enabled in PHP.

Enabled that, kept the same code and we're golden :-)

1
  • 1
    Just as a future reference for others that stumble across this post, there is a CE Image Compatibility Verification Script that can be downloaded and run on your server to ensure your server meets the requirements to run CE Image. It can be useful to run that before using CE Image (or EE) on a server for the first time. Commented Feb 6, 2013 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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