Cross-platform Batch Uploading (cpg1.4.x) COMPLETED! - Page 2 Cross-platform Batch Uploading (cpg1.4.x) COMPLETED! - Page 2
 

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

Cross-platform Batch Uploading (cpg1.4.x) COMPLETED!

Started by AWJunkies, January 29, 2006, 08:53:01 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

fayoeu

I found out that firefox was munging up the download for some reason.  I downloaded it on windows and it worked fine... however, now I am running into a different problem.  When I attempt to upload and the upload is complete, I received a message saying:

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    *   This problem can sometimes be caused by disabling or refusing to accept
          cookies.


Here is the request that the server recieves:

192.168.1.2 - - [23/Apr/2006:00:24:34 -0700] "GET /upload.php?control=phase_2&unique_ID=86c1462a&cookie=YTo0OntzOjExOiJjcGcxMzFfZGF0YSI7czo5MjoiWVRveU9udHpPakk2SWtsRUlqdHpPak15T2lKallqQm1abVppWXpZd016ZzFNamhpWldFeE5qVTRPVEV3TkdVM09UTTBNQ0k3Y3pveU9pSmhiU0k3YVRveE8zMD0iO3M6MzI6IjhlYjE1MTgzYzY5ZTE4YzkwZjQyMDJjNDhiYjA4NzQwIjtzOjMyOiJjODJiZGEyNjcyN2Y3ODYzMjRjOGRiYjQ2MzZmY2I1ZCI7czoxMDoiY3BnMTMxX3VpZCI7czoxOiI0IjtzOjExOiJjcGcxMzFfcGFzcyI7czo4OiJzdGFydHJlayI7fQ== HTTP/1.1" 302 55494 "http://neophoto.org/upload.php" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060419 Fedora/1.5.0.2-1.2.fc5 Firefox/1.5.0.2 pango-text"

jonplqs

I did all the steps but i cant see the applet i got this java error

java.lang.ClassFormatError: Incompatible magic value 1010792557 in class file JUpload/startup
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at sun.applet.AppletClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.applet.AppletClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.applet.AppletClassLoader.loadCode(Unknown Source)
   at sun.applet.AppletPanel.createApplet(Unknown Source)
   at sun.plugin.AppletViewer.createApplet(Unknown Source)
   at sun.applet.AppletPanel.runLoader(Unknown Source)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Thanks

jonplqs

Quote from: jonplqs on July 25, 2006, 09:14:39 PM
I did all the steps but i cant see the applet i got this java error

java.lang.ClassFormatError: Incompatible magic value 1010792557 in class file JUpload/startup
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at sun.applet.AppletClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.applet.AppletClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.applet.AppletClassLoader.loadCode(Unknown Source)
   at sun.applet.AppletPanel.createApplet(Unknown Source)
   at sun.plugin.AppletViewer.createApplet(Unknown Source)
   at sun.applet.AppletPanel.runLoader(Unknown Source)
   at sun.applet.AppletPanel.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Thanks

Hi. I fix it... But now i have another problem... I upload photos but when the upload procces is finish the web page dont change anything.

cyis100

i have done exactly the same as mention but nothing happen and no error.

anyone can screenshot me what is it like after doing so>

tks!

cyis100

i am able to install and use it now.

but after uploading some photos, nothing happen and i duno where to find those uploaded photo.

help!

ivan

cyis100

Quote from: AWJunkies on March 25, 2006, 11:08:09 PM
WOOT I got it to work! Fully functional. Thanks to guice for the help! Look to post #1 for all instructions.

what next after loading photo as nothing happen?

tks!

ivan


cyis100

after uploading photo, it did not direct me to add photo into photo album.

did i setup anything wrong?

Joachim Müller


AWJunkies

I am back and this mod works perfect for past year+! I have uploaded 500 images at a time. You guys have half the mod right. The userid and pass is not getting passed through the set cookie. I will make changes on this mod for you guys to make universal. Just need to set your userid and pass which is different on everyones setup if they have a bridge so I need to make universal keys for those id's. Or you can manuely set them like I did in my setup. You guys where only 2 lines of code off.

Ziver

Quote from: fayoeu on April 23, 2006, 09:28:09 AM
I found out that firefox was munging up the download for some reason.  I downloaded it on windows and it worked fine... however, now I am running into a different problem.  When I attempt to upload and the upload is complete, I received a message saying:

The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    *   This problem can sometimes be caused by disabling or refusing to accept
          cookies.


Here is the request that the server recieves:

192.168.1.2 - - [23/Apr/2006:00:24:34 -0700] "GET /upload.php?control=phase_2&unique_ID=86c1462a&cookie=YTo0OntzOjExOiJjcGcxMzFfZGF0YSI7czo5MjoiWVRveU9udHpPakk2SWtsRUlqdHpPak15T2lKallqQm1abVppWXpZd016ZzFNamhpWldFeE5qVTRPVEV3TkdVM09UTTBNQ0k3Y3pveU9pSmhiU0k3YVRveE8zMD0iO3M6MzI6IjhlYjE1MTgzYzY5ZTE4YzkwZjQyMDJjNDhiYjA4NzQwIjtzOjMyOiJjODJiZGEyNjcyN2Y3ODYzMjRjOGRiYjQ2MzZmY2I1ZCI7czoxMDoiY3BnMTMxX3VpZCI7czoxOiI0IjtzOjExOiJjcGcxMzFfcGFzcyI7czo4OiJzdGFydHJlayI7fQ== HTTP/1.1" 302 55494 "http://neophoto.org/upload.php" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060419 Fedora/1.5.0.2-1.2.fc5 Firefox/1.5.0.2 pango-text"

Hi I have the same problem. upload.php nerver creates the temp record thats why it loops for ever but I don't now why it dosent create the record.

jongbj

Hi,

After following the instructions to the letter, and noticing that there are no changes to /include/init.inc.php (which the first part of the instructions mention as a to be changed file), I get the same error in all browsers: Fatal error
and that's it.

My server is an Appach 2.0 with MySQL 5.0.27 and PHP 5.2.0 all on WinXP with SP2

Could anyone hint to the right direction. I've tested the JUpload and that works fine. Coppermine 1.4.10 without the mod also works fine:
See the difference: http://bajor.dyndns.tv/coppermine vs http://bajor.dyndns.tv/copperminetest

Thanks


jongbj

Thanks, doing that gave an mysql error saying that the syntax

"MAX(can_use_jupload) as can_use_jupload " .

in /bridge/init.inc.php

is not correct for my version of MySQL (which is 5.0.27).

As I don't really speak MySQL I'm not able to see what is wrong.
I triplechecked whether the code was correctly copied and it was.

Btw, removing the line gave me enterence to the gallery but somehow disabled the admin-function. I was completely locked out, no way to login. :'(
Eventually I had to delete everything and restore a backup to get it working again.

jongbj

Just found the other tread with the JUpload applet for batch uploading. This does sort of what I need so I won't persue the option in this thread anymore.
Thanks for the help anyway.

artoonie

I'm having the same problem as jongbj. with cpg1410, all i see is "Fatal Error:"

I did the debug mode tutorial thing, and it said:
While executing query "SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval MAX(can_use_jupload) as can_use_jupload FROM cpg1410_usergroups WHERE group_id in (1)" on 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX(can_use_jupload) as can_use_jupload FROM cpg1410_usergroups WHERE group_id i' at line 1

All I did different was change cpg143 to cpg1410 in the database query, and added the changes in bridges/coppermine.inc.php to bridges/phpbb2018.inc.php.

artoonie

I think I figured it out:



It says to replace the following code:
            $result = cpg_db_query("SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, " .
                            "MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, " .
                            "MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, " .
                            "MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, " .
                            "MAX(num_URI_upload) as num_URI_upload, " .
                            "MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, " .
                            "MAX(can_create_albums) as can_create_albums, " .
                            "MAX(has_admin_access) as has_admin_access, " .
                            "MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval[u][b],[/b][/u] ".
                            "FROM {$CONFIG['TABLE_USERGROUPS']} WHERE group_id in (" .  implode(",", $groups). ")");

However, on the second to last line, there is no comma (bolded). I'm assuming you only put a comma when there is more, so we are "finding" the wrong thing, so I just added that comma (before I just added the next line).

Sorry if that didn't make sense.


....and it works! yay.

Thanks, awesome mod.

logik9bar

It's pretty hacky works in my gallery over about 100 albums and 11,000 images.

You'll need to do the following before running the script...

1. download and install python 2.5
http://www.python.org/download/
2. download and install python imaging library for python 2.5
http://www.pythonware.com/products/pil/
3. download and install mysql for python
http://sourceforge.net/projects/mysql-python
4. extract the attached file to somewhere on your computer (let's say c:\)

run the following from the command line to get a list of options required to import pictures into your database...

python import_to_cpg.py -?

finally run it with something like this...

python import_to_cpg.py -sc:/www/coppermine/albums/holidaysnaps -dcoppermine -uadmin -pasimplepassword -m -a -v

sit back and watch it churn through your images creating thumbs and adding them to your database.

If you managed to get all that to work open up import_to_cpg.py and play around with the category_from_album_path() function to generate your own custom categories.

logik9bar

Doh, posted old zip (album descriptions weren't being read in correctly)

logik9bar

Fixed bug where files with the same name would not be added to the database (all my test files had different names).