batch add files batch add files
 

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

batch add files

Started by ronh, July 02, 2009, 04:33:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronh

Hi all,

probably stupidity on my part but I get this error report when batch adding files from my UPLOAD directory (lots of jpeg   images in there sent by ftp all resixed to 25% of original size about 872 x 654 pixels) When I try to batch add these to an album called "Hope Cove" I get errors as shown below

USER:
------------------
Array
(
   [ID] => 4d4b112e2efe81b356f25d9a9a52b793
   [am] => 1
   [lang] => english_gb
)

==========================
USER DATA:
------------------
Array
(
   [user_id] => 1
   [user_name] => admin
   [groups] => Array
       (
           
  • => 1
           )

       [disk_max] => 0
       [disk_min] => 0
       [can_rate_pictures] => 1
       [can_send_ecards] => 1
       [ufc_max] => 3
       [ufc_min] => 3
       [custom_user_upload] => 0
       [num_file_upload] => 5
       [num_URI_upload] => 3
       [can_post_comments] => 1
       [can_upload_pictures] => 1
       [can_create_albums] => 1
       [has_admin_access] => 1
       [pub_upl_need_approval] => 0
       [priv_upl_need_approval] => 0
       [group_name] => Administrators
       [upload_form_config] => 3
       [group_quota] => 0
       [can_see_all_albums] => 1
       [group_id] => 1
    )

    ==========================
    Queries:
    ------------------
    Array
    (
       
  • => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
       [1] => select * from cpg_plugins order by priority asc; (0.002s)
       [2] => delete from `ron`.cpg_sessions where time<1246540936 and remember=0; (0.008s)
       [3] => delete from `ron`.cpg_sessions where time<1245334936; (0s)
       [4] => select user_id from `ron`.cpg_sessions where session_id = 'f6950a51973a791fd363fc29b45ac00a' (0s)
       [5] => select user_id as id, user_password as password from `ron`.cpg_users where user_id=1 (0s)
       [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `ron`.cpg_users AS u INNER JOIN `ron`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
       [7] => SELECT user_group_list FROM `ron`.cpg_users AS u WHERE user_id='1' and user_group_list <> ''; (0s)
       [8] => 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 FROM cpg_usergroups WHERE group_id in (1) (0s)
       [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
       [10] => update `ron`.cpg_sessions set time='1246544536' where session_id = 'f6950a51973a791fd363fc29b45ac00a' (0s)
       [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
       [12] => DELETE FROM cpg_banned WHERE expiry < '2009-07-02 14:22:16' (0s)
       [13] => SELECT * FROM cpg_banned WHERE (ip_addr='90.221.184.103' OR ip_addr='90.221.184.103' OR user_id=1) AND brute_force=0 (0s)
       [14] => SELECT aid, title FROM cpg_albums WHERE 1 (0s)
       [15] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
       [16] => SELECT filepath, filename FROM cpg_pictures WHERE filepath LIKE 'uploads%' (0s)
       [17] => SELECT aid, title FROM cpg_albums WHERE category = 0 (0s)
       [18] => SELECT DISTINCT a.aid as aid, a.title as title, c.name as cname FROM cpg_albums as a, cpg_categories as c WHERE a.category = c.cid AND a.category < '10000' (0s)
       [19] => SELECT aid, CONCAT('(', user_name, ') ', a.title) AS title
                                                           FROM cpg_albums AS a
                                                           INNER JOIN `ron`.cpg_users AS u
                                                           ON category = (10000 + 1) AND user_id = 1 ORDER BY title (0s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
       [startdir] => uploads
    )

    ==========================
    POST :
    ------------------
    Array
    (
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.4.2 - OK
    ------------------
    mySQL version: 4.1.11
    ------------------
    Coppermine version: 1.4.19(stable)
    ==========================
    Module: GD
    ------------------
    GD Version: bundled (2.0.28 compatible)
    FreeType Support:
    T1Lib Support:
    GIF Read Support: 1
    GIF Create Support: 1
    JPG Support: 1
    PNG Support: 1
    WBMP Support: 1
    XBM Support: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 2
    Active Links 3
    Client API version 4.1.11
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/home/builder/pb_work_dir/plesk7.5.4_hotfix6_7.5.4/psa/release/dist/usr/local/psa/mysql/include/mysql
    MYSQL_LIBS -L/usr/home/builder/pb_work_dir/plesk7.5.4_hotfix6_7.5.4/psa/release/dist/usr/local/psa/mysql/lib/mysql -lmysqlclient  
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Compiled Version 1.1.4
    Linked Version 1.1.4
    ==========================
    Server restrictions (safe mode)?
    ------------------
    Directive | Local Value | Master Value
    safe_mode | On | On
    safe_mode_exec_dir | /nonexec | /nonexec
    safe_mode_gid | Off | Off
    safe_mode_include_dir | no value | no value
    safe_mode_exec_dir | /nonexec | /nonexec
    sql.safe_mode | Off | Off
    disable_functions | no value | no value
    file_uploads | On | On
    include_path | .:/usr/local/psa/apache/lib/php | .:/usr/local/psa/apache/lib/php
    open_basedir | /usr/local/psa/home/vhosts/hagley.ismysite.co.uk/httpdocs:/tmp | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | me@localhost.com | me@localhost.com
    sendmail_path | /usr/sbin/sendmail -t -i -fCL14580 | /usr/sbin/sendmail -t -i
    SMTP | localhost | localhost
    smtp_port | 25 | 25
    ==========================
    Size and Time
    ------------------
    Directive | Local Value | Master Value
    max_execution_time | 30 | 30
    max_input_time | -1 | -1
    upload_max_filesize | 16M | 16M
    post_max_size | 16M | 16M
    ==========================
    Page generated in 0.621 seconds - 20 queries in 0.01 seconds - Album set : ; Meta set: ;


    additional notices below this report states:

    /include/functions.inc.php

       * Warning line 2945: cannot yet handle MBCS in html_entity_decode()!
       
       * Warning line 2945: cannot yet handle MBCS in html_entity_decode()!
       * Notice line 2695: Undefined variable: i

    /searchnew.php

       * Notice line 101: Undefined variable: sel_album
       * Notice line 101: Undefined variable: sel_album
       * Notice line 169: Undefined variable: fullimagesize
       * Notice line 170: Undefined variable: fullimagesize
       
       * Notice line 170: Undefined variable: fullimagesize

    Can anyone help me here please. I've checked the thumbnail resize is set to GD2

    site address is www.hagley.ismysite.co.uk/mypix and I have created a user called test with password of guest.

    I hope this helps in some way. :(

phill104

Firstly update - <!--Coppermine Photo Gallery 1.4.19 (stable)-->

You are running behind so install the latest version which is currently 1.4.25.

Why Upgrade?

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upgrade_why

Once you have done that read the following section of the manual and do everything outlined therin taking special note of everything in red.

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble

Please do not post debug output unless requested.

It is a mistake to think you can solve any major problems just with potatoes.

ronh

OK and thanks for the guidance so far.

I have updated now to latest version, read docs as instructed and I believe I've done as instructed.
My problem still remains - I can upload by http fine into userpics directory which is in the albums directory ( I've checked and the image is there. It aslo appears in the album.) No problem.
However when I try to ftp the images into my "myftpuploads" directory (which is again in the albums folder and set to permissions 777) the images get uploaded OK. I can see them in the folder using my ftp client. However it seems to be impossible to add them to an album using "batch add files"
My website is at http://www.hagley.ismysite.co.uk/gallery/
there is a user account with the username test password guest debugging is enabled
I have created one album called seaside
Appreciate all help available.

Joe Carver

Account did not appear to have upload privileges.

Follow the steps outlined: http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble

phill104

 [num_file_upload] => 5
    [num_URI_upload] => 3

You also have not set single file upload as per the docs.
It is a mistake to think you can solve any major problems just with potatoes.

ronh

I think I have now applied the required settings - however I was a bit confused between the documentation settings which say File upload =1 URI =0 number of boxes fixed which differ from that stated in your posting.
Please note my problem relates to images uploaded via FTP not to images uploaded by HTTP. I can upload OK via HTTP but when I FTP a batch of files (successfully) when I try to use "batch add files" nothing happens.

Many thanks for the advise so far - I hope you can help me resolve this issue. If I need to make any other amendments to help you please advise - many thanks

Ron

Joachim Müller

I get a "404 file not found" when trying to access the URL http://www.hagley.ismysite.co.uk/mypix from your original posting. Digging deeper in this thread I found http://www.hagley.ismysite.co.uk/gallery/. Trying there to upload with the test user account I get
QuoteYour file was uploaded successfully.

It will be visible after admin approval.
, which is just silly and shows that you haven't read the docs. From the section that you're supposed to have read:
QuoteAsking for support on upload issues

When asking for support on the coppermine forum, post a link to your site and a test user account (the test user mustn't be in the admin group!) with upload privileges, with the above mentioned settings in place - this way, supporters can see the error messages as well. Do not post debug_output unless requested. If you want fast results, you should disable admin approval for the group the test user is in, so supporters can tell instantly what is wrong without needing to double-check.

When people have issues with uploading and decide to post their question on the Coppermine support board, they usually are told to read this upload troubleshooting section. Many of them fail to do so properly, which results in frustration both for users as well as supporters. To make this absolutely clear: the above mentioned steps are absolutely mandatory, no matter what skill level you have, no matter what upload method you have troubles with. Failing to do exactly as suggested will result in your request for help being ignored. Yes, this applies to you. We mean it!
I'm not willing to play hide-and-seek with you. As there hasn't been an album where the test user account could upload to (I had to create one after logging in) I'm pretty sure that you haven't even bothered to test uploading using the test user account specified. Do you actually expect supporters to be keen to look into your issues if you're too lazy to test things first.


Quote from: ronh on July 06, 2009, 11:47:56 AM
however I was a bit confused between the documentation settings which say File upload =1 URI =0 number of boxes fixed which differ from that stated in your posting.
The docs are correct. Phill posted your current settings in an attempt to indicate that they are wrong and should be set according to docs.

ronh

my humble apologies for the confusion I caused. After reading the documentation for the fouth time I note my error in not disbleing the APPROVAL box. I have now done so per the screendump (coppermine.jpg) attached. I have also created an album called "test album" where user test can upload using the password guest.

I have also "approved" the image you kindly uploaded and it appears in the abum - I've also tested uploading another of my images which also appears fine using the user "test" and the album created for that user. However I still have problems with images I've ftp uploaded to the folder called "myftpuploads" which I cannot add to an album using the batch add facility shown in the screendump called batchadd.jpg

I really do appreciate your efforts to help me and apologise for the trouble I've caused you by not fully understanding the user docs provided.

Ron

Joachim Müller

The second screenshot doesn't show very much.

Anyway, when going to http://www.hagley.ismysite.co.uk/gallery/albums/myftpuploads/ I get a 403 forbidden, which is not bad in itself, as it just means that indexes probably are disabled on your machine (which is fine in terms of security).
Please post a deep link to one of the files that you're having issues with when batch-adding.

ronh

I assume you mean something like this
http://www.hagley.ismysite.co.uk/gallery/albums/myftpuploads/DSCF1987.jpg

I hope I have understood your requirements properly.

Just a thought - When installed Coppermine to this site I created the folder "gallery" and then uploaded all the files and folders within cpg14x to it. Could my error be caused by not uploading the parent directory (cpg14x) as well. In other words I did not upload the parent directory AND its contents just the contents.?

Many thanks for your patience.

ronh

Many thanks to all for their help and patience with a newbie - now got it working, I'm afraid I don't know what made it work for me but now problem solved. Thank-you again for all your advise. All I did was to make a new installation on another web-server got that to work first time and then reinstalled on my 34SP server using same method - this time all worked OK

Thanks again all of you.

Ron