Image manager upload file permission problem Topic is solved

General project discussion. NOT for help questions.
Post Reply
al4445

Image manager upload file permission problem

Post by al4445 »

I keep getting an image error when trying to upload files to my CMS.

I am using the multilanguage version of CMSmadesimple - PHP 4.4 MYSQL 5 I believe.
Warning: move_uploaded_file(/home/folder/public_html/uploads/images//image.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/folder/public_html/admin/imagefiles.php on line 83

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpcSfYIV' to '/home/folder/public_html/uploads/images//folder.jpg' in /home/folder/public_html/admin/imagefiles.php on line 83

Warning: Cannot modify header information - headers already sent by (output started at /home/folder/public_html/admin/imagefiles.php:83) in /home/folder/public_html/lib/classes/class.admintheme.inc.php on line 161

Warning: Cannot modify header information - headers already sent by (output started at /home/folder/public_html/admin/imagefiles.php:83) in /home/folder/public_html/lib/classes/class.admintheme.inc.php on line 164

Warning: Cannot modify header information - headers already sent by (output started at /home/folder/public_html/admin/imagefiles.php:83) in /home/folder/public_html/lib/classes/class.admintheme.inc.php on line 167

Warning: Cannot modify header information - headers already sent by (output started at /home/edwa5318/public_html/admin/imagefiles.php:83) in /home/folder/public_html/lib/classes/class.admintheme.inc.php on line 168

Warning: Cannot modify header information - headers already sent by (output started at /home/folder/public_html/admin/imagefiles.php:83) in /home/folder/public_html/lib/classes/class.admintheme.inc.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/folder/public_html/admin/imagefiles.php:83) in /home/folder/public_html/lib/classes/class.admintheme.inc.php on line 176

I have recently moved the cms to a new server. It was working on the previous server.


Please help!
Last edited by al4445 on Mon Oct 29, 2007 10:48 am, edited 1 time in total.
al4445

Re: Image manager upload file permission problem

Post by al4445 »

Is there any information that I can provide that might give a clue as to why its not working - please can somebody help???
al4445

Re: Image manager upload file permission problem

Post by al4445 »

PHP Version 4.4.4

Server API Apache


safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value

gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
alby

Re: Image manager upload file permission problem

Post by alby »

al4445 wrote: I keep getting an image error when trying to upload files to my CMS.

I am using the multilanguage version of CMSmadesimple - PHP 4.4 MYSQL 5 I believe.
Warning: move_uploaded_file(/home/folder/public_html/uploads/images//image.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/folder/public_html/admin/imagefiles.php on line 83
I have recently moved the cms to a new server. It was working on the previous server.
Check your paths in config.php

Alby
al4445

Re: Image manager upload file permission problem

Post by al4445 »

Thanks Alby,

That might have been an error when I was copying the info


Here is the Config
#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'] = 'mysql';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'username';
$config['db_password'] = 'password';
$config['db_name'] = 'database';



#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'] = false;

#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://www.mysite.co.uk';

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

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

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/home/myfolder/public_html/tmp/cache';

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/home/myfolder/public_html/uploads';

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

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

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

#Permissions for uploaded files.  This only really needs changing if your
#host has a weird permissions scheme.
$config['default_upload_permission'] = '664';
lokking at the phpinfo settings I an see
upload_tmp_dir no value no value

upload_tmp_dir is not set in php.ini so PHP uses the system default which is /tmp.


Is this right? If not how ddo I change this
alby

Re: Image manager upload file permission problem

Post by alby »

al4445 wrote: Here is the Config
Is missing the main part:

Code: Select all

#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = 'XXXXXXXXXXX';
al4445 wrote: upload_tmp_dir is not set in php.ini so PHP uses the system default which is /tmp.

Is this right? If not how ddo I change this
I don't think that it's a problem but try to upload a file with Filemanager

Alby
al4445

Re: Image manager upload file permission problem

Post by al4445 »

Sorry,

here's that bit!
#--------------
#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/myfolder/public_html/uploads/images';
$config['image_uploads_url'] = 'http://www.myfolder.co.uk/uploads/images';
The filemanager seems ok it's just images

I really appreciate your help - many thanks
alby

Re: Image manager upload file permission problem

Post by alby »

al4445 wrote: The filemanager seems ok it's just images
upload_tmp_dir is ok
Have you upload a file in uploads/images folder? The problem is:
- wrong path (but I suppose that is right in config.php)
- permission folder -> check permission of web owner with admin filemanager upload

Alby
al4445

Re: Image manager upload file permission problem

Post by al4445 »

It works!!!!
- permission folder -> check permission of web owner with admin filemanager upload
That did it

Alby you are a star


Oh and I really like the image_rotator - works reallly well.

Many thanks


Alwyn
Post Reply

Return to “General Discussion”