Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jan Senf

Pages: [1] 2
1
Jan Senf:
yeh, I did that because there are a few things that the uploader can change on that page which shouldn't be available to any user such as choosing which name to put as the uploader. for this reason, i placed an autosubmit code in to prevent unauthorised changes. If you want to play with it, the file to edit is checkandgo.php (the one on the 4images directory).

... wouldnīt it be nice if the user is asked for describtion and/or keywords when uploading a ZIP-File ?
:-)

Hm, iīve not enough time in the moment to check this out ... , maybe later !!!

2
ITīS WORKING !!!!
Great !

(ok, i didīn use the new upload2.php - my fault !!!)

One thing left...
Iīve no chance to enter some keywords because the page where i may enter them jumps to the next page within a second oder two ????


3
You did it before, which part of that was confusing???  :?
well, hope this clears it up :wink:

I didnīt understand the instructions - i didnīt get it thatīs so easy ...!?

Ok, changes made, but for some reason i get this....
Ok, itīs a little better than the last try, but it do not work...

error:
Array
(
    [media_file] => Array
        (
            [name] => Kopie_web.zip
            [type] => application/x-zip-compressed
            [tmp_name] => /tmp/phpW5lnhb
            [error] => 0
            [size] => 109598
        )

)
 
try again



4
Okay, I think I've found an all round solution... with this new upload2.php only 2 changes are needed:

1)  line 60 (in the new upload2.php file) reads:
Code: [Select]
top.location='http://lc.kurdistanserver.com/gallery/checkandgo.php?sid=<?php print "$sid?>&cat_id=<?php print "$cat_id?>'simply edit this to read the directory of YOUR website... (like you did in the previous file)
and then replace the original upload2.php file in your includes folder.

 ???????  8O

5
could you please post the whole php file plz?
id like to make sure it is correct

THANX

ok, hereīs my upload2.php ...

Code: [Select]
<?php

if (isset($cat_id)){
// $uploadDir = 'kunden/frankj.de/eventpics/4images/data/media/'.$cat_id.'/';

define('ROOT_PATH''./../');
include(
'./upload.php');
$uploadDir='/4images/data/media/'.$cat_id.'/';

$uploadFile $uploadDir $_FILES['userfile']['name'];
print 
"<pre>";
if (
move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
 include(
'pclzip.lib.php');
  $archive = new PclZip($uploadFile);
  if ($archive->extract(PCLZIP_OPT_PATH$uploadDir,
                        PCLZIP_OPT_REMOVE_ALL_PATH) == 0) {
    die("Error : ".$archive->errorInfo(true));
  }
 
unlink($uploadFile);

?>

<script language="javascript">
top.location='http://www.event-pics.de/4images/checkandgo.php?sid=<?php print "$sid?>&cat_id=<?php print "$cat_id?>'
</script>
<?php
}
else
{
?>

error:
<?php 
print_r
($_FILES);
?>

try again
<form enctype="multipart/form-data" action="upload2.php" method="POST">
    <!-- MAX_FILE_SIZE must precede the file input field -->
    <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
<input type="hidden" name="cat_id" value="2" />
    <!-- Name of input element determines name in $_FILES array -->
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
</form>
<?php
}
print 
"</pre>";
}else
{
?>

<!-- The data encoding type, enctype, MUST be specified as below -->
<form enctype="multipart/form-data" action="upload2.php" method="POST">
    <!-- MAX_FILE_SIZE must precede the file input field -->
    <input type="hidden" name="MAX_FILE_SIZE" value="3000000" />
<input type="hidden" name="cat_id" value="2" />
    <!-- Name of input element determines name in $_FILES array -->
    Send this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
</form>
<?php
}
?>



6
did u try to put the code above in first?...replace:
$uploadDir = '
(the whole of the line)
with the code in bold form my last post... try this first because i dont see why it shouldn't work

Ok, iīve changed the code in the includes/upload2.php to your "bold" code ...

After uploading a test zip there is a known error:

Warning:  move_uploaded_file(/var/www/4images/data/media/3/Kopie_web.zip): failed to open stream: No such file or directory in /kunden/frankj.de/eventpics/4images/includes/upload2.php on line 12

Warning:  move_uploaded_file(): Unable to move '/tmp/phpZgGtyu' to '/var/www/4images/data/media/3/Kopie_web.zip' in /kunden/frankj.de/eventpics/4images/includes/upload2.php on line 12
error:
Array
(
    [userfile] => Array
        (
            [name] => Kopie_web.zip
            [type] => application/x-zip-compressed
            [tmp_name] => /tmp/phpZgGtyu
            [error] => 0
            [size] => 109598
        )

)
 
try again


Line 12 is the following code:
Code: [Select]
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))

 8O

7
Ive decided my upload form is too rubbish....

however, my next attempt will be to use the 4images upload script to help me...

first though, make sure your folder permissions allow you to write to these folders (but i dont see why not)
and try using:
define('ROOT_PATH', './../');
include('./upload.php');
$uploadDir='/var/www/4images/data/media/'.$cat_id.'/';


if it still doesnt work, just wait a little longer  :oops:

ok, i will wait ...!  8O

... but the coding will be easier if the instructions were a little more clearer ...
sometimes i donīt understand which line in which file i have to edit, and iīm not new to php (but also no professional) or 4images and it is not the first MOD or Change i make  :oops:

Is there anybody who installed this "MOD" and gets that thing working ?  :roll:

8
it sounds like the upload directory doesnt exist ($uploadDir) :cry:

try this... upload this file to your site, run it, and youll get an error... use the error to work out what the location should be..
 if it is the same or if it still dusnt work, try this: "./../data/(blahblahblah)" so that the directory is with respect to the location of the file.
If it STILL dusnt work, then ill try and investigate further... also, your server is based on what (windows, linux, etc.)

(the file is .php... i just had to rename it)

The Server is based an Linux (see my posting above).

Sorry, I tried this file out but it doesnīt matter where i copy it, i always get an error
"Parse error: parse error, unexpected T_STRING in /kunden/frankj.de/eventpics/4images/data/media/3/UnZipper.php on line 5"
(Of course the path is changing to where i copy the file....!!!)

Or didnīt i get the instructions ???  8O

9
Quote
Is your hosting service provides your site under Windows Server ?
Quote

No, the FAQ says:

Linux-/Apacheservern (1.3.X) with modified RedHat-Linux Version

10
okay, i went to your website and found your problem... well a differnt problem cause youve tried to edit it.. your form has action="4images/includes/upload2.php" get rid of the 4images bit... so its "includes/upload2.php"  :wink:

Ok, this is my fault. Iīve tried so much to make it work !  :(

Quote
Also, It was my bad thinking that all ftp's were the same :oops:... make $uploadDir read...
$uploadDir = '/kunden/frankj.de/eventpics/4images/data/media/'.$cat_id.'/';  :wink:

I think this should fix your problems... try again... and come back with any other bugs

Ok, I didnīt get the right server-path !!!!
Upload is now working, but still there is an other error when working with the ZIP-FILE !

Look at this...
Warning:  move_uploaded_file(kunden/frankj.de/eventpics/4images/data/media/3/Kopie_web.zip): failed to open stream: No such file or directory in /kunden/frankj.de/eventpics/4images/includes/upload2.php on line 7

Warning:  move_uploaded_file(): Unable to move '/tmp/php0kuD0b' to 'kunden/frankj.de/eventpics/4images/data/media/3/Kopie_web.zip' in /kunden/frankj.de/eventpics/4images/includes/upload2.php on line 7
error:
Array
(
    [userfile] => Array
        (
            [name] => Kopie_web.zip
            [type] => application/x-zip-compressed
            [tmp_name] => /tmp/php0kuD0b
            [error] => 0
            [size] => 109598
        )

)
 
try again



Any Idea ?

11

Editing upload2.php
$uploadDir: change 'gallery' to the actual gallery folder (the folder which you instaled the gallery to: some call it 4images)
top.location: change 'lc.kurdistanserver.com/gallery' to your website name and install folder


Great, exactly what Iīm looking for - but unfortunatly after uploading the ZIP i get an error "Page not found" !
I donīt know whereīs my mistake, the path on the server is "/eventpics/4images/..." and so I add this to the $uploadDir, but after uploading the error page still is on
"http://www.event-pics.de/includes/upload2.php"
                                     ^^^^^^
the folder 4images is missing !?

JanSenf

12
Mods & Plugins (Releases & Support) / Re: [MOD] multiupload
« on: August 01, 2005, 03:48:50 PM »
Jan Senf:
I could not see anything why it wouldn't work. I guess I'll try that MOD myself...

I suppose you changed in your member.php
Code: [Select]
require(ROOT_PATH.'includes/annotate.php');
...to:
Code: [Select]
require_once(ROOT_PATH.'includes/annotate.php');
...I'm not sure it makes any difference though.

shame on me  :oops: iīve forgotten the ..._once when updating the annotation mod !
 :roll:

Now, it works perfectly! Thank you!

13
Mods & Plugins (Releases & Support) / Re: [MOD] multiupload
« on: August 01, 2005, 10:41:00 AM »
Quote
Jan Senf:
Annotation mod? hmm... If this is the mod you refer to, I think that problem has been fixed in the current version of the MOD(since July 27)... Or when did you get the MOD?

Iīve installed the mod months ago and also the update in the last days (http://www.4homepages.de/forum/index.php?topic=3808.0)

The problem is the automatic annotation when uploading. If this is marked YES in the ACP and then uploading more than whan one picture, there is an error - uploading only one pictures works how expected ...

14
Mods & Plugins (Releases & Support) / Re: [MOD] multiupload
« on: July 30, 2005, 07:39:35 PM »
... is there already a solution for the annotation mod ?

I get an error when uploading more then one picture, so i have to annote new pictures manually in the acp !!!  :(

JanSenf

15
Mods & Plugins (Requests & Discussions) / Re: Picture of the month
« on: July 16, 2005, 03:16:06 PM »
@vincent: mir wird ja auch nix angezeigt und ich bin als ADMIN eingelogged und sehe i.d.R. alle Bilder ?

... eigentlich sollte ich ja alle Berechtigungen haben !

Hast Du den Code so bei Dir zum Laufen gebracht ?????

Pages: [1] 2