Batch and add files not working Batch and add files not working
 

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

Batch and add files not working

Started by ronish, April 10, 2005, 08:13:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ronish

I have read several posts here about files not uploading and I still can't figure out why mine doesn't work. All the pics that I have uploaded in the past months work fine. Yesterday I uploaded several pics in the albums/ dir in a folder and chmoded it to 777. When I go to batch and add files and click on the new folder folder with files, it shows little boxes with red x's.

I have read many topics but still no help.

I read this: http://forum.coppermine-gallery.net/index.php?topic=16039.0
It talks about the prefix and stuff...here is my settings:
The album directory *    --- albums/
The directory for user files *    --- userpics/
The prefix for intermediate pictures *    --- normal_
The prefix for thumbnails *    --- thumb_
Default mode for directories    --- 0777
Default mode for files  --- 0666

I've also read where you resave your pics and upload it again to overwrite the original pics but that doesn't work either.

I don't know what else to do so please reply.

ronish

BTW here is my debug info where I see the red x's

USER:
------------------
Array
(
    [ID] => 9b24225b56850645ee491985340d49fd
    [am] => 1
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => ronish
    [user_password] => ********
    [user_lastvisit] => 2005-04-10 01:09:07
    [user_regdate] => 2004-11-19 08:41:23
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] =>
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [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
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM cpg132_filetypes;
    [1] => SELECT * FROM cpg132_users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = '50058047b15c4732d24d1d493f27208b'
    [2] => 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 cpg132_usergroups WHERE group_id in (1)
    [3] => SELECT group_name FROM  cpg132_usergroups WHERE group_id= 1
    [4] => DELETE FROM cpg132_banned WHERE expiry < 1113156931
    [5] => SELECT * FROM cpg132_banned WHERE ip_addr='67.64.25.95' OR ip_addr='67.64.25.95' OR user_id=1
    [6] => SELECT filepath, filename FROM cpg132_pictures WHERE filepath LIKE 'ashnil%'
    [7] => SELECT aid, title FROM cpg132_albums WHERE category = 0 ORDER BY title
    [8] => SELECT DISTINCT a.aid as aid, a.title as title, c.name as cname FROM cpg132_albums as a, cpg132_categories as c WHERE a.category = c.cid AND a.category < '10000' ORDER BY cname,title
    [9] => SELECT aid, CONCAT('(', user_name, ') ', title) AS title FROM cpg132_albums AS a INNER JOIN cpg132_users AS u ON category = (10000 + user_id) ORDER BY title
)

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

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

==========================
VERSION INFO :
------------------
PHP version: 4.3.10 - OK
------------------
mySQL version: 4.1.9-standard-log
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version 2.0 or higher
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 0
Active Links 1
Client API version 4.1.9
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/var/mysql//include
MYSQL_LIBS -L/var/mysql//lib -lmysqlclient -L/usr/lib -lz
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.2.1.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | /home/php/bin | /home/php/bin
safe_mode_gid | On | On
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | /home/php/bin | /home/php/bin
sql.safe_mode | Off | Off
disable_functions | shell_exec, system, passthru, proc_open, proc_close | shell_exec, system, passthru, proc_open, proc_close
file_uploads | On | On
include_path | .:/home/php | .:/home/php
open_basedir | /home | /home
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail_php | /usr/sbin/sendmail_php
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 | 8M | 8M
post_max_size | 2M | 2M
==========================
Page generated in 0.138 seconds - 10 queries in 0.006 seconds - Album set :

tycoonrp

When I upload the images via Add Batch Files, the image icons have the red X.  When I clicked on the icons...

Warning: rename(./albums/Family 2005/MarilynPham/Marilyn1.JPG,./albums/Family 2005/MarilynPham/Marilyn1.JPG): Permission denied in C:\Best\addpic.php on line 39

Warning: exec(): Unable to fork [""c:/ImageMagick/convert" -quality 80 -antialias -geometry 133x100 "C:/Best/albums/Family 2005/MarilynPham/Marilyn1.JPG" "C:/Best/albums/Family 2005/MarilynPham/thumb_Marilyn1.JPG""] in C:\Best\include\picmgmt.inc.php on line 159
Error executing ImageMagick - Return value: -1


Thanks in advance for your help.

krkeegan

Hmm I can tell you are running on a PC. If you are running XP or NT do you have the correct permissions on that folder? It looks like to me that PHP does not have write access to that folder.

Kevin
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

tycoonrp

i encountered a problem as well when uploading images via batch add files.  red x on the image icons.  when click on the icons...

Warning: rename(./albums/Family 2005/MarilynPham/Marilyn1.JPG,./albums/Family 2005/MarilynPham/Marilyn1.JPG): Permission denied in C:\Best\addpic.php on line 39

Warning: exec(): Unable to fork [""c:/ImageMagick/convert" -quality 80 -antialias -geometry 133x100 "C:/Best/albums/Family 2005/MarilynPham/Marilyn1.JPG" "C:/Best/albums/Family 2005/MarilynPham/thumb_Marilyn1.JPG""] in C:\Best\include\picmgmt.inc.php on line 159
Error executing ImageMagick - Return value: -1

tycoonrp

yes, i have coppermine running on windows 2000 server.  it was working perfectly for the past year, just recently i cannot upload the images.  nothing has changed.  i double check the permission all folders and everyone has full control.

krkeegan

I'm really just grasping at straws here, but the errors you are getting lead me to believe for some reason php cannot write the files. do you have other folders with spaces in them that worked in the past?

Kevin
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

OmegaGOD

Because you are using Windows, spaces cause problems. Try renaming the directory "Family 2000" to "Family_2000". See if this helps.

--OmegaGOD
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

tycoonrp

Quote from: krkeegan on April 20, 2005, 01:14:00 AM
I'm really just grasping at straws here, but the errors you are getting lead me to believe for some reason php cannot write the files. do you have other folders with spaces in them that worked in the past?

Kevin

i have folders with space that worked fine.

tycoonrp

Quote from: OmegaGOD on April 20, 2005, 05:05:33 AM
Because you are using Windows, spaces cause problems. Try renaming the directory "Family 2000" to "Family_2000". See if this helps.

--OmegaGOD

i used "family 2003", "family 2004", and this year "family 2005".  the 03 and 04 works great!  i'll try to rename it without space.

thanks!

tycoonrp

renamed folder to without space, still have the same error.  again permission is full control on everyone.

krkeegan

Wow, okay I am out of ideas.

Maybe someone else knows the issue.
There are no stupid questions, only stupid people. -Mr. Mackey, South Park

Joachim Müller

What are the permissions for the folder ImageMagick executables reside in? Also try renaming the extension of the files you want to add to lower case (jpg instead of JPG). Post what server version you're using (IIS vs Apache).

tycoonrp

Quote from: GauGau on April 22, 2005, 08:26:13 AM
What are the permissions for the folder ImageMagick executables reside in? Also try renaming the extension of the files you want to add to lower case (jpg instead of JPG). Post what server version you're using (IIS vs Apache).

the permission on C:\ImageMagick is full control for everyone.  i did rename the file extension to lower case and it didn't work.  i'm using IIS latest.

OmegaGOD

This maybe a stretch, but your error,

Quote from: tycoonrp on April 19, 2005, 11:49:11 PM
Warning: rename(./albums/Family 2005/MarilynPham/Marilyn1.JPG,./albums/Family 2005/MarilynPham/Marilyn1.JPG): Permission denied in C:\Best\addpic.php on line 39

seems like either 1.) one of the directories in that directory structure is not writeable by the webserver or 2.) the file itself is not writeable. Make sure that all the directories starting from albums to MarilynPham is writeable and same with the file Marilyn1.JPG

Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

tycoonrp

Quote from: OmegaGOD on April 27, 2005, 08:13:48 PM
This maybe a stretch, but your error,

Quote from: tycoonrp on April 19, 2005, 11:49:11 PM
Warning: rename(./albums/Family 2005/MarilynPham/Marilyn1.JPG,./albums/Family 2005/MarilynPham/Marilyn1.JPG): Permission denied in C:\Best\addpic.php on line 39

seems like either 1.) one of the directories in that directory structure is not writeable by the webserver or 2.) the file itself is not writeable. Make sure that all the directories starting from albums to MarilynPham is writeable and same with the file Marilyn1.JPG




still not resolving.

Bartleby

I had this problem as well and I thought there was no solution, but there is/isnt.

Firt I ignored the fact that on batch add it didnt show a thumbnail for every image, this doesnt seem to matter in the end.  Second, if your batch adding more than 50-75 pctures in one folder this will make it harder.

What ended up happening to me was that when I actually batch addd it would add a couple then fail on the rest, I got around this in a silly way , I just clicked a link to anywhere else on the site and then hit the back button.  When I went back it added a little bit more, then I went forward and went back again, and it added a little more, until I had all of them added.  If the going back and forward didnt work Id go through the batch add steps all over and then do the forward back thing again.. I ended up getting all 1800 of my pics uploaded doing this :)  I also split the batches into 50 or less groups, it seemed to work better this way and fail less often.  I think its the server that doesnt like resizing alot of images at once.

Joachim Müller

hitting [F5] or your browser's refresh icon would have done the trick as well. I think there's even a footnote on the batch-add page that says so too.