Another setup problem

Panu

Joined: 2002-11-11
Posts: 37
Posted: Fri, 2002-11-22 17:05

after setup creates tables and says I can click to go to main page it informs the following:

Warning: Missing argument 1 for create() in /usr/local/apache/htdocs/panu/gallery2/modules/core/classes/GalleryGroup.class on line 114

(hundred of lines like above cut for a reason :smile:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 136 bytes) in /usr/local/apache/htdocs/panu/gallery2/lib/adodb/adodb.inc.php on line 535

So PHP runs out of memory.

I dropped earlier gallery2 db before setup.

Panu

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-11-23 00:58

Try it again with the latest code; I reworked a whole bunch of things that may have affected your problem.

 
Panu

Joined: 2002-11-11
Posts: 37
Posted: Mon, 2002-11-25 13:22

I still get the same rows. wiped out all the code, fetched fresh cvs tree, copied config.php, edited those couple of fields in it, launched setup, created the database, clicked "here" link and that was the result.

Panu

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Mon, 2002-11-25 13:29

After fetching the new code, you should drop the database but also not forget to gut out the Gallery data directory (not the code directory, but that other data directory you created).

 
Panu

Joined: 2002-11-11
Posts: 37
Posted: Fri, 2002-11-29 15:42
Quote:
After fetching the new code, you should drop the database but also not forget to gut out the Gallery data directory (not the code directory, but that other data directory you created).

New try with fresh cvs... still...

Thankyou for suggestion, but I wiped everything, and I used another, new directory for gallerydata. I still got the same messages.

Maybe my PHP is too old or it has wrong configuration options or something?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-11-30 00:18

Hmm. What version of PHP, Apache and MySQL? And what OS?

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Sat, 2002-11-30 01:24
Quote:
Hmm. What version of PHP, Apache and MySQL? And what OS?

I have the same problem as Panu has. Did everything you sugested.
Thanks for your help and patient.

PHP Version 4.0.6
Apache/1.3.20 Sun Cobalt (Unix)
MySQL 3.23.47
:???:

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Sat, 2002-11-30 03:55

Yes... that's pretty ancient PHP, and some issues are cropping up... can you upgrade PHP to 4.2.3? (leave Apache as is though :smile: )

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Sun, 2002-12-01 06:50
Quote:
Yes... that's pretty ancient PHP, and some issues are cropping up... can you upgrade PHP to 4.2.3? (leave Apache as is though :smile: )

That helped. With PHP version 4.2.3 no more installation errors.
Now I need to install ImageMagick or NetPBM. Which one do you recomend?
Thanks for everything :smile:

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Sun, 2002-12-01 20:04

I can create albums, upload images (jpg) but I can not see thumbnail on anything.
I have both ImageMagick and NetPBM (latest versions) and neither one creates thumbnails.
I love G2 so far.
Thanks

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2002-12-02 02:35

What's the URL to your G2?

 
uncle

Joined: 2002-08-15
Posts: 18
Posted: Mon, 2002-12-02 16:26

I have the same problem. I use netpbm with gallery 1.3 and it works fine but doesn't create thumbnails or even display the pics when clicking on them
redhat 7.3
using php 4.2.3
ImageMagick-5.4.3.11-1
netpbm-9.24-3

here's the link:

http://pics.unclescrotor.com/main.php

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3474
Posted: Mon, 2002-12-02 16:58

(whoops)

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Tue, 2002-12-03 18:03
Quote:
What's the URL to your G2?

http://ucscobalt.ucsusa.org/~g2/gallery2/main.php

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Tue, 2002-12-03 20:09
Quote:
>>What's the URL to your G2?
<<
http://ucscobalt.ucsusa.org/~g2/gallery2/main.php</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE><!-- BBCode Quote End -->

Server was down for a while and I don't know if you have had chance to try it or not. It's back on again
Thanks in advance.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-12-03 22:24

I need the admin password on those G2 installs so that I can check out your module settings...

 
uncle

Joined: 2002-08-15
Posts: 18
Posted: Wed, 2002-12-04 01:45
Quote:
I need the admin password on those G2 installs so that I can check out your module settings...

I sent you a PM with an admin user id and password for http://pics.unclescrotor.com

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-12-04 23:39

That's odd. I was able to upload a GIF and a JPEG to both uncle and
kamenko's sites with no difficulties. Are you sure the images you're
uploading are valid? Try downloading the images I uploaded, and re-uploading
them to see if that works.

The other theory I have is that for some reason, the mime type is
not getting delivered from the browser to the server properly. This
causes Gallery to think that it can't create thumbnails/resizes so it
doesn't bother.

What web browsers are you guys using?

 
uncle

Joined: 2002-08-15
Posts: 18
Posted: Thu, 2002-12-05 03:16

I've tried this with jpgs from 3 different cameras and now tried with the jpg you uploaded (main.jpg) and it did the same thing. I'm using IE 6.0.2600.0000

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Thu, 2002-12-05 05:04

OK,
I have downloaded your pictures onto my hard drive, upload them and nothing.
I telnet into gallery's data and found your pictures along with mine in the root folder. My pictures, including yours I uploaded, doesn't have file extension. ex. DSCN0450-1. DSCN0450-3. but yours have it (amx.highlight.jpg and title.gif)
Then I renamed all of my pictures by adding just "jpg" on the end so they look like DSCN0450-1.jpg DSCN0450-3.jpg etc.
I went into MySQL database and saw that in the table g2_GalleryDataItem the field g_fileExtension for my pics has no value (all are NULL) and yours have gif and jpg values so I changed that too.
In the table g2_GalleryPhotoItem I found only your pics. Added some of mine.
Then went on to gallery site hoping that I'll see my thumbnails but no. Refreshed session, tried to open items but still no thumbnails.

Does this tells you anything :cry:
Kamenko

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2002-12-05 05:29

Ok, I think that both of you are having the same problem. I think that the mime type that G2 is receiving is something that it does not expect. Let's find out. Edit modules/core/ItemAddChildren.inc and look for this block:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
/* Get the mime type from the upload info. */
$mimeType = $file['type'];
</TD></TR></TABLE><!-- BBCode End -->

add this line:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
print("MIME TYPE: [$mimeType]<br>");
</TD></TR></TABLE><!-- BBCode End -->

Then put that line right after this block also:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
/*
* If we don't get useful data from that, take a swing at
* it using the file name.
*/
if ($mimeType == 'application/octet-stream' ||
$mimeType == 'application/unknown') {
list ($base, $extension) =
GalleryUtilities::getFileNameComponents($file['name']);
$mimeType = GalleryUtilities::convertExtensionToMime($extension);
}
</TD></TR></TABLE><!-- BBCode End -->

Then when you upload it'll print out the message twice, then give you an error about
headers, etc. Let me know what mime type appears.

 
uncle

Joined: 2002-08-15
Posts: 18
Posted: Thu, 2002-12-05 11:18

Here it is:

MIME TYPE: [image/pjpeg]

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Thu, 2002-12-05 16:30

Here it is:

MIME TYPE: [image/pjpeg]
MIME TYPE: [image/pjpeg]

Warning: Cannot add header information - headers already sent by (output started at /home/sites/home/users/g2/web/gallery2/modules/core/ItemAddChildren.inc:72) in /home/sites/home/users/g2/web/gallery2/main.php on line 116

Warning: Cannot add header information - headers already sent by (output started at /home/sites/home/users/g2/web/gallery2/modules/core/ItemAddChildren.inc:72) in /home/sites/home/users/g2/web/gallery2/main.php on line 117
DEBUG!

 
nickthegreek
nickthegreek's picture

Joined: 2002-10-23
Posts: 11
Posted: Fri, 2002-12-06 13:59

I do get the same problem. If you try to upload the file with netscape it works fine. It looks to me like an inompatibity with IE 6. I will try to test it with IE 5.5 as well.

 
uncle

Joined: 2002-08-15
Posts: 18
Posted: Fri, 2002-12-06 16:31

I just DL'ed Opera 7.0 (beta) and the uploads work just fine. IE 6.0 appears to be the c ulprit.

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Sat, 2002-12-07 04:18
Quote:
I do get the same problem. If you try to upload the file with netscape it works fine. It looks to me like an inompatibity with IE 6. I will try to test it with IE 5.5 as well.

Don't try. Save you time, it doesn't work with 5.5
I downloaded Netscape 7.0 and it works great.
What's wrong with Microsoft :lol:

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Sat, 2002-12-07 04:52

I'm happy camper now with Netscape 7.0 :razz:
The only thing that doesn't work now is that when you upload picture into a new album thumbnail for that album is not created.
Is there any way now that we can recreate those manually
Thanks

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-12-07 09:17

Excellent work, guys. There turned out to be two problems, stemming from the fact that your web browser was uploading your jpegs as image/pjpeg (progressive JPEG):

1. The NetPBM and ImageMagick toolkits didn't support image/pjpeg mime type
2. The image/jpeg mime type wasn't in our mime type listing.

I've fixed both of those issues. Get the latest code and see if that fixes the problem.

Quote:
Is there any way now that we can recreate those manually

Nope. But you knew that. You'll want to recreate your whole G2 install anyway.

 
uncle

Joined: 2002-08-15
Posts: 18
Posted: Sat, 2002-12-07 12:29

well...I'm halfway there. With Imagemagick everything seems to work great with IE 6 but with NetPBM I get this error when trying to add a picture:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> Error (ERROR_UNSUPPORTED_FILE_TYPE)
in modules/netpbm/classes/NetPbmGraphics.class at line 270
in modules/netpbm/classes/NetPbmGraphics.class at line 203
in modules/core/classes/GalleryDerivativeImage.class at line 328
in modules/core/ItemAdmin.inc at line 72
in modules/core/classes/GalleryView.class at line 162
</TD></TR></TABLE><!-- BBCode End -->

If I change back to ImageMagick then I can add the same picture without any problems

Followup: Both ImageMagick and NetPBM work fine with Opera 6.0

 
Kamenko
Kamenko's picture

Joined: 2002-11-30
Posts: 14
Posted: Sat, 2002-12-07 16:26

Installed new version of G2!
Here it is:
- Works great when using IE 5.5 and uploading and viewing with ImageMagick but using NetPBM doesn't show photos in the albums. (it shows only those previously viewed using ImageMagick) Instead a little red X is showing. I'm not getting any error message like uncle does.
- Switched back to ImageMagick and all photos including those NetPBM couldn't find showed up.
- Switched back to NetPBM and all photos previously viewed (but only those) with ImageMagick showed up. Looks like that NetPBM doesn't create entries in the "cache" directory.
- Thumbnails for item album are still not generating. To be more specific every thumbnail for items "photo" within an album are showing. The thumbnail for item "album" doesn't generate at all.
- This version lost feature to preview original size of photos. Is there a setting to enable it or it's lost forever. I liked this feature a lot because visitors could download original size for printing purposes.

Excellent work. Please let me know if you want me to test something for you. I'd love to help you clean out the bugs. Once again excellent work and thanks
Kamenko
:wink: