Odd behaviour- image manager broken, but other sites on same server fine...

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

Odd behaviour- image manager broken, but other sites on same server fine...

Post by chilsta »

Hi,

I have a couple of CMSMS sites for customers on a server and they're all working fine.

Now I finally make time to make my own CMSMS based site and it's not behaving  ::)

Everything seems to be OK, (including .htaccess pretty URLs), but the image manager just isn't playing nicely.

I can upload images fine, but thumbnails aren't being created and none of the image editing panel is working.

If I click to edit an image, it is displayed in the panel, but if I try to rotate it, Firefox displays a broken image placeholder where the rotated image should be.

I'm not getting any errors displayed.

I've got 2 sites on the same server running 1.0.2, the other's running fine.

I've compared the config files back to front, upside down and inside out- (even used the WinMerge file comparison program) the only error I found was an eronious slash in the config for the site that's working OK :D

This isn't life threatening- I don't do any image editing in the manager, tho it would be handy to see the thumbnails. I'm just a bit pithed that I can't figure this one out for myself..!

Any suggestions of futher things to try much appreciated.

TIA C*

Config file below, only the database connection info has been changed to protect the innocent...

Global Settings in the admin panel)
#after making any changes to path or url related options

#-----------------
#Database Settings
#-----------------

#This is your database connection information.  Name of the server,
#username, password and a database with proper permissions should
#all be setup before CMS Made Simple is installed.
$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'user';
$config['db_password'] = 'pass';
$config['db_name'] = 'db-name';

#If app needs to coexist with other tables in the same db,
#put a prefix here.  e.g. "cms_"
$config['db_prefix'] = 'cms_';

#Use persistent connections?  They're generally faster, but not all hosts
#allow them.
$config['persistent_db_conn'] = true;

#Use ADODB Lite?  This should be true in almost all cases.  Note, slight
#tweaks might have to be made to date handling in a "regular" adodb
#install before it can be used.
$config['use_adodb_lite'] = true;

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#e.g. http://blah.com
$config['root_url'] = 'http://computersorter.co.uk';

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/home/.beetle/chillstar/computersorter.co.uk';

#Name of the admin directory
$config['admin_dir'] = 'admin';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/home/.beetle/chillstar/computersorter.co.uk/tmp/cache';

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/home/.beetle/chillstar/computersorter.co.uk/uploads';

#Where is the url to this uploads directory?
$config['uploads_url'] = 'http://computersorter.co.uk/uploads';

#---------------
#Upload Settings
#---------------

#Maxium upload size (in bytes)?
$config['max_upload_size'] = 7000000;

#Permissions for uploaded files.  This only really needs changing if your
#host has a weird permissions scheme.
$config['default_upload_permission'] = '664';

#------------------
#Usability Settings
#------------------

#Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = false;

#CMSMS Debug Mode?  Turn is on to get a better error when you
#see {nocache} errors.
$config['debug'] = false;

#Automatically assign alias based on page title?
$config['auto_alias_content'] = true;

#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] =false;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

#--------------
#Image Settings
#--------------

#Which program should be used for handling thumbnails in the image manager.
#See http://wiki.cmsmadesimple.org/index.php ... ge_Manager for more
#info on what this all means
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';

#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = '/home/.beetle/chillstar/computersorter.co.uk/uploads/images';
$config['image_uploads_url'] = 'http://computersorter.co.uk/uploads/images';

#------------------------
#Locale/Encoding Settings
#------------------------

#Locale to use for various default date handling functions, etc.  Leaving
#this blank will use the server's default.  This might not be good if the
#site is hosted in a different country than it's intended audience.
$config['locale'] = '';

#In almost all cases, default_encoding should be empty (which defaults to utf-8)
#and admin_encoding should be utf-8.  If you'd like this to be different, change
#both.  Keep in mind, however, that the admin interface translations are all in
#utf-8, and will be converted on the fly to match the admin_encoding.  This
#could seriously slow down the admin interfaces for users.
$config['default_encoding'] = '';
$config['admin_encoding'] = 'utf-8';

#---------------------------------------------
#Use the old stylesheet logic?  It's much slower, but it works with older
#versions of CMSMS.  You'll also need this set to true if there is a module
#that uses a stylesheet callback.  Leave it as false instead you really
#need it.
$config['old_stylesheet'] = false;

# URL of the Admin Panel section of the User Handbook
$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php ... dmin_Panel';

#Enable backwards compatibility mode?  This basically will allow some
#modules written before 1.0 was released to work.  Keep in mind that this
#will use a lot more memory and isn't guaranteed to fix the problem.
$config['backwards_compatible'] = true;

#Not used anymore... kept around, just in case
$config['disable_htmlarea_translation'] = false;
$config['use_Indite'] = true;
?>
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Odd behaviour- image manager broken, but other sites on same server fine...

Post by tsw »

php version? running safe mode?
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

Re: Odd behaviour- image manager broken, but other sites on same server fine...

Post by chilsta »

PHP Version 5.1.2

Safe Mode: Off

PHPInfo's here.

Thanks

C*
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Odd behaviour- image manager broken, but other sites on same server fine...

Post by tsw »

ok, gd installation looks alright

anything in server logs?
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

Re: Odd behaviour- image manager broken, but other sites on same server fine...

Post by chilsta »

FIXED!

On further investigation I saw that the files are being generated (could've sworn I checked that before :-\) but the log is showing 403 errors on access attempts.

So then I tracked down the problem to the permissions on the CMSMS generated files, which are all set to 640.

In Admin > Global Settings, the file creation mask was set to 022- wasn't sure what that related to, so checked the help/wiki page and found "Note: You may have to change File Creation Mask (umask): from "022" to "002" to keep from getting 403 forbidden errors when trying to view generated thumbnails on your webhost."

So I tried that, and bingo!

I checked the help/wiki page for the image manager again and see that I missed the last point "Thumbnails not working?".

Weird that this is happening on one site but not another- on what I thought was the same server. I now think that the virtual host that I'm using spreads my sites across multiple machines even though they all appear to be on one, so think this must be due to 2 different machines there being configd slightly differently.

Anyway- all's good now- thanks for your help.

C*
PrettyWolfie

Re: Odd behaviour- image manager broken, but other sites on same server fine...

Post by PrettyWolfie »

That definetely worked on my Image Manager! The thumbnails were not being created. Had to reupload the images I tried to see before. Also fixed the image editing.  ;D
Post Reply

Return to “CMSMS Core”