Advanced search  

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]

Pages: [1] 2   Go Down

Author Topic: The previous file could not be placed etc  (Read 18052 times)

0 Members and 1 Guest are viewing this topic.

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
The previous file could not be placed etc
« on: December 07, 2005, 04:26:59 pm »

Hi,

I've just joined, mainly because the coppermine install isn't going as swimmingly as I'd expected.

I'm running a local test system comprising:
W2k3 web
IIS6
PHP 5.1.1
MySQL 5.0.16 win16
GD2

I initially hit a problem creating albums but removing the requied field widget for description (which you cant populate in the GUI) resolved that one.. I wonder if that's caused knock on effects...

I currently have problems uploading pics.

the error I get is: The previous file could not be placed. You have successfully placed all the files. this is after I get the thumbnail screen & am able to fill in the description info etc & click continue.

I've checked the permissions on the Albums folder & they appear to be correct ( the IIS guest account having RWXD down the tree)

I can post the debug's on request ;)

Any suggestion of where to look - I've been trawling through the search results & google but find a lot of posts saying search for the error & you'll find the solution.. I haven't yet (& most are for CPG1.3..)

Cheers,
A
fade2greyuk [at] hotmail
« Last Edit: December 11, 2005, 07:58:40 pm by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #2 on: December 08, 2005, 09:35:10 am »

Hi KegObeer, thanks for the tutorial link, it's different from the version I'm using (1.4.2 stable apparently) but I've set the settings mentioned & sure enough it prevents some of the error masking... the full error is...

Error: There was an error while processing a database query
Code: [Select]
While executing query "INSERT INTO cpg140_pictures (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('', '2', 'userpics/', 'Image021.jpg', '36083', '60785', '640', '480', '1134030594', '1', 'Admin','', '', '', 'YES', '', '', '', '', '127.0.0.1', '127.0.0.1', '0')" on 0

mySQL error: Out of range value adjusted for column 'pid' at row 1

The table says it's auto generating the PID value so now I'm confused..

Any ideas? - I've already changed mySQL to Traditional from Strict & already had to change the album description field from required (since the gui doesnt let you populate it)

Anyone else has 'teething' problems like this installing on windows?

Cheers,
A
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: The previous file could not be placed etc
« Reply #3 on: December 08, 2005, 02:57:21 pm »

Are you positive you are actually not still in strict mode?  Did you follow the MySQL directions for switching away from strict mode?  Did you restart your server?
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #4 on: December 08, 2005, 03:09:06 pm »

Yup, I'm sure it's running in "TRADITIONAL" it's currently set to: "TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Yup, I've restarted mySQL

I've just double checked it all & restarted it again & get the same error.

Looking at the PHP it's trying to insert an empty string into the PID field - which should be auto generated by the database - I have no idea if that ability has changed from mySQL versions prior to 5.1.1 though - any ideas?

Would be nice to know if anyone is running successfully with the same or similar config as myself & there's light at the end of the tunnel.

A
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #5 on: December 10, 2005, 05:02:01 pm »

Hi everyone... any ideas?

Is this genuinely a code error & is it likely to be fixed any time soon? or is it worth either downgrading mysql to a pervious version (any other issues?) or finding another product?

A
Logged

Nibbler

  • Guest
Re: The previous file could not be placed etc
« Reply #6 on: December 10, 2005, 05:12:26 pm »

Try modding the query. include/picmgmnt.inc.php

Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (pid, aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('', '{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
   

to

Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
   
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #7 on: December 10, 2005, 06:12:40 pm »

Hi Nibbler,

Thanks for the quick reply, that's worked & got the picture in there.. :)

When I change the number of uploads back to more than one I still have the same problem where it says the files can't be placed - changing nothing else.

Hmm I'm guessing there's another similar reference in one of the other PHP scipts?

A
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #8 on: December 11, 2005, 07:38:55 pm »

any suggestions of other scripts which need hacking & slashing to fix this one?
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #9 on: December 12, 2005, 04:29:51 pm »

I notice that this thread is marked as solved, however just to clarify, it doesn't appear to be:

When the number of uploads is set to 1 - it works fine

When the number of uploads is set to more than 1 (eg 3) it doens't work resulting in the error:

The previous file could not be placed.

You have successfully placed all the files.


There's obviously something different happening in the multiple upload script which hasn't been resolved by the code change above. Suggestions?

Cheers all.
A
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
problems with multiple uploads..
« Reply #10 on: December 13, 2005, 12:04:54 pm »

My other post is marked as solved so aren't expecting any more help on that thread..

http://forum.coppermine-gallery.net/index.php?topic=24764.0

Details of my setup & the problem are in the link above. Basically, with the code mod suggested it now works for single uploads but not for multiples - ie setting the number of upload boxes to more than 1. The process seems to work & then you get the files coulnd't be placed error.

Any more suggestions?

A
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: The previous file could not be placed etc
« Reply #11 on: December 13, 2005, 06:10:58 pm »

merged the new thread you started with the existing one you refered to. Nobody answered, because you still haven't done as suggested in the "upload troubleshooting" section of the docs that supporters have refered to before on this thread: you're meant to post a link and non-admin test user account with upload permissions, because we want to take a look at this for ourselves. If single uploads work OK for you, then set the upload method on the groups page to "2 files" instead of only one (differing slightly from the settings refered to in the trouble-shooting section).

Joachim
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #12 on: December 13, 2005, 06:45:46 pm »

Hi GauGau

I've been through the troubleshooting mentioned by your colleagues.. (mentioned earlier in this thread).

Also I've confirmed that setting the uploads to 1 works, however setting the uploads to more than 1 results in the error stated.

I can't provide a link to the machine as it's an offline developement machine (Virtaul Machine).

Do you have any suggestions for other things I can look at or are we saying that it just plain don't work with the combination I've got loaded (also at the top of this post).

Cheers,
A
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: The previous file could not be placed etc
« Reply #13 on: December 14, 2005, 07:55:33 am »

not sure what to recommend then.
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #14 on: December 14, 2005, 08:53:31 am »

Can anybody recommend an alternative? When looking at the options, did people just look at PHP solutions or did anyone evaluate any .net products? Any pointer before I hit google & start from scratch again?

Cheers,
A
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: The previous file could not be placed etc
« Reply #15 on: December 14, 2005, 09:01:31 am »

why don't you go for single uploads then? You (as admin) should use FTP-upload plus batch-add anyway instead of http uploads, so the single file upload method will apply only to your users. As you said that you're running your coppermine install on a virtual test server, the issue will probably go away anyway if you run it on a real webserver. I can't see a point in trying to fix something that appears to be a server-sided problem if you're never going to use that server in a production environment.
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #16 on: December 14, 2005, 10:25:21 am »

The intention is for end users to upload potentially large numbers of files to this server ideally via the HTTP upload process, I'll test the XP upload functionality as a stop gap but it's not the way I'd like to go.

The server will remain a virtual one & it's my intention to consolodate a number of physical servers to one virtual host, which will include this server. There should be no issues running in a virtual machine using VMware (or Virtual Server these days).

When the single upload process runs, does it execute a different peice of code to the multiple upload? - it looks like the mod to stop trying to put a value in a field which the database should update resolved the issue but it potentially needs to be changed in another PHP script somewhere - I can't tell becasue the additional error masking on the multi upload prevents me from seeing the full error.

Any suggestions would be useful on where to look etc, I'm not a PHP guy but can find my way around most new stuff.

A
Logged

phase

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: The previous file could not be placed etc
« Reply #17 on: December 15, 2005, 04:37:04 am »

Has a solution for this problem been found yet? I am having the same issue and tried all the above suggestions and still getting the error.

thanks
Logged

fade2grey

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: The previous file could not be placed etc
« Reply #18 on: December 15, 2005, 09:21:21 am »

Hi Phase, no solution yet sadly..

can you give details of your setup just so we can tell if it's a problem with the 'widows' setup - using the latest & greatest or if it also affects other configs.

cheers,
A
Logged

elmo2274

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: The previous file could not be placed etc
« Reply #19 on: December 15, 2005, 03:28:19 pm »

Just as a note to other users the query change earlier in this thread seemed to work for me (I don't think I changed anything else before testing again). My issue was not through the multiple file http upload but rather with only the batch add. My files were already up on the server and in the folder I wanted them in. Thanks! Good Luck fade2grey and Phase hope you get everything straightened out!
Logged
Pages: [1] 2   Go Up
 

Page created in 0.061 seconds with 19 queries.