• [Plugin] Batch Import 5 0 5 1
Currently:  

Author Topic: [Plugin] Batch Import  (Read 335874 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucas

  • Pre-Newbie
  • Posts: 3
    • View Profile
Problem please help
« Reply #45 on: October 27, 2002, 11:26:25 AM »
I am getting this little problem when trying to batch import
Quote
9 images in . Importing image 1 to 9

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 1
You have an error in your SQL syntax near 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (1, '', '', , 10, 0, 0, 2, 2, 9, 0, 0, 0, 2)
You have an error in your SQL syntax near ' 10, 0, 0, 2, 2, 9, 0, 0, 0, 2)' at line 4
FAILED

1. Importing image AUTOEXEC.BAT

Warning: Unable to create './../../data/media/1/AUTOEXEC.BAT': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /AUTOEXEC.BAT
Skipping.....

2. Importing image Bootfont.bin

Warning: Unable to create './../../data/media/1/Bootfont.bin': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /Bootfont.bin
Skipping.....

3. Importing image CONFIG.SYS

Warning: Unable to create './../../data/media/1/CONFIG.SYS': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /CONFIG.SYS
Skipping.....

4. Importing image IO.SYS

Warning: Unable to create './../../data/media/1/IO.SYS': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /IO.SYS
Skipping.....

5. Importing image MSDOS.SYS

Warning: Unable to create './../../data/media/1/MSDOS.SYS': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /MSDOS.SYS
Skipping.....

6. Importing image NTDETECT.COM

Warning: Unable to create './../../data/media/1/NTDETECT.COM': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /NTDETECT.COM
Skipping.....

7. Importing image boot.ini

Warning: Unable to create './../../data/media/1/boot.ini': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /boot.ini
Skipping.....

8. Importing image ntldr

Warning: Unable to create './../../data/media/1/ntldr': No such file or directory in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /ntldr
Skipping.....

9. Importing image pagefile.sys

Warning: Unable to open '/pagefile.sys' for reading: Permission denied in c:\internet\www.portaldaweb.com\admin\plugins\batch_import.php on line 122
Copy Image: Error while copying image /pagefile.sys
Skipping.....


Import finished!



used this path
Code: [Select]
$data_src_path = "c:/internet/www.portaldaweb.com/admin/plugins/fotos";
And a relative one and nothing changes.....
Can any one help me


Thanks in advance

Lucas Nishimura - hacker@lucnet.cjb.net

Offline camerino

  • Pre-Newbie
  • Posts: 4
    • View Profile
    • http://www.phpbb2.it/portale/
[Plugin] Batch Import
« Reply #46 on: November 01, 2002, 08:18:53 PM »
Hallo Jan,

ich wollte einfach nur eins sagen:" Suuuuuuuuuuuuuper - Script"

Danke an Jan
ciao

Offline boxerbay

  • Newbie
  • *
  • Posts: 18
    • View Profile
batch error
« Reply #47 on: November 02, 2002, 01:36:03 AM »
I get this error:

The data source path "/path/to/images/folder" seems to be incorrect!

what am i supposed to set this to?
Thanks Alex.

Offline Poptard

  • Pre-Newbie
  • Posts: 5
    • View Profile
[Plugin] Batch Import
« Reply #48 on: November 07, 2002, 01:52:47 AM »
set it to where your images or folders of images you want to add are located.

Offline paulmc

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: Fatal error:...on line 29
« Reply #49 on: November 07, 2002, 06:59:02 PM »
Here is what I did to solve the:

"Fatal error: Failed opening required './../admin/admin_global.php' (include_path='.:/usr/lib/php') in /home/httpd/html/4images/admin/plugins/batch_import.php on line 29"

Just add another directory level on the line

$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";

change to

$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../../ ";

Works fine now. BTW I'm running 4images on Mac OS X.

Paul

Offline vynum

  • Newbie
  • *
  • Posts: 16
    • View Profile
BATCH IMPORT /Paths/ & Thumbnails On-The-Fly
« Reply #50 on: November 14, 2002, 06:49:45 AM »
I have a directory structure similar to this below:

x:\Galleries
x:\Galleries\Cars
x:\Galleries\Cars\Honda
x:\Galleries\Cars\Ford
x:\Galleries\Trucks
x:\Galleries\Trucks\Honda
x:\Galleries\Trucks\Ford

This is just an example. But I wish the 4images script could do something similar to, and I quote

Quote from: Jan
This script will import image data from an existing folder structure. The script goes recursively through the folders, creates categories for each folder (subcategories for subfolders) and imports the images.


But a little different. Can I make it recursively search through folders and subfolders and automatically create Catagories and Subcatagories but not import the images? I would like to leave the images exactly were they are. Which by the way is "out of Server_Root".  I would however like the script to continue on an automatically create thumbnails ON THE FLY. to the clients web browser. Example. Lets say I have 750 images in 7 diff catagories and tonight I add another 250 to various cats, Is it possible to make the script "on the fly" 1. read the directory tree and 2. report to the client how many 'new' images have been added, since such and such date and to what catagories received these images?

This does 2 things. First, An admin would never have to scan and do updates everytime he/she adds new images.  Since I add on a regular basis.  Second, when visitors enter the website they will notice instantly if 'new' images has been added, the count & date.

 :idea: ON THE FLY - Performance

 :arrow: Recursively search folders & subfolders
 :arrow: Update database
 :arrow: Send to client's Browser instantly changes & updates etc.
 :arrow: Send Email to Registered or Non-Registered thru Admin Selection any changes or addions to the gallery with the count of images and to what catagories etc. thru a Email_change_template.php module.
 

vynum

P.S. The most important thing I want to do right now is get ImageMagic or NetPBM to Auto thumbnail the images. Yep I've read the BBS and haven't been successfully yet. And Lastly perform what has been explained above. :lol:

Offline vynum

  • Newbie
  • *
  • Posts: 16
    • View Profile
Batch Import Plugin - Sugggestion
« Reply #51 on: November 14, 2002, 07:26:56 AM »
// As default, the script will only copy the image files
// from your source folders to the 4images folders.
// After import you will have your image data twice on
// your server.
// If you have not enough server space set this to 1.
// Then the script will move the image files.
// Be carefully with this, your data could be lost!!!
$move_image_files = 0;

Is it possible to do something like this?

$leave_image_Files = 3;

Or

$image_src_files = "/path/to/image/gallery/folder/&/subfolders"


Another words I would like to leave my 10 GIGS of images in one spot.

Moving this much data on a alpha/beta script is too risky for me. 8O

Now all my images galleries are in one /main folder but are broken up
into subs and more subs etc..

It would be nice however, to have an option in the Admin section to
have multiple data source directories. You would might have to form
an array or somthing. Another words have more than one data source.

This way I could have images in:

C:\Gallery\gal_001
C:\Gallery\gal_002
D:\Gallery\junkpics
E:\Gallery\Familypics

Without moving or copied. Just leave them there and let the script read
there locations.

vynum





vynum

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
[Plugin] Batch Import
« Reply #52 on: November 14, 2002, 03:23:28 PM »
No, at the moment thats not possible.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline mblond

  • Newbie
  • *
  • Posts: 10
    • View Profile
[Plugin] Batch Import
« Reply #53 on: November 14, 2002, 09:06:18 PM »
Every time I try to import images I get these errors.  Has anyone else had this problem?  if so could you please provide some guidance.  Thank you.

My config:
$data_src_path = "/var/www/html/photo/album/admin/plugins";
everything else is default.

What I have tried:
changing the directory for batch import to several different locations
verification of path for batch import. Using external php file provided by Jan.
-changing permissions
-verfied database fields

Import category ...
DB Error: Bad SQL Query: SELECT cat_order FROM 4images_categories WHERE cat_parent_id = ORDER BY cat_order DESC LIMIT 1
You have an error in your SQL syntax near 'ORDER BY cat_order DESC LIMIT 1' at line 4

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_id, cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) VALUES (134, '', '', , 10, 3, 3, 3, 3, 3, 3, 3, 3, 9)
You have an error in your SQL syntax near ' 10, 3, 3, 3, 3, 3, 3, 3, 3, 9)' at line 4
FAILED

1. Importing image .autofsck

Warning: Unable to create './../../data/media/134/.autofsck': No such file or directory in /home/photo/photo/album/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /.autofsck
Skipping.....

2. Importing image .memdump

Warning: Unable to create './../../data/media/134/.memdump': No such file or directory in /home/photo/photo/album/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /.memdump
Skipping.....

3. Importing image core

Warning: Unable to open '/core' for reading: Permission denied in /home/photo/photo/album/admin/plugins/batch_import.php on line 122
Copy Image: Error while copying image /core
Skipping.....


Import finished!

Thanks again for any help.

Hmmm ..... Maybe I missed something.
In order for this to work you have to upload a full directory with the images contained within that directory.  -- Even better.
I was uploading just the images.

I will leave this post up in the event someone else has this same problem.

Offline mblond

  • Newbie
  • *
  • Posts: 10
    • View Profile
[Plugin] Batch Import
« Reply #54 on: November 14, 2002, 10:03:46 PM »
I would like to be able to insert a user id from within the control panel rather than having a default_user_id in the php script this way I can change the userid for the each batch of images being uploaded.  Without having to edit the php file each time.

I have programming experience but am just getting familiar with php any help in getting this done would be greatly appreciated.

Thank you.

Offline mblond

  • Newbie
  • *
  • Posts: 10
    • View Profile
[Plugin] Batch Import
« Reply #55 on: November 14, 2002, 11:12:29 PM »
Quote from: mblond
I would like to be able to insert a user id from within the control panel rather than having a default_user_id in the php script this way I can change the userid for the each batch of images being uploaded.  Without having to edit the php file each time.

I have programming experience but am just getting familiar with php any help in getting this done would be greatly appreciated.

Thank you.


I figured out how to do this let me know if you are interested, if there seems to be interest I will post it.

Offline vynum

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Fatal error:...on line 29
« Reply #56 on: November 15, 2002, 05:54:56 AM »
Quote from: paulmc
Here is what I did to solve the:

"Fatal error: Failed opening required './../admin/admin_global.php' (include_path='.:/usr/lib/php') in /home/httpd/html/4images/admin/plugins/batch_import.php on line 29"

Just add another directory level on the line

$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";

change to

$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../../ ";

Works fine now. BTW I'm running 4images on Mac OS X.

Paul


Ok, I got only 2 problems so far. One is when I was in control panel and clicked on the batch thingy....nothin happened. Then I saw this about add another forwared slash "./" and I did and it worked, well kinda, the control panel now finds the script and I can run it and import images BUT, and this is a big BUT. Take a look at what happend:

CREATED A NEW IMAGE LOCATION FOR TESTING:

C:\IMAGES - simple huh?
Then I created a sub-folder
C:\IMAGES\GAL1

I have 7 images in both folders, thats it.

Heres were the scripts kinda screws up. When I click to import it goes straight to the subfolder "\GAL1" and imports those images while skipping what was in the Parent' folder.

Why? my data source path is like this:

$data_src_path = "C:\IMAGES";

 :idea:  Heres a good idea.. why not make it so when were in the control panel, have a blank text box so we can simply type in the path there instead of having to open up import_batch.php all the time.


--------------SNIPPET
I didn't put anything in the sub folder variable because I wanted it to scan all folders and subs:
// subfolder:  If you images are stored in a subfolder,
//             set the folder name here. Example: "thumbnails/"
//             Optional, can be left blank

"subfolder"  => "", <- LEFT IT LIKE THIS

If I have subs do I suppose to fill in the  "" with a path like
"C:\IMAGES\GAL1
?

Secon problem. I can't get Imagemagic or NetPBM to work.

I place the extra \convert.exe at the end of the path and contral panel
sees it now, but when I do an "autothumbnail, the script finds all my
images very well, but when I go to execute to autocreate thumbnail
I get:

Create thumbnail for: Big Ass (quake00.jpg) ....  
   Error creating thumbnail!


Create thumbnail for: stupid ass (quake00_2.jpg) ....  
   Error creating thumbnail!


Create thumbnail for: quake12 (quake12.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake11 (quake11.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake10 (quake10.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake09 (quake09.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake08 (quake08.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake07 (quake07.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake13 (quake13.gif) ....  
   Error creating thumbnail!


Create thumbnail for: quake07 (quake07.gif) ....  
   Error creating thumbnail!



Well those are the only two major problems I have other than the fact I can't send mail. I dont have SMTP selected, I just wanta use PHP to do it. I haven't got to the part yet but if anyone wants to indulge on telling me I need to go to my PHP.INI and do something that'll be great.

vynum

Offline Arura

  • Pre-Newbie
  • Posts: 3
    • View Profile
    • http://www.arura.com/
[Plugin] Batch Import
« Reply #57 on: November 16, 2002, 06:12:38 AM »
mblond,
since many people encounter those error messages, including me, I hope you can post your solutions to them.

Best regards
Arura

Offline mblond

  • Newbie
  • *
  • Posts: 10
    • View Profile
[Plugin] Batch Import
« Reply #58 on: November 16, 2002, 08:00:16 PM »
Quote from: Arura
mblond,
since many people encounter those error messages, including me, I hope you can post your solutions to them.

Best regards
Arura


Arura,
I assume you are talking about the error messages listed from my post
Posted: 14.11.2002, 21:06.

At the end of this post I say:
Quote
Hmmm ..... Maybe I missed something.
In order for this to work you have to upload a full directory with the images contained within that directory. -- Even better.
I was uploading just the images.

I will leave this post up in the event someone else has this same problem.

Recap:  
Lessons Learned: You must upload a full directory into your admin/plugins
directory, or the location designated by you in variable:  
Code: [Select]
$data_src_path if you just upload images into the admin/plugins directory then you will get the errors I recieved.
Hope this clarifies.

If this does not help, post your particular problem.

Offline vynum

  • Newbie
  • *
  • Posts: 16
    • View Profile
Confusing
« Reply #59 on: November 17, 2002, 01:33:57 AM »
I know that this "batch_import" script that Jan released is "beta" and it is a 'quickfix' for people who want to batch. But I do think it would make things a lot simpler if we could place images in a certain directory, whether via upload or Local folders and have a place in the Control pane were we could type in a /path/to/images or {browse} to a local folder etc. It is my understanding so far is that all the script needs to really know is were the images reside so it can either 1.move or 2copy the images to its new location under the /4images/*/ folder. Its this /*/ folder I have questions about in the $data_src_path = "/path/to/images"

It would just be alot eaiser in a batch process to be able to:

1.select source files (weather via ftp,http://URL or /local/path)
2.select destination to store (weather via ftp,http://URL or /local/path)
3.select in control panel a.)look for new images b.) autothumbnail

Its this manual autothumbnail via ImageMagic or NetPBM thats kinda lame. I think, and I again I suggested this ealier, The script should be wrote so that you can simply have /your/images somewere and Never Ever have to create a single thumbnail and have the script autothumbnail directly to the clients browser. You never wouldhave to have a /thumbnail folder.

By far I'm impressed with 4images I just cant wait until it reaches the abilities of ImageFolio
http://www.imagefolio.com/