This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
5806
Features / Re: New revs - Noob questions?
« on October 20th, 2011, 09:37 AM »
It means like this sentence is a boot upside the head (it's like a footprint, see)!
5807
Plugins / Re: Plugin servers / getting plugins to a system
« on October 20th, 2011, 09:16 AM »maybe you should restore it and use it as a fallback for when $size isn't set at the end of the function...?
I'd rather go to a 32K buffer than have to hit the server a second time (though the code had a habit of making two requests so even if we did a 16K hit generally and a further 64K hit if it's JPEG and we didn't find it in the first 16K, that would probably not be a killer.
(Or we could re-try with a 128KB buffer. But then it won't take other files into account -- e.g. slightly broken PNG and GIF. Not that imagesize can magically get their sizes either.)
Posted: October 20th, 2011, 08:50 AM
That said, the current code can be refined. Right now it assumes a range will be provided, of up to 16K - but support of ranges is not required (though strongly recommended) in HTTP/1.1 servers, and if the server ends up throwing a large JPG at the user, it's going to step through the file looking at the boundaries. Consequently, if the file is bigger than the specified range, we can legitimately assume it's the whole file, rather than a ranged subset, and apply getimagesize on it.
5808
Features / Re: New revs
« on October 20th, 2011, 03:52 AM »
Revision: 1125
Author: arantor
Date: 02:51:20, 20 October 2011
Message:
! Another stupid typo. (ManageServer.php)
! cURL is smart enough to decode chunked data, but when we use HTTP/1.1 requests manually, we need to unchunk it too, yay? (Class-WebGet.php)
----
Modified : /trunk/Sources/Class-WebGet.php
Modified : /trunk/Sources/ManageServer.php
@ I didn't spot this one because the data I was using never got chunked, but it broke the admin request files stuff. I only wish I'd known this like this morning, rather than discovering it at almost 2am. Still, it's fixed now.
Author: arantor
Date: 02:51:20, 20 October 2011
Message:
! Another stupid typo. (ManageServer.php)
! cURL is smart enough to decode chunked data, but when we use HTTP/1.1 requests manually, we need to unchunk it too, yay? (Class-WebGet.php)
----
Modified : /trunk/Sources/Class-WebGet.php
Modified : /trunk/Sources/ManageServer.php
@ I didn't spot this one because the data I was using never got chunked, but it broke the admin request files stuff. I only wish I'd known this like this morning, rather than discovering it at almost 2am. Still, it's fixed now.
5809
Features / Re: New revs
« on October 20th, 2011, 03:05 AM »
Revision: 1124
Author: arantor
Date: 02:05:35, 20 October 2011
Message:
! Stupid, stupid syntax error where I wasn't developing directly on the SVN files, and forgot to copy all the changes across properly. (Subs.php)
----
Modified : /trunk/Sources/Subs.php
Author: arantor
Date: 02:05:35, 20 October 2011
Message:
! Stupid, stupid syntax error where I wasn't developing directly on the SVN files, and forgot to copy all the changes across properly. (Subs.php)
----
Modified : /trunk/Sources/Subs.php
5810
Features / Re: New revs
« on October 20th, 2011, 02:59 AM »
(42K, added 2, modified 10)
Revision: 1123
Author: arantor
Date: 01:56:49, 20 October 2011
Message:
! Replace fetch_web_data with Class-WebGet, which supports cURL, arbitrary ranges and headers. (Class-WebGet.php, upgrade.php, ManageServer.php, PackageGet.php, Profile-Modify.php, ScheduledTasks.php, Subs-Graphics.php, Subs-Package.php, Subs-Template.php, Themes.php)
! Replace the url_image_size routine with a newer one that doesn't require the whole file. It works nicely on GIF and PNG and the vast majority of JPEGs (at least in my testing) without having to go and download however big the file actually is, which should limit timeouts and stuff like that. (Subs.php)
! Subs-Plugins appears not to have been committed before for some reason (should have been in 1118) :/
----
Added : /trunk/Sources/Class-WebGet.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/PackageGet.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Graphics.php
Modified : /trunk/Sources/Subs-Package.php
Added : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Sources/Subs-Template.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Sources/Themes.php
Modified : /trunk/other/upgrade.php
@ I have no idea why Subs-Plugins wasn't committed before but there's no reason why it shouldn't have been.
@ There is still a fetch_web_data function in the webinstaller, mostly because it comes with its own version, rather than using anything in the core (because that's the point)
@ Also, no idea why this commit is so big.
Revision: 1123
Author: arantor
Date: 01:56:49, 20 October 2011
Message:
! Replace fetch_web_data with Class-WebGet, which supports cURL, arbitrary ranges and headers. (Class-WebGet.php, upgrade.php, ManageServer.php, PackageGet.php, Profile-Modify.php, ScheduledTasks.php, Subs-Graphics.php, Subs-Package.php, Subs-Template.php, Themes.php)
! Replace the url_image_size routine with a newer one that doesn't require the whole file. It works nicely on GIF and PNG and the vast majority of JPEGs (at least in my testing) without having to go and download however big the file actually is, which should limit timeouts and stuff like that. (Subs.php)
! Subs-Plugins appears not to have been committed before for some reason (should have been in 1118) :/
----
Added : /trunk/Sources/Class-WebGet.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/PackageGet.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Graphics.php
Modified : /trunk/Sources/Subs-Package.php
Added : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Sources/Subs-Template.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Sources/Themes.php
Modified : /trunk/other/upgrade.php
@ I have no idea why Subs-Plugins wasn't committed before but there's no reason why it shouldn't have been.
@ There is still a fetch_web_data function in the webinstaller, mostly because it comes with its own version, rather than using anything in the core (because that's the point)
@ Also, no idea why this commit is so big.
5811
Plugins / Re: Plugin servers / getting plugins to a system
« on October 20th, 2011, 02:19 AM »
After a day of swearing and wrangling I've got something I'm reasonably happy with, but I'm not quite as happy as I could be.
GIF and PNG work well enough, they only need the first dozen bytes or so but JPEG is a pain because the header is not necessarily where you expect it to be. Plans of just grabbing the first KB went out the window as soon as I started investigating JPEGs, I bumped it to 8KB pretty quickly, and I'm currently working on 16KB.
Still, downloading 16KB to determine file size isn't bad. Of the 15364 files tested with either .jpg or .jpeg extension on my PC, 15039 were able to have their file sizes detected to be the same as what getimagesize returns. Of the 325 remaining, there are a number that are damaged files anyway (recoveries from old HDs and so on) and the rest, pretty much unilaterally, have the relevant marker block after the 16KB boundary. Larger files (even 512x512) sometimes have the boundary at 20KB into the file.[1]
So at this point I'm playing the game of diminishing returns, I can either up the boundary and accept the inevitable loss of performance or I can cut my losses.
Hmm, let's run some stats and get a proper handle on the state of play.
* 16KB: matches 15039 out of 15364 (97.8%)
* 32KB: matches 15246 out of 15364 (99.2%)
* 64KB: matches 15284 out of 15364 (99.5%)
Of the 80 that couldn't be matched at 64K, only 3 weren't corrupted, and they're ones that are special, using CMYK colour separation, so that some browsers don't render them properly anyway.
So we're really looking at 15287 files not 15364 here, which puts the percentages at:
16K: 98.4%
32K: 99.7%
64K: 99.9%
I think I'm going to call it a day here and commit things with the 16K version; we can always bump it up to 32K (or provide instructions) if need be.
GIF and PNG work well enough, they only need the first dozen bytes or so but JPEG is a pain because the header is not necessarily where you expect it to be. Plans of just grabbing the first KB went out the window as soon as I started investigating JPEGs, I bumped it to 8KB pretty quickly, and I'm currently working on 16KB.
Still, downloading 16KB to determine file size isn't bad. Of the 15364 files tested with either .jpg or .jpeg extension on my PC, 15039 were able to have their file sizes detected to be the same as what getimagesize returns. Of the 325 remaining, there are a number that are damaged files anyway (recoveries from old HDs and so on) and the rest, pretty much unilaterally, have the relevant marker block after the 16KB boundary. Larger files (even 512x512) sometimes have the boundary at 20KB into the file.[1]
So at this point I'm playing the game of diminishing returns, I can either up the boundary and accept the inevitable loss of performance or I can cut my losses.
Hmm, let's run some stats and get a proper handle on the state of play.
* 16KB: matches 15039 out of 15364 (97.8%)
* 32KB: matches 15246 out of 15364 (99.2%)
* 64KB: matches 15284 out of 15364 (99.5%)
Of the 80 that couldn't be matched at 64K, only 3 weren't corrupted, and they're ones that are special, using CMYK colour separation, so that some browsers don't render them properly anyway.
So we're really looking at 15287 files not 15364 here, which puts the percentages at:
16K: 98.4%
32K: 99.7%
64K: 99.9%
I think I'm going to call it a day here and commit things with the 16K version; we can always bump it up to 32K (or provide instructions) if need be.
| 1. | Just consider this for a moment. We're talking JPG. It's not layered, not transparent, doesn't have multiple 'images' inside, and yet we have 20KB of stuff before we get to set out the *size* of the image. Funnily enough I can tell you exactly what tools cause that, and one company in particular... :whistle: I'll leave you to guess which company. |
5812
The Pub / Re: When can I download Wedge? / Where can I download Wedge?
« on October 19th, 2011, 11:10 PM »running at 100 mph
As for everything else, we do try and offer up not only the pictures of how things are going, and the changelog but also insight and discussion into the direction we're going. Not all of that insight and discussion is currently public, but it isn't just two madmen with boxes.[2]
| 1. | Movie quote. Can't be tamed, lest I diminished the effect, sorry. |
| 2. | Doctor Who reference. |
5813
Off-topic / Re: The UK's idea of policing the internet
« on October 19th, 2011, 09:48 PM »
I'm still waiting for guidance on how the notion of opt-in for cookies is supposed to work given the changes in the spring about it, again another fine mess of being seen to be tackling problems without understanding the problem or the consequences of the "fix".
5814
Off-topic / Re: The UK's idea of policing the internet
« on October 19th, 2011, 09:36 PM »
Yup, yet another piece of stupidity, designed by people who don't have to implement it and don't understand or care about the actual consequences that will arise - though they'll be so quick to pat themselves on the back about how they cleaned up the web.
5815
Off-topic / Re: The UK's idea of policing the internet
« on October 19th, 2011, 07:11 PM »
Herein lies the problem: I could wake up one morning to find my host had received a request overnight to shut down a site, without prior warning. At least a lawsuit can be contested, whereas such a request theoretically might not be able to - if the host is suspended, under the terms of suspension it may not always be possible for a site operator to get it unsuspended, if say access to the CMS is tied to domain name and the entire domain is taken down, unless the host is willing to do the work for you or otherwise help you, you're stuffed.
Also note that while the focus is anonymous posters, the term 'anonymous' is incredibly vague these days where everyone can create a new pseudonym with about as much anonymity as would be possible - in everything but name, really.
Also note that while the focus is anonymous posters, the term 'anonymous' is incredibly vague these days where everyone can create a new pseudonym with about as much anonymity as would be possible - in everything but name, really.
5816
Off-topic / Re: The UK's idea of policing the internet
« on October 19th, 2011, 06:16 PM »
No, it implies that anonymous posters can post libel still but that the risk is carried much more broadly by the host, since a single complaint about some libel can lead to a site *shutdown* request being sent to the host, which the host would have to comply with if it's a UK based host. (UK based user operating a site on a US server... not so clear but I figure the site owner could legitimately be the subject of the order.)
The problem is crap like this is getting into the legal system by lawmakers who have no idea or understanding of the consequences - and it'll be people like me who have to enact the outfall. I'll have to provide some support for this in Wedge if I run sites using it :/
The problem is crap like this is getting into the legal system by lawmakers who have no idea or understanding of the consequences - and it'll be people like me who have to enact the outfall. I'll have to provide some support for this in Wedge if I run sites using it :/
5817
Off-topic / The UK's idea of policing the internet
« on October 19th, 2011, 04:45 PM »
Have a read of http://www.theregister.co.uk/2011/10/19/proposals_on_defamation_law/
It has interesting consequences for us (well, me in particular :P)
I think the whole anonymous thing is going to bite people in the arse before long, personally, but one thing I do find interesting is the notion of publishing a complaint next to a post itself. That essentially means publishing the report-to-moderator stuff as freely as regular posting. I see two problems with this.
Firstly, it seems to me that the complainant will have to identify themselves, which if I were to - say - report a post because I find it offensive, I'm essentially telling the world that I personally have a problem with a post. While that's not a great example, imagine a forum with more sensitive discussions, e.g. personal abuse support. I certainly wouldn't want my name attached to a publicly-visible complaint.
Secondly, can we say spam magnet? Posts can be moderated but complaints don't appear to be such.
Sure, we can indicate 'type of complaint', such that personal complaints don't need to be made public and can be restricted to intra-forum matters, e.g. reporting spam, personal offence, and leave libel ones public. But that won't solve the spam bot problem, since they'll just learn to select 'libel' to have their crap posted publicly.
Thoughts?
It has interesting consequences for us (well, me in particular :P)
I think the whole anonymous thing is going to bite people in the arse before long, personally, but one thing I do find interesting is the notion of publishing a complaint next to a post itself. That essentially means publishing the report-to-moderator stuff as freely as regular posting. I see two problems with this.
Firstly, it seems to me that the complainant will have to identify themselves, which if I were to - say - report a post because I find it offensive, I'm essentially telling the world that I personally have a problem with a post. While that's not a great example, imagine a forum with more sensitive discussions, e.g. personal abuse support. I certainly wouldn't want my name attached to a publicly-visible complaint.
Secondly, can we say spam magnet? Posts can be moderated but complaints don't appear to be such.
Sure, we can indicate 'type of complaint', such that personal complaints don't need to be made public and can be restricted to intra-forum matters, e.g. reporting spam, personal offence, and leave libel ones public. But that won't solve the spam bot problem, since they'll just learn to select 'libel' to have their crap posted publicly.
Thoughts?
5818
Off-topic / Re: Adding Value to the project
« on October 19th, 2011, 04:21 PM »
Is the demo site up to date?
5819
The Pub / Re: When can I download Wedge? / Where can I download Wedge?
« on October 19th, 2011, 04:17 PM »and then saying what a load of rubbish it is without offering anything constructive you can work on :whistle:
5820
The Pub / Re: When can I download Wedge? / Where can I download Wedge?
« on October 19th, 2011, 03:58 PM »I agree before you guys even think about releasing it it must be solid as you know how it is you have those waiting in the wings just to tear apart all the hard work you have put into it