Cross-platform Batch Uploading - Page 2 Cross-platform Batch Uploading - Page 2
 

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

Cross-platform Batch Uploading

Started by mstralka, July 23, 2004, 04:37:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lapino

Everytime after I have uploaded some pictures, I get the following error:

Script called without the required parameter(s).

I also tried using Mark's upload.php above, but I get the same error. Anyone got an idea? I'd really like to include this in my gallery.
Ever noticed that people who believe in Creationism look really unevolved? (Bill Hicks)

Rufl

Same error for me!
I've noticed that i'm using 1.3.1 and this upload.php that Mark posted is from 1.3.2.
Maybe it is that?
???
I'll try a upgrade from 1.3.1 to 1.3.2 to see if any changes happen.


Rufl

Nope..

It continues the same way.. :(

Any ideas?

mstralka

Did you make all of the necessary changes to:
Your database table
lang/english.php
groupmgr.php
include/functions.inc.php
include/init.inc.php
upload.php - double-check all changes to this file because the file is long and complicated so make sure you put everything in exactly the right spot

My computer crashed so I am working on getting a fresh install working.  I will walk through my instructions again on a fresh install and see if I get any problems.

-Mark
GO IRISH

Rufl

Hi guys,
i've got just my two cents to put here, so here we go.

I'm trying to get Jupload working with CPG, with no success.
I've figured out that i needed to mod some files and put the applet on the folder, ok.
Then I discovered that the mod (Cross-platform Batch Upload) includes other mod (Multi-File Uploader)
for full working (moving photos accordingly and editing titles at once), and later i saw that the other
mod incorporated another mod (Frogfoot's fancy album dropdown MOD) and needed it to work properly.

I've wasted some hours today trying to comprehend all those mods that recommend
another mods and that depend on other mods to work, etc etc etc and I know
that i'm not that stupid but i'm not an experienced programmer too, but i really think
it would be better if you guys (devs and contributors) try to create a repository for all
those mods that are lost here on the forums - and attach the files, modded from scratch from the
original files and please, only put dependance on other mods if it was essencial to the
complete funcionality.  ???

I'm speaking from a user point of view, cause i really can't consider myself a good
programmer, but i for sure tried every step from those mod tutorials, even upgraded CPG to do it,
followed the manual and all the steps involved on the process, even analysed and compared files using diff
to find the changes on files and i'm still stuck.  :(

Nothing against those guys work, that i have nothing to complain about, of course, but I think
that as I am stuck, other people will get stuck too, and to avoid general waste of time from you
guys and for us users, i think it would be better an unification of the mods that are dependant of each other.
;)

And again, thanks Mark, Frogfoot and all the others that create those excellent mods and extend the funcionality
and the quality of this excelent tool that is Coppermine!

I'm just sorry that maybe i'm not so smart to make them work on my installation...  :\'(

Lapino

I think Rufl has a point here, putting these mods together should make it easier, but hey, on the other hand it's easier this way for people who just want a part of the functions of these mods.

Now I do consider myself a programmer (but not very experienced in PHP), but I do have problems with this mod. Now I know I could go dig trough all te code and try to find where I went wrong during install, but I tried retrying the install 3 or 4 times allready, and got a little bit pissed off with it. Maybe I'll try again some other time, but if anyone else has an idea, just shoot.

I use as 1.3.2 fresh install, on an apache server with PHP 4.3.8.
Ever noticed that people who believe in Creationism look really unevolved? (Bill Hicks)

Rufl

Hey Mark,

thanks for the quick answer!

Checked all the code, Mark, including the db, files, etc...
I'll try the little mods installfest again tomorrow, but i would really
appreciate if you could find some time to
do that fresh install that you mentioned!

And please, attach the fresh files for us!!

Thanks again and keep up the good work!

-Rufl

P.S.: Lapino, if i achieve any success on this, i'll send you those files, okay?

Joachim Müller

I understand your concerns, that's why we're incorporating a plugin API for the next version of coppermine that let's you apply mods easily. Dependancies between mods are new, however - afaik only the mods mentioned in this thread depend on each other.
However, I have to point this out: mods posted in this board are user contributions. There's no guarantee they will work for everyone, or they are easiy to apply. The coppermine dev team will incorporate mods they find usefull for the majority of users into the devel version. Unless bigger projects (e.g. SMF or phpBB), we don't have the manpower to build a mod team that will look into mods, test them, stream-line them and put them into a repository. If anybody wants to join the team as a "mods-guy": you're welcome to say so.

Joachim

Lapino

I just found out that the problem isn't the code, it's the applet! I noticed Mark used Jupload 0.75 on his site, while I had 0.79. I just downloaded 0.75 and put it on my server, and BANG: everything works just fine. Although installing an older version of the applet should fix the problem, I'll have a look if I can find a way to make it work with 0.79.
But I'll have to be quick, 'cause in one week time, I'll only have access to the internet in the weekends, so maybe other people should have a look too.
Ever noticed that people who believe in Creationism look really unevolved? (Bill Hicks)

mstralka

Good catch Lapino!  I built this mod in July so the JUpload developers have probably changed something since then.  In fact, going to Jupload's forums, it looks like the last few versions have had some bugs, so I suggest sticking with 0.75.  I am not going to investigate using v.79 (because my installation is working fine), but they have very good documentation that should provide some insight into what changed between .75 and .79.

To Rufl's suggestions about MOD dependencies - The JUpload mod should work fine without the other mods (including the ones I suggest as pre-reqs).  I just went through the instructions from a fresh install of CPG 1.3.2 with Jupload 0.75 and did encounter a script-parameter error, but only when I uploaded one picture, and it went away if I hit the refresh button.  If I uploaded 2 or more pictures it seemed to work fine.
I'm pretty sure this didn't happen when I wrote the mod, but I've tracked the problem down:
in upload.php:

if (isset($_REQUEST['unique_ID'])) {

            // The unique ID is set, so let us retrieve the record.
$cayman_string = retrieve_record($_REQUEST['unique_ID']);

For some reason, the record retrieval function fails, even though the $_REQUEST['unique_ID'] variable is defined and the record it tries to retrieve does exist in the temp_data table in the database (I checked with phpMyAdmin).  That makes me think that something is screwy with the mysql_query command in the newest version of PHP (wild guess).  Or the result is getting cached somewhere (maybe I forgot to close a result set somewhere).

SO... as a workaround, try this:
FIND:

// The user has files that need to be processed and placed in albums.
    // We must pull that information from the temporary data file
    // whose ID is in $_POST['unique_ID'].
if (isset($_REQUEST['unique_ID'])) {

            // The unique ID is set, so let us retrieve the record.
$cayman_string = retrieve_record($_REQUEST['unique_ID']);

            // Verify record was retrieved.
            if (!$cayman_string) {

cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);

Replace with (or just add the header(..) line:

    // The user has files that need to be processed and placed in albums.
    // We must pull that information from the temporary data file
    // whose ID is in $_POST['unique_ID'].
if (isset($_REQUEST['unique_ID'])) {

            // The unique ID is set, so let us retrieve the record.
$cayman_string = retrieve_record($_REQUEST['unique_ID']);

            // Verify record was retrieved.
            if (!$cayman_string) {

//I don't know why this works, but it seems to solve the "script missing parameter problem when you
//try to upload only one photo
header("location: " . $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']);

                cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);


Also try this:
upload.php
FIND:

    array('unique_ID', $_POST['unique_ID'], 4),

Replace with:

    array('unique_ID', $_REQUEST['unique_ID'], 4),


I haven't gone through and re-applied the other pre-req mods.  I don't have time.  I've attached the corrected upload.php here.  I didn't have any problems with the other files in the directions so I'm not attaching them.

I hope this helps
Mark
GO IRISH

Lapino

Well, using Jupload 0.79, it was the same line causing a problem, so maybe with these fixes, it'll work with 0.79 too, but I'm not going to try it now. Firstly because now it's finally working, I don't want to screw it, and secondly, because it's almost 4 AM over here, so I'd better get some sleep  :-\\
Ever noticed that people who believe in Creationism look really unevolved? (Bill Hicks)

fayoeu

I unzipped the tar and downloaded your upload.txt file and overwrote my upload.php file.  I can load up the page with the java applet initializing, but I am getting the error message 'Script called without the required parameter' after the file has been sucessfully uploaded.   I don't know what I am doing wrong.  I am running coppermine 1.3.2, no mods except for this one.  Oh, I also modifed lang/english and added your lines pertaining to the jupload according to the direction above.  --Thanks.

fayoeu

I solved the problem, but downgrading to jupload 0.75.  Also used the latest posting of the upload.txt file posted in this thread.  I was being stupid and didn't read the end of the thread.  It works fine for me now.

JJ Photo

This didn't work for me.   I got a blank page for batch uploads as well as file uploads.  :(  I followed the steps as carefully as I could.

mstralka

JJ,
I'm beginning to think you have other issues with your website or serious problems following directions  :)
This MOD does not impact the batch upload page at all, so that problem is unrelated.
GO IRISH

YUKAHO89

i hv some error in my upload.php

when i load it
it's...

Parse error: parse error, unexpected $end in D:\Apache2\htdocs\cpg\upload.php on line 2821

Here is my php file

the last note is line 2821 i dun know y

mstralka

You didn't attach your upload.php file.  You'll need to rename it to upload.txt before uploading.  What other MODs do you have installed?  Follow the instructions again because this mod works if it's followed correctly.

-Mark
GO IRISH

djbabytroja

Hi...

@mstralka

Why this hack when i upload someting with Jupload dont delete the previews in the edit folder????

Greetings

djbabytroja

#38
And me again...

and another bug...

When u allowegd 10 normal file uploads ... 2 file upload forms have only function... the other eight are still there but no function... i test this on mstralka Gallery and my Gallery too... he have the same BUG in his own Gallery...  :-\\

i think the bug is in this CODE...

$file_upload_array = array();
$iCnt = count($_FILES);
//JUpload Modification Mark Stralka 7/25/2004
for ($i = 0; $i <= $iCnt; $i++) {
if ($_POST) {
if (isset($_FILES['file_upload_array']['name'][$i])) {
$file_upload_array['name'][$i] = $_FILES['file_upload_array']['name'][$i];
$file_upload_array['size'][$i] = $_FILES['file_upload_array']['size'][$i];
$file_upload_array['tmp_name'][$i] = $_FILES['file_upload_array']['tmp_name'][$i];
$file_upload_array['type'][$i] = $_FILES['file_upload_array']['type'][$i];
$file_upload_array['error'][$i] = $_FILES['file_upload_array']['error'][$i];
}
} else {
if (is_array($_FILES['file_upload_array' . $i])) {
$file_upload_array['name'][$i] = $_FILES['file_upload_array' . $i]['name'];
$file_upload_array['size'][$i] = $_FILES['file_upload_array' . $i]['size'];
$file_upload_array['tmp_name'][$i] = $_FILES['file_upload_array' . $i]['tmp_name'];
$file_upload_array['type'][$i] = $_FILES['file_upload_array' . $i]['type'];
$file_upload_array['error'][$i] = $_FILES['file_upload_array' . $i]['error'];
} else {
$i = $iCnt;
}
}
}

   $file_upload_count = count($file_upload_array['name']);



Greetings...
__________________________________________________________

I found the bug, the upload.php "phase 1" dont give the right number of $_FILES... i have this solution...


    $file_upload_array = array();
$iCnt = NUM_FILE_BOXES;
$iCntt = count($_FILES);
//JUpload Modification Mark Stralka 7/25/2004
for ($g=0; $g <= $iCnt; $g++) {
for ($i=0; $i <= $iCntt; $i++) {
if ($_POST) {
if (isset($_FILES['file_upload_array']['name'][$g])) {
$file_upload_array['name'][$g] = $_FILES['file_upload_array']['name'][$g];
$file_upload_array['size'][$g] = $_FILES['file_upload_array']['size'][$g];
$file_upload_array['tmp_name'][$g] = $_FILES['file_upload_array']['tmp_name'][$g];
$file_upload_array['type'][$g] = $_FILES['file_upload_array']['type'][$g];
$file_upload_array['error'][$g] = $_FILES['file_upload_array']['error'][$g];
}
} else {
if (is_array($_FILES['file_upload_array' . $i])) {
$file_upload_array['name'][$i] = $_FILES['file_upload_array' . $i]['name'];
$file_upload_array['size'][$i] = $_FILES['file_upload_array' . $i]['size'];
$file_upload_array['tmp_name'][$i] = $_FILES['file_upload_array' . $i]['tmp_name'];
$file_upload_array['type'][$i] = $_FILES['file_upload_array' . $i]['type'];
$file_upload_array['error'][$i] = $_FILES['file_upload_array' . $i]['error'];
} else {
$i = $iCntt;
}
}
}
}

noname00

this works fine for me using Mozilla 1.7.1, but not with ie 6.0.2800.1106.
windows 2000.
jupload 0.75.

in ie the applet loads fine, and i'm able to add files as usual. but when i press "upload files" they get uploaded (the progress meter works fine).
then the applet just displays the "add files" button again, and notes that a file has been uploaded (displays "Files: 1  Bytes: 7.72KB" in right-hand pane).
but it doesn't load the next page, so i can select which albums the files go in to. so the files don't get placed in any albums.

anyone know what's going on?