PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   vBGallery Import Scripts (http://www.photopost.com/forum/vbgallery-import-scripts/)
-   -   DB Error importalbums.php (http://www.photopost.com/forum/vbgallery-import-scripts/140404-db-error-importalbums-php.html)

jboyd July 5th, 2009 09:49 PM

DB Error importalbums.php
 
when i run the importalbums.php script i get the following error.

Database error in vBulletin 3.8.1:

Invalid SQL:
INSERT INTO vb_ppgal_posts (title,userid,username,dateline,pagetext,imageid,visible,allowsmilie,ipaddress,importpostid)
VALUES('', 397, 'D'Vine', 1243960905, 'Thanks even though I don\'t think the porportions work in my favor in this picture....but hell its recent!', 2076, 1, 1, '161.150.2.58', 108 );

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Vine', 1243960905, 'Thanks even though I don\'t think the porportions work in my' at line 2
Error Number : 1064
Request Date : Sunday, July 5th 2009 @ 09:45:18 PM
Error Date : Sunday, July 5th 2009 @ 09:45:19 PM
Script : Log in - EB - vBulletin Admin Control Panel
Referrer : Log in - EB - vBulletin Admin Control Panel
IP Address :
Username : Admin
Classname : vB_Database
MySQL Version : 5.0.45

Chuck S July 6th, 2009 06:59 AM

At around line 325 of that script add the line in bold

Code:

Content visible to verified customers only.

EduFabbri March 20th, 2011 02:25 AM

Hi Chuck,

Recently installed VBGallery in my forum. Was trying to import all the old pics from VB Albums but had the same error as in this post. I've corrected the line you said but once again it got stopped with another SQL Error:

Code:

Content visible to verified customers only.
Hope you can help me to know what's wrong with it.

Thanks

Eduardo

Chuck S March 20th, 2011 10:15 AM

what specific script is this? This is a 2 year old thread here. There is no such supported scripting linked in our download area.

There is no official product support for such a script so my suggestion would be to post in whatever thread you found this script for assistance. Your issue is your category id is empty and you would need to find out why.

EduFabbri March 20th, 2011 01:21 PM

Hi Chuck,

The script is the one you include within the "admincp" folder of the VBGallery in the Member's area. It's named: "importalbums.php"

As you sugested I've "hardcoded" the category for this script this way:

This is how it looked before:
Code:

Content visible to verified customers only.
This is how I hardcoded it
Code:

Content visible to verified customers only.
where 3 is the number of the User's category in my forum.

The point is... The script run, gave not error nor finishing sign. It imported something like this:

Photos 46,257
Categories 7,552
Disco Space Used 1.67 GB (Gigabytes)

None of this is a problem for me, since we have enough space in the server. But there's a big problem when accessing the admin panel and browsing or editing Categories. The page never loads and stays blank for ever (perhaps due to the huge amount of categories). Finally it shows the headers but no categories.

Second issue is the way it handled private albums, making them public. I'd rather preferred not to import them and let the user's decide on that subject.

Let me know if you have any advice on this so we can start using VBGallery (actually I've hidden it for the rest of the users)

Thanks in advance for your support.

Eduardo

Luciano March 20th, 2011 02:32 PM

the script you are using is for vbulletin 3 only !!!!
try this script.. if you are using vbulletin 4:
http://www.photopost.com/forum/vbgal...llery-3-a.html

luc

PS: i doubt you will able to use the old script.. as i am not sure it is php > 5.1 compatible.

EduFabbri March 20th, 2011 02:46 PM

Hi Luciano,

As you may see in my first post, I'm running vBulletin 3.8.4. Thanks anyway.

BTW, What's more similar to "Private Albums" in VBGallery. Is there any way to let only friends view a Category?

Thanks

Chuck S March 20th, 2011 05:34 PM

Well the issue as I brought up before is your category id is empty. That is why you get that error

Code:

Content visible to verified customers only.
That is the line that defines the category id. Now you will probally need to look at your database tables but for whatever reason I would suspect that some of your pictures the albumid field is empty in your vb albumpicture table is empty. It should not be empty and this is why you get an error.

Luciano March 21st, 2011 12:49 AM

Quote:

Originally Posted by EduFabbri (Post 1285812)
Hi Luciano,

As you may see in my first post, I'm running vBulletin 3.8.4. Thanks anyway.

BTW, What's more similar to "Private Albums" in VBGallery. Is there any way to let only friends view a Category?

Thanks

Nope, the friends only view is not implemented yet (in vbg 3)

Yes sorry, i went to the first post of the whole thread.. clicked on the link in the error message and that took me to a vb4 install.
Luc

Chuck S March 21st, 2011 08:22 AM

Yeah he replied to a two year old thread which can be a confusion. ;)

EduFabbri March 21st, 2011 09:51 AM

Hi Chuck and Luciano,

Sorry for reopening a two year old thread. Just in case you can move the messages to a new thread if you consider it necessary.

BTW, I've fixed the "orphan" pictures issue in my database and the imported run without errors, but again without saying "done".

I've also noticed the "test" variable inside the script and understood (may be I'm wrong) is something like a "verbose mode". Set it at 1 and once again I've started over and tried the import script. It does all "albums to categories" stuff and then, when moving files it stops at a picture that it's not the last uploaded in VB Albums. Let me tell you that I'm using folders and files option to store VB Albums, so that the pictures are not in the DB.

Am I having a missing picture file? Is there any way to know it?

Thanks again, sorry for bother you so much.

Eduardo

Chuck S March 21st, 2011 10:13 AM

Eduardo

The answer I provided should give you some idea of where to look for your issue. What I am saying is your mysql error where things stop is because your have an album id in the albumpicture table that is empty. It is not suppose to be empty.

http://www.photopost.com/forum/how-d...vbgallery.html

That is check to see your doing what is said there and see where you get and check your database table and see if there are any albumid fields in that table I meantion which are empty

EduFabbri March 21st, 2011 10:27 AM

I've already checked that as soon as I've read you the first time. That's what I've solved deleting 4 entries in my pictures database. There's no empty albumid field there, but I cannot assure there's no picture pointing to an "unexistent" album (another way of "orphan" pictures).
I know it sounds like extra work... but Why not testing the VB Albums data consistency prior to importing in the same script. Shouldn't be so difficult to tell us what the inconsistencies are so to correct them prior to importing and avoiding you such this headaches ;)

I'll continue analyzing my db as far as I can. Maybe I can search for the last record printed by the verbose mode of the script and see the next one's data to gather if there's something odd in it.

Thanks.

Eduardo

Chuck S March 21st, 2011 12:57 PM

Eduardo

Please realize this old beta importer was written a couple years ago. There has been no testing or changes since that time. It was merely written as an extra tool to help users.

EduFabbri March 22nd, 2011 08:16 AM

Hi Chuck,

I realize that I'm asking for something extra VBGallery, and I do appreciate your dedication and effort to solve my problems. The importer didn't work even when I browsed all VB Albums (one by one) and checked for inconsistencies. Didn't find anything odd in the albums, pictures, albumpict, comments DB's (like blank fields).

I feel pretty lost. Do not know what to do next....

Thanks anyway.

Chuck S March 22nd, 2011 09:10 AM

Do you get any more errors? I really do not know where your at. You say you have ran the importer. It should not be modified in any way and run it and what do you get?

EduFabbri March 22nd, 2011 09:30 AM

Hi Chuck,

I've run the script "as is... from the box" ;) directly extracted from the ZIP file of your Member's Area:

The result is: It runs and hungs at certain point, no message displayed. The categories and photos imported are unaccessible even from admin's account. No comments are migrated. I can only access my own photos (that were not private). No other user can access my photos. Other users can access their own photos but no one else can. Tried setting permissions in Control Pannel but with no luck, photos are still unavailable for other users. Do not know (not sure) if all photos are migrated.

I undid changes with the same script.

Then I did a minor change to the script and put test="1" instead of test="0" at the beginning. It runs showing some arrays (albums to categories I presume). Then it starts moving files from one server folder to another and it stops without further notice or explanation...

Let me know if there's any further info I should give you to better solve this.

Thanks for your patience.

Chuck S March 22nd, 2011 01:01 PM

You can send us ftp info and vb url login etc and we can take a peek to see if we see what is going on.

EduFabbri March 24th, 2011 02:05 PM

Hi Chuck,

Sorry for the delay. Let me know where I can send you that info.

I'll be sending it asap.

Chuck S March 24th, 2011 05:12 PM

the contact us link in our site header works ;)


All times are GMT -5. The time now is 02:31 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97