Announcement

  •  » Extensions
  •  » [resolved] Piwigo Import Tree and 2.4.5

#1 2012-11-04 11:43:17

Richard
Member
2012-03-01
9

[resolved] Piwigo Import Tree and 2.4.5

Hi,

i've testet piwigo import tree extension on my test environment on a windows 7 machine with xampp and strawberry perl installed.

my test albums to be imported are 2 albums in folder fotos on desktop and there are about 180 pics all in all.

the problem is: only 12 pics became imported - the others have 0×0 pixels, 0.00MB in piwigo environment.

my import  has been executed with this command line input:

>perl c:\piwigo_import_tree.pl --directory=C:/Users/asterix/Desktop/fotos

if i re-run the command line, every "zero" image wants to be imported again:

C:/Users/asterix/Desktop/fotos/stick/IMG_9624.JPG must be uploaded in "fotos / stick" (id=13)



UPDATE: these 12 imported images all have under 2048 bytes. it seems to be a restriction in file size...

Any advice for me? memory allocation in perl?

Richard

Last edited by Richard (2012-11-05 13:27:05)

Offline

 

#2 2012-11-05 09:31:00

Richard
Member
2012-03-01
9

Re: [resolved] Piwigo Import Tree and 2.4.5

today i've tested the latest svn of piwigo import tree.

same problem. all files bigger zhan 2048 bytes had been skipped...
new error:

[album 2] "C:/test/gallery/wp1/03127_fieldofremembrance_1680x1050.jpg" upload st
arts... malformed JSON string, neither array, object, number, string or atom, at
character offset 0 (before "<br />\n<b>Warning</...") at C:/strawberry/perl/ven
dor/lib/JSON.pm line 171.



the new piwigo_import_tree.pl throws out another error after each file that has been uploaded...
[album 2] "C:/test/gallery/wp1/03122_winterlake_1680x1050.jpg" upload starts...
completed (3874 ms, photo 10)
cannot open file "gallery/wp1/.piwigo_import_tree.txt" for writing at c:\test\piw
igo_import_tree.pl line 451.

Offline

 

#3 2012-11-05 09:56:48

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13823

Re: [resolved] Piwigo Import Tree and 2.4.5

Hi Richard,

I suppose it's not 2048 bytes but 2048 kbytes, ie 2MB. It is the default "upload_max_filesize" on Apache.

In Piwigo, can you open screen [Administration > Photos > Add] and tell us what is said about the maximum file size? (just before the "Select files" button).

If it confirms 2MB, then you have to increase the upload_max_filesize on your webserver (or ask your web hosting provider)

Offline

 

#4 2012-11-05 09:57:47

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13823

Re: [resolved] Piwigo Import Tree and 2.4.5

Richard wrote:

the new piwigo_import_tree.pl throws out another error after each file that has been uploaded...
[album 2] "C:/test/gallery/wp1/03122_winterlake_1680x1050.jpg" upload starts...
completed (3874 ms, photo 10)
cannot open file "gallery/wp1/.piwigo_import_tree.txt" for writing at c:\test\piw
igo_import_tree.pl line 451.

Very unexpected on Windows. piwigo_import_tree.pl tries to write a "cache" file to make the sync more reliable.

Offline

 

#5 2012-11-05 12:05:13

Richard
Member
2012-03-01
9

Re: [resolved] Piwigo Import Tree and 2.4.5

hi plg. thx for the fast reply.

filesize limit was the problem. i meant 2048 kb :-) -> 2 mb
xampp still underlies its file size limit ;-)

the second problem could be a permission problem? i've started the command as local administrator.
my second thought was to create this file if it cant be created by perl. error message didn't change so far.

for others with similar problems: you have to change php.ini

search for:

upload_max_filesize and for  post_max_file_size( this setting should be on a higher limit than upload_max_fil_size)

upload_max_filesize = 10M
post_max_size =20M

Last edited by Richard (2012-11-05 13:35:23)

Offline

 

#6 2012-11-05 13:26:08

Richard
Member
2012-03-01
9

Re: [resolved] Piwigo Import Tree and 2.4.5

UPDATE:

the in piwigo_import_tree.pl used $params{dir}cuts the path

following change should work:

my $filepath = $params{dir}.'/.piwigo_import_tree.txt';

should be changed to

my $filepath = $opt{directory}.'/.piwigo_import_tree.txt';

$opt{directory} still remains unchanged through runtime.

Offline

 

#7 2012-11-05 15:19:25

Tadjio
Member
UK
2012-05-02
432

Re: [resolved] Piwigo Import Tree and 2.4.5

Well done, Richard, that works a treat.

I had already loaded many directories and found I couldn't add to them with piwigo_import_tree.pl
but now I can with your fix.

As well as the line you found, there is one other section I amended, concerning the fotopic readme.txt record, where I fixed the Description File Path.

Last edited by Tadjio (2012-11-06 01:16:38)


Tadjio

Offline

 
  •  » Extensions
  •  » [resolved] Piwigo Import Tree and 2.4.5

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact