The previous file could not be placed etc The previous file could not be placed etc
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

The previous file could not be placed etc

Started by fade2grey, December 07, 2005, 04:26:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fade2grey

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

kegobeer

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

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
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

kegobeer

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?
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

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

fade2grey

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

Nibbler

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

$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

$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']}')";
   

fade2grey

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

fade2grey

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

fade2grey

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

fade2grey

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

Joachim Müller

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

fade2grey

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

Joachim Müller


fade2grey

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

Joachim Müller

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.

fade2grey

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

phase

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

fade2grey

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

elmo2274

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!