Not logged in. · Lost password · Register
Forum: Advanced Guestbook Support Forum RSS
Wrong image file type
corthebor #1
Member since Sep 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Wrong image file type
When I try to upload an image to my guestbook, I receive a 'GUESTBOOK ERROR' saying:

Wrong image file type

My image is 50 kb and it does not matter wether it is an 'GIF' or a 'JPG' image, and image upload is enabled in administration mode.

How can I solve this problem.

gr.

Cor
Avatar
carbonize (Administrator) #2
Member since Jan 2004 · 789 posts · Location: Bristol, UK
Group memberships: Administrators, Members
Show profile · Link to this post
Are you sure it's a gif or jpg and not something else with a different extension. Shouldn't be returning that error unless they used something like a bmp or a tiff.
C a r b o n i z e
corthebor #3
Member since Sep 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Quote by "carbonize":
Are you sure it's a gif or jpg and not something else with a different extension. Shouldn't be returning that error unless they used something like a bmp or a tiff.

Yes, even I tried caps (.JPG) and non caps(.jpg), it will still give me the same message: wrong file type.


I hope you can help me solving this problem.

gr.

Cor

PS

If you want to try: www.mydomain.nl/gbook
This post was edited on 2006-09-14, 11:12 by Unknown user.
Avatar
carbonize (Administrator) #4
Member since Jan 2004 · 789 posts · Location: Bristol, UK
Group memberships: Administrators, Members
Show profile · Link to this post
OK I'll look into it but as a matter of urgency you need to disable HTML in the guestbook as it can be used to deface the guestbook.
C a r b o n i z e
Avatar
carbonize (Administrator) #5
Member since Jan 2004 · 789 posts · Location: Bristol, UK
Group memberships: Administrators, Members
Show profile · Link to this post
Ok I'm wondering if it's not a problem with getimagesize.

Open add.class.php in lib folder and replace

return $this->db->gb_error($this->db->LANG["ErrorPost7"]);

with

return $this->db->gb_error($this->db->LANG[&quot;ErrorPost7&quot;].&quot;<br>\n<pre>\n&quot;.print_r($size, true).'</pre>');

This should help debug the problem.
C a r b o n i z e
corthebor #6
Member since Sep 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Thnx,

I will change the script in a couple of days, because I am not able to change the files right now on this moment, because I am out of the country for a few days. I'll let you know when I have changed the script, so that we can debug this little problem.

Thanx anyway.

Cor
corthebor #7
Member since Sep 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Quote by "carbonize":
Ok I'm wondering if it's not a problem with getimagesize.

Open add.class.php in lib folder and replace

return $this->db->gb_error($this->db->LANG[&quot;ErrorPost7&quot;]);

with

return $this->db->gb_error($this->db->LANG[&quot;ErrorPost7&quot;].&quot;<br>\n<pre>\n&quot;.print_r($size, true).'</pre>');

This should help debug the problem.

Ok, I changed the code like you suggested.

I don't see any difference on the error-page and also I see no file-size printed.

Maybe you can take another look at my page?

And in what directory does gbook keep his images, so that I can check the properties of this directory?
(As I could see later in config.php, public is the upload-directory for images. I made this directory chmod 777, but still the same error-message)

www.mydomain.nl/gbook


Thanks in advance

Cor
This post was edited on 2006-09-14, 11:13 by Unknown user.
Avatar
carbonize (Administrator) #8
Member since Jan 2004 · 789 posts · Location: Bristol, UK
Group memberships: Administrators, Members
Show profile · Link to this post
Ok I'll throw together a test file that will allow you to upload a file and then print a message at each stage. it's either that or you give me FTP access and I modify your add.class.php file whilst running live tests on it.
C a r b o n i z e
corthebor #9
Member since Sep 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: wrong image file type
ok,

The problem is solved. I made tmp and public directory writeable for everyone (chmod 777) and that did the trick.

Thanks to Carbonize for the help.

gr.

Cor
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
Smilies: :lmao: ':)' :hug: :-)) :shrug: :-' :lol: x-( :-x :'( :-o :-{} :-! :-? :"> :-(( B-) ;-) #-( :-# O_o TiT :-zZ :-) ZzZ
Special characters:
Go to forum
Unclassified NewsBoard 1.6.3 © 2003-6 by Yves Goergen
Page created in 147.5 ms (71.1 ms) · 80 database queries in 11.1 ms
Current time: 2010-09-10, 15:46:02 (UTC +01:00)