Staredit Network > Forums > Staredit Network > Topic: SQL Error on Use of [img] Tag
SQL Error on Use of [img] Tag
Sep 10 2010, 8:30 pm
By: DT_Battlekruser  

Sep 10 2010, 8:30 pm DT_Battlekruser Post #1



So, it seems people are having troubles uploading images using the [img] tag. This problem does not seem to occur with any sensible boundaries, so I would just like to ask you to report any time that you try and fail to upload an image.

For example, I can upload mostly without problem, but the image http://img812.imageshack.us/img812/8642/sensun.png will not upload ("MySQL server has gone away" error). Have not been able to reproduce with any other image.




None.

Sep 10 2010, 8:37 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch


uploaded it with no trouble.




Sep 10 2010, 9:40 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

finally got one (yours).
I wonder if it's something to do with the filename?




"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 10 2010, 9:59 pm CecilSunkure Post #4



Yeah, it's either the URL or some aspect of the image. I don't suspect filetype. My guess is the URL or the file dimensions are causing the error.



None.

Sep 10 2010, 10:01 pm DT_Battlekruser Post #5



Have successfully uploaded images of larger pixel size and data size, so it's probably not that. I see nothing wrong with the URL itself; the filename is "sensun.png" - seems pretty normal - and other imageshack stuff has been done without error.



None.

Sep 10 2010, 10:09 pm DevliN Post #6

OVERWATCH STATUS GO

I just tried posting that image as http://img714.imageshack.us/img714/4752/suntest.png and http://img155.imageshack.us/img155/5933/sentest.png and neither worked. There has to be something about that image or the URL that is screwing this up. Do other imageshack URLs work?

EDIT:


EDIT2
Looks like imageshack works. It has to be that image.

Post has been edited 2 time(s), last time on Sep 10 2010, 10:16 pm by DevliN.



\:devlin\: Currently Working On: \:devlin\:
My Overwatch addiction.

Sep 10 2010, 10:18 pm DT_Battlekruser Post #7



Yeah, the MySQRL pic was from imageshack too. The other thing I'm interested in with this thread is whether there are other images that have failed as well. People have been complaining of bugs; are there any other problems with [img]?



None.

Sep 10 2010, 11:14 pm rockz Post #8

ᴄʜᴇᴇsᴇ ɪᴛ!

I can't upload it to tinypic, it's too big.

It's definitely imageshack and the size of the image.

http://img685.imageshack.us/img685/8642/sensun.png

I'm doubtful if it's the image itself. This is a compressed version of the same image, which won't post.

Post has been edited 3 time(s), last time on Sep 10 2010, 11:40 pm by rockz.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Sep 10 2010, 11:54 pm DavidJCobb Post #9



The URL rockz just posted, sensun.png... I attempted to preview that as an IMG tag and got an SQL error:
Code
A Staredit Network error has occured:
Query failed : SELECT * FROM attachments WHERE att_mid=5726 AND ((att_status=0 AND att_posts=0))
2006
MySQL server has gone away

Please contact administration with all the details.


The problem is clearly with the thumbnail code, the code that checks an image's size and if it's too large, writes out a JS-enabled IMG. But why would that fail to function?

We should try to narrow this down. Is it a problem with the image simply being too large, or is there something about that particular size or range of sizes?



None.

Sep 11 2010, 12:02 am Aristocrat Post #10



It's most likely any picture larger than 425 pixels. Let me test...





Nope, hm.

Interesting to note that for a period of time, I was unable to post the first image without an error. It works now, apparently.

EDIT> Test 4500x2234


EDIT2> I'm losing minerals by editing this post. Sigh.

Post has been edited 2 time(s), last time on Sep 11 2010, 12:12 am by Aristocrat.



None.

Sep 11 2010, 12:32 am O)FaRTy1billion[MM] Post #11

👻 👾 👽 💪

It's the images themselves.

http://farty1billion.dyndns.org/sensun.png - Saved the image from imageshack into my server.
http://98.202.196.115/.png - Not the filename
http://farty1billion.dyndns.org/shakurastiles2.png - Original image only from my server. Doesn't work.
http://farty1billion.dyndns.org/Psi.png - Original image only from my server ... but it works




TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Sep 11 2010, 3:09 am poiuy_qwert Post #12

PyMS and ProTRG developer

Quote from DavidJCobb
The problem is clearly with the thumbnail code, the code that checks an image's size and if it's too large, writes out a JS-enabled IMG. But why would that fail to function?

We should try to narrow this down. Is it a problem with the image simply being too large, or is there something about that particular size or range of sizes?
Thats what I've been thinking. Here are the images from the thread I was trying to post when I originally found this problem, I don't have time to test them but I believe at least some result in the same error:





Sep 11 2010, 3:24 am The Starport Post #13



Might not be the problem, but I'm told it's not good practice to store images and such directly in the database (as BLOBs or whatnot) if you have the option not to. Storing the images to the file system and referring to them by their address in the database is more preferable.

Might consider that for both a speed improvement and a possible fix.

Post has been edited 1 time(s), last time on Sep 11 2010, 3:31 am by Tuxedo-Templar.



None.

Sep 11 2010, 3:47 am DavidJCobb Post #14



Quote from name:Tuxedo-Templar
Might not be the problem, but I'm told it's not good practice to store images and such directly in the database (as BLOBs or whatnot) if you have the option not to. Storing the images to the file system and referring to them by their address in the database is more preferable.

Might consider that for both a speed improvement and a possible fix.
I don't think that anything on SEN except for maybe the file upload functionality does that. It would be a good speed improvement except that I don't think there's anything on SEN where that change isn't already in effect.



None.

Sep 11 2010, 3:49 am Jack Post #15

>be faceless void >mfw I have no face

Incidentally, I rarely post images in my posts but I've been getting this error all the time, randomly, since it began. I just refresh and it works.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Sep 11 2010, 9:50 pm Forsaken Archer Post #16



Quote from name:Tuxedo-Templar
Might not be the problem, but I'm told it's not good practice to store images and such directly in the database (as BLOBs or whatnot) if you have the option not to. Storing the images to the file system and referring to them by their address in the database is more preferable.

Might consider that for both a speed improvement and a possible fix.
SEN doesn't store images in the database.


I think the problem isn't really the images themselves, but they take a little longer to parse or something. It seems the connection time allowed is just on the edge of having issues and the images sets it off.

Post has been edited 1 time(s), last time on Sep 11 2010, 10:05 pm by Forsaken Archer.



None.

Sep 12 2010, 6:43 pm NudeRaider Post #17

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

So it might be some recently implemented inefficient code that is slowing down the parsing?
Because it worked fine for years, images or not.




Sep 12 2010, 7:09 pm Moose Post #18

We live in a society.

The function called to get the image size might be a fairly recent addition because it would provide information necessary for thumbnails and resizing.




Sep 13 2010, 4:14 am DT_Battlekruser Post #19



The slow function is getimagesize. It's a PHP library function and it can take as long as 15 seconds to return for the large image that's causing problems. Most images parse faster, but the call was probably always there. I suspect one of two things happened:

1) The timeout on the SQL database was lessened (15s seems a little short)
2) Something about this image is abnormal as far as being parsed by getimagesize. The delays are additive, so will likely encounter a similar error by including lots of images in your post (an average-size image takes a little less than 1s to parse)




None.

Sep 13 2010, 4:38 am shmeeps Post #20



Quote from Forsaken Archer
Quote from name:Tuxedo-Templar
Might not be the problem, but I'm told it's not good practice to store images and such directly in the database (as BLOBs or whatnot) if you have the option not to. Storing the images to the file system and referring to them by their address in the database is more preferable.

Might consider that for both a speed improvement and a possible fix.
SEN doesn't store images in the database.


I think the problem isn't really the images themselves, but they take a little longer to parse or something. It seems the connection time allowed is just on the edge of having issues and the images sets it off.
This would be my guess. It could be possible the script is waiting for a response from the server? And during that time the SQL connection times out.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[03:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[2024-5-06. : 12:51 am]
Oh_Man -- definitely EUD
[2024-5-05. : 9:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[2024-5-05. : 9:35 pm]
Vrael -- that is insane
[2024-5-05. : 9:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: Roy, RIVE