Darkain
[Recent Entries][Archive][Friends][User Info]
[Darkain.com]
[Photo Gallery]
[Fractal Gallery]
Below are the 20 most recent journal entries recorded in the "Mr. Photographer" journal:[<< Previous 20 entries]
12:21 pm
![[User Picture]](http://l-userpic.livejournal.com/23344115/905433) [Link] |
Problems With PHP Compiled Using "--with-curlwrappers" Option Firstly, lets look at PHP's list of supported stream Protocols/Wrappers: http://us.php.net/manual/en/wrappers.php
There is no mention at all of cURL on this page.
Next, lets take a look at the HTTP(s) Stream Wrapper page: http://us.php.net/manual/en/wrappers.http.php
Still no mention of cURL on this page either!
Now, what about on the stream_get_meta_data() documentation page? http://us.php.net/manual/en/function.stream-get-meta-data.php
Again, not a single mention of cURL...
And now, the final logical place to check for this information... The fopen() documentation: http://php.net/manual/en/function.fopen.php
The only mention of cURL is in the user generated comments, none of which relates to this particular issue at all.
Okay, lets start to get dirty. I have two LAMP setups. One of them has PHP configured with "--with-curlwrappers" while the other does NOT! This was also completely unknown to me until I started finding bugs in my code regarding fopen() with HTTP streams to 404 pages.
The first simple test code:
$file = @fopen('http://www.example.com/', 'rb');
var_dump($file);
|
Output with "--with-curlwrappers"
resource(37) of type (stream)
|
Output without "--with-curlwrappers"
resource(39) of type (stream)
|
The second test code (should be a 404 or otherwise error page):
$file = @fopen('http://www.example.com/a-non-existant-page/', 'rb');
var_dump($file);
|
Output with "--with-curlwrappers"
resource(37) of type (stream)
|
Output without "--with-curlwrappers"
As you can see from this test, if "--with-curlwrappers" is used in the compile configuration, error documents are still accepted by the standard fopen() function. Now, lets explore this further by using more PHP stream functions, and back to a good and valid connection!
Now lets test out the difference between the two using stream_get_meta_data()
$file = @fopen('http://www.example.com/', 'rb');
if ($file !== false) {
var_dump(stream_get_meta_data($file));
}
|
Output with "--with-curlwrappers"
array(10) {
["wrapper_data"]=>
array(2) {
["headers"]=>
array(0) {
}
["readbuf"]=>
resource(38) of type (stream)
}
["wrapper_type"]=>
string(4) "cURL"
["stream_type"]=>
string(4) "cURL"
["mode"]=>
string(2) "rb"
["unread_bytes"]=>
int(0)
["seekable"]=>
bool(false)
["uri"]=>
string(23) "http://www.example.com/"
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
}
|
Output without "--with-curlwrappers"
array(10) {
["wrapper_data"]=>
array(10) {
[0]=>
string(15) "HTTP/1.1 200 OK"
[1]=>
string(30) "Server: Apache/2.2.3 (Red Hat)"
[2]=>
string(44) "Last-Modified: Tue, 15 Nov 2005 13:24:10 GMT"
[3]=>
string(32) "ETag: "b300b4-1b6-4059a80bfd280""
[4]=>
string(20) "Accept-Ranges: bytes"
[5]=>
string(38) "Content-Type: text/html; charset=UTF-8"
[6]=>
string(22) "Connection: close "
[7]=>
string(35) "Date: Fri, 05 Feb 2010 18:27:56 GMT"
[8]=>
string(12) "Age: 3476 "
[9]=>
string(19) "Content-Length: 438"
}
["wrapper_type"]=>
string(4) "http"
["stream_type"]=>
string(14) "tcp_socket/ssl"
["mode"]=>
string(2) "rb"
["unread_bytes"]=>
int(438)
["seekable"]=>
bool(false)
["uri"]=>
string(23) "http://www.example.com/"
["timed_out"]=>
bool(false)
["blocked"]=>
bool(true)
["eof"]=>
bool(false)
}
|
Interesting!! The entire ["wrapper_type"] block becomes absolutely useless when PHP is using "--with-curlwrappers"! No header information at all is passed along to the PHP script.
!!! WARNING !!! Using "--with-curlwrappers", the output of stream_get_meta_data() is EXACTLY the same for GOOD pages as well as ERROR and 404 pages! This is NOT a way to tell if you've landed upon a bad page or not.
!!! WARNING !!! cURL functions will NOT work on a file handle opened by fopen() even on a system where PHP is compiled and configured with "--with-curlwrappers"!
!!! WARNING !!! There is NO sure way of telling if a document is in error or not when opening it with fopen() if "--with-curlwrappers" is enabled! You are stuck with either parsing the file contents of the page in hopes the page contains easily found error information, OR... by making a second request to the URL using get_headers(). NOTE: this can easily become bad as you're making TWO requests to the destination URL instead of one, meaning you would be hitting their rate-limiters twice as fast.
Solutions: 1) Use cURL entirely instead of using fopen() for stream connections.
2) Re-configure and re-compile PHP without the "--with-curlwrappers" option.
Tags: superfeed
|
12:22 am
![[User Picture]](http://l-userpic.livejournal.com/38934836/905433) [Link] |
2009 LOLwut? So, I was sorting through my 2009 photo archive and organizing everything... well, I found some rather interesting photos in there I either had absolutely no idea about, or had completely forgot to publish. GO ME!
"I GUESS YOU DIDN'T SEE THAT, DID YOU!"

( Read more... )
Current Mood: autistic Current Music: Zelda 3 Jazz of Zelda OC ReMix
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:05 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
09:33 pm
![[User Picture]](http://l-userpic.livejournal.com/17919788/905433) [Link] |
Adventures in building a bullshit desk ( Furniture Building Shenanigans )
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:03 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:02 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:03 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:01 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:03 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:03 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
12:00 am
![[User Picture]](http://l-userpic.livejournal.com/27003323/905433) [Link] |
I C WUT U DID THAR Automatically shipped by LoudTwitter
|
01:19 am
![[User Picture]](http://l-userpic.livejournal.com/38934853/905433) [Link] |
Arbitrary "OMFG APPARENTLY THE CALANDER JUST CHANGED" post For Darkain Multimedia, I have compiled the 2009 Signature Photo Collection. If your photos didn't make the set from previous events (like Sakura-Con or Fanime), its not because of the quality of your photos. Sorry, but I didn't have access to all of my catalogs when I built the collection.
http://www.darkain.com/gallery/3061_2009_Signature_Photo_Collection/

Starting in 2010, photo from conventions will take a major change for Darkain Multimedia. The number of full featured photoshoots that we produce is going to be greatly reduced. Instead of full featured photoshoots, we're going to work on convention specific Signature Photo Collections. These will be much like the gallery above, a collection of the best photos from a particular event. By doing this, we can better serve everyone. While less photos per person/outfit will be available, this will open up time to allow for more people to get their photos. We'll be focusing on primarily 1-3 shots per outfit for the Signature Photo Collections. The hope is to try to get more people and more outfits overall into the galleries. So, instead of 10-20 photos per outfit and only 5-10 galleries, we'll be focusing on 1-3 photos per outfit all in one gallery and trying to get many more people into the gallery.
I've been talking with photographers from every background and perspective as possible. I've also been passively reading their thoughts, ideas, and complaints about being a photographer. I easily agree with quite a bit of what other photographers have been saying. It can basically be summed up as this:
Sometimes a photoshoot just does not turn out well. It is not the model's/cosplayer's fault for this. It is put square on the photographer, which would be me. What do I do when I get home and see that there are next to no usable photos in a set for what ever given reason? It could be poor location, or perhaps equipment failure, or any other number of reasons. Do I continue to process the photos, knowing that do not reflect the true nature, style, and quality of my standard work? Do I simply hand over unedited photos to the models and let them do whatever they want with them? Do I attempt to forget that the shoot even happened? This is one of the toughest situations that I'm seeing a vast majority of photographers that I know on a more personal level suffer. We're all faced with this problem and these questions.
We're all been trying several different solutions to this problem. For 2010, I have decided to take the approach of the Signature Photo Collection. This will limit me so that I do not have to feel as pressured into producing QUANTITY of photos for any given photo shoot. This will help the models more, because I'll have the time to work with more models. I wont feel as pressured into trying to produce any specific quantity of photos, because lets face it, creativity is not ever-lasting never-ending.
And now for the crazy part... For 2009 cons, I was getting photoshoot requests 6 months or earlier for some conventions. Countless of these early requests went completely unshot. Well, this time around things will be better. After picking up my BlackBerry in mid-2009, I started to put all of my scheduling on there. Yup, thats right, I've already started putting in my shoot requests for 2010 cons into the good ol CrackBerry! So, what does this mean for YOU? Well, just that... start requesting! As always, I cannot promise ANYTHING in terms of fulfilling the requests, but due to this new style of shooting, I'll have a much better chance of doing so.
Con list thus far looks like this: * Katsucon * Sakura-Con * FanimeCon * Dragon*Con * Nan-Desu-Kan
Some changes have been made to my usual rundown... Firstly, Katsucon is semi-added to the list. Once I FINALLY get paid, I'll go ahead and order plane tickets. Anime Evolution has been removed from the list due to their return to UBC. Kumoricon has once again been replaced by Dragon*Con, which will be a perminant change. Aki-Con is not listed as of yet, because it is usually a spur-of-the-moment decision to attend or not (the same goes for MewCon and InnoSera).
Besides photography, Darkain Multimedia has also been hard at work on all of our software projects. Metabase 3.0 is heavy in prodocution right now. For several years Darkain Multimedia has had a new major piece of software to release on New Years Day, but this year is different. Since Metabase is not a publically accessable software package yet, it doesn't really matter. RM-X is still on the back-burner, but I do have a full development environment setup for it once more. The XNA game is still there, yet untouched for months. There is some other ideas in the works too, but not sure when they will come about.
Follow Darkain Multimedia on: Facebook - MySpace - Twitter - LiveJournal - RSS/ATOM
|
[<< Previous 20 entries] |