Cannot upload photos to the album Cannot upload photos to the album
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Cannot upload photos to the album

Started by sandylam, January 21, 2005, 05:17:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

sandylam

I have been used this photo album for a few months.
I can upload the photos and allocate to different album at the begining.
However, I got a problem of upload photos to my album recenty.
After I select the photos in my computer and type in the information of the photos, I got a warning from the system that " previous files cannot be allocated. Upload successful".
I saw a warning of the script:
Warning: rename(): SAFE MODE Restriction in effect. The script whose uid is 10279 is not allowed to access /nssb/wwwroot/rodentrus.com/photo/albums/userpics/10001 owned by uid 501 in /nssb/wwwroot/rodentrus.com/photo/upload.php on line 2226

I cannot find the photos after I got back to the album.

What is going on?
How can I fix it?

Aditya Mooley

The problem is because of the SAFE MODE directive of PHP.
Take a look at this where you may get the solution.

Also use the forum search before posting you queries.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

sandylam

I still don't understand how to fix the problem.
The mode of the directories already have been changed to 777.
Check that at the beginning the the "include/config.inc.php" file
I don't find a line with : "define('SILLY_SAFE_MODE', 1);"

Can anyone tell me more specific what file I have to open and what kind of modifications that I have to make.

The albums works before but just doesn't work anymore recenty.
I didn't change any setting.

Hein Traag

#3
Read this have you ? http://coppermine.sourceforge.net/manual.php#safe

It says, at the safe mode issues section, the following:
Check that at the beginning the the "include/config.inc.php" file, you have a line with : "define('SILLY_SAFE_MODE', 1);"

Meaning that if it is not there you have to insert it yourself.

And check with your host if they have recently changed any settings on the servers, especialy on the safe mode settings.

Joachim Müller

http://www.rodentrus.com/photo/ doesn't exist, so I guess you removed coppermine completely, which probably means "case closed"... Please reply if it isn't, posting your actual coppermine url.

Joachim

sandylam

#5
the url of the photo album
http://photo.rodentrus.com
But it is chinese version

It become Critical error after I added a line : "define('SILLY_SAFE_MODE', 1);"

I added it under
<?php
// Coppermine configuration file
define('SILLY_SAFE_MODE', 1);

Joachim Müller

please post a test user account (non-admin) with upload privileges, with debug_mode turned on for everybody.

Joachim

sandylam

okay
I have opened an account
Username: test
P/W: 123

However the user galleries seem okay
I can upload files in user mode.
I login as admin mode again, it fail to upload any files.
The warning message is

The previous file could not be placed.
You have successfully placed all the files.  

Notice: Undefined index: user2 in /nssb/wwwroot/rodentrus.com/photo/upload.php on line 2147

Notice: Undefined index: user3 in /nssb/wwwroot/rodentrus.com/photo/upload.php on line 2148

Notice: Undefined index: user4 in /nssb/wwwroot/rodentrus.com/photo/upload.php on line 2149

Warning: rename(): SAFE MODE Restriction in effect. The script whose uid/gid is 10279/10001 is not allowed to access /nssb/wwwroot/rodentrus.com/photo/albums/userpics/10001 owned by uid/gid 501/1005 in /nssb/wwwroot/rodentrus.com/photo/upload.php on line 2226

Notice: Undefined variable: PIC_NEED_APPROVAL in /nssb/wwwroot/rodentrus.com/photo/upload.php on line 2266

Joachim Müller

turn off notices in config (you were not meant to turn them on) and temporarily switch to "single file uploads only" in "groups" both for the admin and registered group, then try again and post here. Do not use the "user mode" switch at all - you as admin should stay in admin mode all the time, the toggle is just meant to hide the admin controls. To actually test how the gallery looks like and behaves for "regular" users, you have to log out as admin and log in as user (or use another browser session to be logged in both as user and admin at the same time).

Joachim

sandylam

After I turn the mode into single file uploads only, I saw the following warning when I upload a photo.

Impossible to move Dscn7372.jpg to albums/userpics/10001/ !

File: /nssb/wwwroot/rodentrus.com/photo/db_input.php - Line: 266



Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 10279/10001 is not allowed to access /nssb/wwwroot/rodentrus.com/photo/albums/userpics/10001 owned by uid/gid 501/1005 in /nssb/wwwroot/rodentrus.com/photo/db_input.php on line 265

Joachim Müller


sandylam

thank you
I don't understand what the docs suggested.
I try to add a line : "define('SILLY_SAFE_MODE', 1);"
It shows a critical error.

I did some modifications like this
<?php
// Coppermine configuration file
define('SILLY_SAFE_MODE', 1);

I am newbie on setting up a php program.
Can you tell me more specific what I have to do?

I have sent a email to my hosting service provider.
They said they did not any modification on the My SQL.
The database always in Safe mode.
However, I can upload photos and arrange photos in the photo album when I set it up at the begining, I fail to upload photos in admin mode recenty.

Joachim Müller

it's not the database that is in safe mode, it's php! You're meant to download include/config.inc.php from your webserver (using your ftp application) to your local hard drive, edit the file with a plain text editor (notepad.exe is fine) and add the line define('SILLY_SAFE_MODE', 1);at the place you already metioned, so your file looks like this:<?php
// Coppermine configuration file
define('SILLY_SAFE_MODE'1);
// MySQL configuration
$CONFIG['dbserver'] =                         'localhost';        // Your databaseserver
$CONFIG['dbuser'] =                         'root';        // Your mysql username
$CONFIG['dbpass'] =                         '';                // Your mysql password
$CONFIG['dbname'] =                         'coppermine';        // Your mysql database name


// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] =                'cpg132_';
?>
Then you should upload the modified file to your webserver again (overwriting the original one). This is meant to fix things on some webservers where the safe mode if improperly configured.
You appear to have done that, but if this doesn't cure the issues you're facing, you should:
1) enable debug_mode in config for everyone
2) leave display of notices disabled
3) go to "groups" and set "method for file uploads" to "Single file uploads only" both for the admin and registered group
4) Creat a test user account with upload privileges
5) Post a link to your gallery and the test user account (non-admin) here.

Quote from: sandylam on January 23, 2005, 02:56:41 PM
It shows a critical error.
Post the actual error message!

Joachim

sandylam

The problem solved.

Thank you very much  :D

BCs71

Quote from: sandylam on January 24, 2005, 03:39:34 AM
The problem solved.

Thank you very much  :D

What exactly fixed the problem? I am experiencing something somewhat similar....
TIA

Joachim Müller

well, then read the whole thread: we had sandylam post details - you should follow the same advices we gave him if you encounter similar problems. Posting a link to your site or an actual error message might be helpfull as well.

Joachim

[edit]
I just noticed you posted your issue on a separate thread, and you're egtting support there, so please do not cross-post! You're just making this hard for supporters! >:( Locking this thread now...
[/edit]