Darkain [Darkain.com] [Photo Gallery] [Fractal Gallery] Below are the 20 most recent journal entries recorded in the "Mr. Photographer" journal:

[<< Previous 20 entries]

February 5th, 2010
12:21 pm
[User Picture]

[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"
 bool(false) 


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:

(Report Bug)

January 25th, 2010
12:22 am
[User Picture]

[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

(2 Bugs Reported | Report Bug)

January 23rd, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 10:48 I woke up WAY TOO DAMN TIRED today... First thing I read was "Powered Off"... but I thought it said "Power Puff Girls".... #
  • 16:00 @GaylordNational since when is a horde of nerds in dorky costumes for Katsucon considered "romantic"??? :P #
  • 16:01 @Amochica oops... ALL AWESOME ?!?!?!!? #
Automatically shipped by LoudTwitter

(Report Bug)

January 22nd, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR

  • 12:59 @mikkohypponen F-Secure IE poll is missing options. My entire team uses Internet Explorer 8 x64. Why isnt IE x64 represented EVER? #

Automatically shipped by LoudTwitter

(Report Bug)

January 21st, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR

  • 16:50 #Trillian 4.1 + #Twitter = EVIL! Now twitter really is just a chat window on my desktop :P #

Automatically shipped by LoudTwitter

(Report Bug)

January 20th, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 13:14 @mygoodwillstore Why are you linking to a HTTPS instead of HTTP page? It is giving security errors because of it. #
  • 13:19 Ask me anything formspring.me/darkain #
  • 21:11 Switching from #Mozilla #Thunderbird to #GMail finally. God damn is it a pain to transfer over thousands email messages :P #
Automatically shipped by LoudTwitter

(Report Bug)

January 19th, 2010
12:05 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 18:59 @Misato_n_Penpen wait, wut!? You're gonna do Fanime this year!?!? :) #
  • 19:01 New Chair. New Desk. New office! KVM setup between laptop/server. I'm all set to code shit now!! #
  • 20:07 @Misato_n_Penpen d00d sweet!! We should meetup and hangout, and maybe do a shoot or two. ;) #
Automatically shipped by LoudTwitter

(Report Bug)

January 17th, 2010
09:33 pm
[User Picture]

[Link]

Adventures in building a bullshit desk
( Furniture Building Shenanigans )
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR

  • 01:25 My day for Saturday??? Spend it all building three brand new virtual machines from scratch!! (crazy details as to why come later on LJ) #

Automatically shipped by LoudTwitter

(Report Bug)

January 16th, 2010
12:03 am
[User Picture]

[Link]

I C WUT U DID THAR

  • 13:21 OH MAN!!! I thought I had fully b0rkt our dedicated web server... Turns out the temp folder was just full. :P #

Automatically shipped by LoudTwitter

(Report Bug)

January 15th, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 17:39 YAY!!! Possibly all three hard drives in my server are dieing... but I'm not suprised one bit really. #
  • 17:42 Power On time - Drive 1: 1.9 years - Drive 2: 3.6 years - Drive 3: 6.4 years - this is POWERED ON TIME, not the life of the drive... #
  • 18:21 HOLY CRAP! When cleaning out the HDDs I found 2002 editions of RM-X. Now THAT is some damn good software history right there. #
  • 18:29 HAHAHAAAAAA... Found some WarDriving documents from 2004... Open routers all over Puyallup and Tacoma! #
  • 23:27 Dear #Nintendo please make a game titled "Bruce Wii"... I'm sure you can figure the rest out from there. ;) #
Automatically shipped by LoudTwitter

(6 Bugs Reported | Report Bug)

January 14th, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR
Automatically shipped by LoudTwitter

(Report Bug)

January 13th, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR

  • 11:31 Just built a new #Subversion #SVN server today. Minimalist #Debian #Linux #VMWare image. YAY for portability!! #

Automatically shipped by LoudTwitter

(Report Bug)

January 12th, 2010
12:02 am
[User Picture]

[Link]

I C WUT U DID THAR

  • 21:37 WTF firefox web site!? I cannot download linux FF on linux? It always gives me the damn windows binary!! Way to go "open source"... #

Automatically shipped by LoudTwitter

(1 Bug Reported | Report Bug)

January 11th, 2010
12:03 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 21:29 This is what happens wheb glass b bottle pop is too close to the coolant in the fridge. tweetphoto.com/8492799 #
  • 21:46 Sweet! Got a working net-boot diskless #Linux #FireFox #Kiosk setup going. Current image size ~34MiB. Will optimize to make it smaller now!! #
Automatically shipped by LoudTwitter

(Report Bug)

January 9th, 2010
12:01 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 11:39 My twitter feels like a flooded chat room. Thinkin of removing peeps. Remember, Darkain Multimidea related tweets are @DarkainCOM, not this. #
  • 14:11 Expanding the Darkain Multimedia business today. Gonna test out making money in marketing. Lets see how well this plays out! :D #
Automatically shipped by LoudTwitter

(Report Bug)

January 7th, 2010
12:03 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 13:32 stupid new BECU stole me cash deposit. put the money in, said it couldn't read it, and wouldn't give the bills back. :( #
  • 14:22 @pixiekitty015 that sounds like my kind of plan!! :D #
Automatically shipped by LoudTwitter

(Report Bug)

January 5th, 2010
12:03 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 00:05 The last couple hours can easily be summed up in one line: "Make is so, Pwnses" #
  • 15:35 New ÜberTwitter is pretty damn sweet!! #
  • 16:15 @Chunlichan if you have a BlackBerry then ÜberTwitter is the best! :) #
Automatically shipped by LoudTwitter

(Report Bug)

January 3rd, 2010
12:00 am
[User Picture]

[Link]

I C WUT U DID THAR
  • 22:20 @yayahan the true essence of cosplay isn't the model OR outfit. Its just a big costume party and having fun! myloc.me/2zpad #
  • 22:23 Still in Tacoma a few more days... Would be nice to get a shoot or two in before I head on out. myloc.me/2zpp9 #
Automatically shipped by LoudTwitter

(1 Bug Reported | Report Bug)

January 2nd, 2010
01:19 am
[User Picture]

[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/

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

(2 Bugs Reported | Report Bug)

[<< Previous 20 entries]

Darkain Multimedia Powered by LiveJournal.com

My Ads