Images Won't Display

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
savageideas
Forum Members
Forum Members
Posts: 22
Joined: Wed Jun 21, 2006 3:16 pm

Images Won't Display

Post by savageideas »

I'm running CMSMS v1.1 on Apache and when I try to upload via Image Manager the script appears to execute correctly but the images won't display. Furthermore, when I click on the image in Image Manager and try to view it I get the following error:

Forbidden
You don't have permission to access /uploads/images/CareHerewebsite.png on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


The folder permissions are currently set to 0776. Any help you can give me would be GREATLY appreciated.
Pierre M.

Re: Images Won't Display

Post by Pierre M. »

Hello,
savageideas wrote: I'm running CMSMS v1.1...
This is a savage idea, isn't it ?
Using 1.1 when 1.2.2 is available, with bugs and security breaches fixed.
1.2.x is the last supported version before 2.0.

Pierre M.
savageideas
Forum Members
Forum Members
Posts: 22
Joined: Wed Jun 21, 2006 3:16 pm

Re: Images Won't Display

Post by savageideas »

A bit of a rude reply, isn't it? I installed 1.1 less than 4 weeks ago.
savageideas
Forum Members
Forum Members
Posts: 22
Joined: Wed Jun 21, 2006 3:16 pm

Re: Images Won't Display

Post by savageideas »

I've upgraded the installation to 1.2.2 but the images still won't display...
Pierre M.

Re: Images Won't Display

Post by Pierre M. »

Hello,

sorry if I have been rude. You must agree you must run supported versions if you ask for support. Volunteers don't remind all bugs in all versions.
Thank you for having upgraded to latest 1.2.x.

I hadn't seen this : please check /uploads and /uploads/images have 777 permissions.
Now, "usual questions" : hosting, modules, settings (GD? main phpinfo?), http logS, precise steps to reproduce, warnings/errors seen with debugON...

Pierre M.
nomikon
New Member
New Member
Posts: 7
Joined: Thu Dec 06, 2007 3:05 pm

Re: Images Won't Display

Post by nomikon »

Hello.

I'm having the same problem here: Images in /uploads/img don't display. Some days ago I sent a post about what I thought it was some CSS related problem with Image Manager module (I'm a novice  :-\). However, I'm unable to get -both included in content or in the Image Manager- any new images I have uploaded. In Image Manager there are links to the stored images and the path looks as correct, but it returns a 403 error from Apache. However, it doesn't seem a permission problem but a path-related one.

I'm using 1.2.2 and both /uploads and /uploads/images have 777 permissions. Looking at the Apache error logs it seems there is a problem building the adequate path, because it's looking for /usr/local/uploads, but it should be looking for /usr/local/www/cms/uploads instead:

[Mon Dec 24 17:44:12 2007] [error] [client xxx.xxx.xxx.xxx] client denied by server configuration: /usr/local/uploads, referer: http://my.own.server/lib/filemanager/Im ... s.php?dir=

That is, it looks as images.php is losing in some way the base path, or replacing it with '/usr/local'. From there, I pressumed there was some configuration problem, but as far as I know, all path related settings are fine:

$config['root_url'] = 'http://my.own.server';
$config['root_path'] = '/usr/local/www/cms';
$config['previews_path'] = '/usr/local/www/cms/tmp/cache';
$config['uploads_path'] = '/usr/local/www/cms/uploads';
$config['uploads_url'] = $config['root_url'] . '/uploads';
$config['image_uploads_path'] = '/usr/local/www/cms/uploads/images';
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images';

I have mod_rewrite enabled ($config['assume_mod_rewrite'] = true;) . Each time I attempt to get an image the Apache log shows a lot of rewrite warnings as the following ones:

[Mon Dec 24 18:03:16 2007] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Mon Dec 24 18:03:16 2007] [warn] RewriteCond: NoCase option for non-regex pattern '-d' is not supported and will be ignored.

However, deactivating mod_rewrite and removing .htaccess files don't make any change about the image problem. Activating debug doesn't help, too: it shows only db related steps, but no path errors.

My setup: Apache 2.2.6, PHP 5.2.5, GD 2.0.35, PostgreSQL 8.1.10, FreeBSD 6.2

Any help?

Regards,
NK.
Last edited by nomikon on Mon Dec 24, 2007 7:11 pm, edited 1 time in total.
nomikon
New Member
New Member
Posts: 7
Joined: Thu Dec 06, 2007 3:05 pm

Image display fails when CMSMS is the server document root (Re: Images Won't...)

Post by nomikon »

Hi,

I have found some odd things about that weird problem I posted yesterday:

1 - In the failing setup, I run CMSMS in a virtual server so CMSMS stuff is the document root and settings look as:

    (Apache document root is set to '/usr/local/www/cms'  for that virtual server)
    $config['root_url'] = 'http://my.first.server';
    $config['root_path'] = '/usr/local/www/cms';

2 - I just did a CMSMS fresh install (using a new database) on a test folder within another virtual server; that is:

    (Apache document root is set to '/usr/local/www/html')
    $config['root_url'] = 'http://my.second.server/cms';
    $config['root_path'] = '/usr/local/www/html/cms';

With this setup all goes fine; I'm able to see the uploaded images in Image Manager and they display correctly within a page which includes some of them.

3 - I then attempt a new fresh install on another test virtual server, using again CMSMS directory as document root, just to discard any possible mistakes I could make on the first failing setup:

    (Apache document root is set to '/usr/local/www/cms'  for that virtual server)
    $config['root_url'] = 'http://third.server';
    $config['root_path'] = '/usr/local/www/cms';

Images fail again. Note that it's a fully fresh install (using a new database as well), so only logo1.gif is in the /uploads/images directory, but it doesn't display, showing only the file name. I don't even use pretty URLs.

4 - Finally, I move the first CMSMS failing installation (where I already had some pages and uploaded images) to a new document root in the same server (and edit the configuration settings where appropriate), that is:

    (Apache document root is now set to '/usr/local/www/html')
    $config['root_url'] = 'http://my.first.server/cms';
    $config['root_path'] = '/usr/local/www/html/cms';

All goes right again.

So, it looks as that images display fails only when the CMSMS directory is being used as Apache document root. Note however that failing behaviour affects only to images display. All other functions go fine.

Any ideas about that problem?

Regards,
NK.
Last edited by nomikon on Tue Dec 25, 2007 7:28 pm, edited 1 time in total.
Pierre M.

Re: Images Won't Display

Post by Pierre M. »

Hello nomikon,

thank you for reporting your issue (and logs) so precisely. I hope a dev will have a look at the Image Manager to make it work under all circonstances.

As you seem to be a PostgreSQL-FreeBSD Guru I'm sure you can setup a rewriting reverse proxy to have a working instal in a subdirectory but URLs still seen as if it were in the root folder ;)

Have fun with CMSms

Pierre M.
Post Reply

Return to “CMSMS Core”