archive-com.com » COM » B » BENRAMSEY.COM

Total: 425

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Hello From OSCON, by Ben Ramsey
    s been very busy around the office but now that things have slowed down a little I plan to be around a bit more So now I m breaking my radio silence to write about OSCON I ll be here all week and I hope to blog consistently about the goings on Today and tomorrow are the tutorial days and at times tutorials can be too long because the speakers are often dry The information is great but the delivery is not always very engaging Nevertheless I did enjoy the two tutorials I attended today Rasmus s You Got JavaScript in My PHP And and Theo s Scalable Internet Architectures tutorials I ve also had the chance to catch up with some old friends and I ran into Cal Evans in the hallway today wearing the t shirt below On the shirt it reads PHP is the new BLACK Anyone want to enlighten me as to what that means So now I ve heard tale of some secret announcement party for bloggers and the press to attend Gotta make my way there and see what the hoopla is all about By Ben Ramsey Posted on 24 Jul 2007 HTTP Response

    Original URL path: https://benramsey.com/blog/2007/07/hello-from-oscon/ (2016-04-26)
    Open archived version from archive


  • HTTP Response Code Musings, by Ben Ramsey
    reason for the refusal in the entity Another option is to use an actual 200 OK response and deliver another entity rather than the requested resource I imagine this is what most applications do However I felt that 200 OK signifies to the client that it is actually getting back the requested resource Since that s not happening I wanted the client to know that it wasn t getting the resource Furthermore we re using a McAfee HTTP API to do some virus scanning of documents The API returns a 200 OK response when the document has finished scanning and is free from viruses but it returns a 406 Not Acceptable response if it encounters a virus While it doesn t really matter to me what response code McAfee returns for a failure what s important is that they ve defined what a failed response looks like and I can capture it and take appropriate action it is interesting to note that the 4xx error codes are not intended to report responses like this The 4xx class of status code is intended for cases in which the client seems to have erred Clearly the client did not err in this case there was no Accept header present for which the resource could not generate a response Instead the POSTed file was successfully processed and while the request was successful McAfee found a virus and needs to report it to a client They chose to use 406 to make this clear Instead I think they should use 200 OK because the POST request was successful and the response body should indicate the status of the document clean or infected So going back to Adam s post he questions when to use 4xx responses and when to use 5xx In general if

    Original URL path: https://benramsey.com/blog/2007/06/http-response-code-musings/ (2016-04-26)
    Open archived version from archive

  • PHP and Oracle Manual, by Ben Ramsey
    the many Oracle texts available This is a must read for anyone using Oracle and PHP together and they continually maintain it and keep it up to date On page 80 of the manual it states If you are using an Oracle Database 10g Release 2 database other than the Express Edition XE you may need to give the Apache process access to Oracle s libraries and globalization data Refer

    Original URL path: https://benramsey.com/blog/2007/06/php-and-oracle-manual/ (2016-04-26)
    Open archived version from archive

  • Accepting Outlook Invites from Apple Mail, by Ben Ramsey
    downright fugly The root of the problem is that I use a Mac I could choose to use OWA or Entourage but OWA is simply unacceptable and Entourage is clunky and slow at best I don t want to ramble too much longer before getting to the point but I ll just say Thunderbird s Lightning extension is also fugly and also doesn t appear to recognize many calendar invitations For those it did recognize I couldn t add them to the calendar Finally I decided to try the combination of Apple Mail and iCal but again I encountered problems Some calendar invites included the proper ICS calendar attachments while others appeared not to have the ICS attachment However this was misleading since the VCALENDAR data is clearly in the raw message source and the message includes the Content Class header with a value of urn content classes calendarmessage What Why can t Apple Mail read it Nevertheless after some searching I came across a nice AppleScript that will detect the calendar message and automatically add it to iCal for you to accept reject Your acceptance of the message still doesn t communicate with the Exchange server so others can

    Original URL path: https://benramsey.com/blog/2007/06/accepting-outlook-invites-from-apple-mail/ (2016-04-26)
    Open archived version from archive

  • Intl PHP Conference Slides, by Ben Ramsey
    I apologize that it has taken me this long to post these Links to the slides are below I once again found myself in Germany Ludwigsburg specifically for the International PHP Conference Spring Edition This location was much better than the hotel conference location in Frankfurt because it was right in the town of Ludwigsburg This made it easy to walk around sight see and find things to do outside of the conference This time around I gave two talks Designing RESTful Web Applications and Give Your Site A Boost With memcached Overall I was very proud of these talks especially the one on REST The REST talk has been growing and changing over the last few times I ve given it and now I think it s maturing into an excellent discussion of REST theory coupled with practical tips on designing a RESTful application Perhaps I ll spend some more time talking about REST on this blog in the coming weeks and months For now enjoy the slides Designing RESTful Web Applications PDF 2 1 MB Give Your Site A Boost With memcached PDF 2 2 MB By Ben Ramsey Posted on 4 Jun 2007 New York PHP s

    Original URL path: https://benramsey.com/blog/2007/06/ipcse07-slides/ (2016-04-26)
    Open archived version from archive

  • New York PHP's April Meeting, by Ben Ramsey
    informative as usual but this time there will be a twist on the sometimes dry topic of security You ll have to come see what I m talking about you re bound to be entertained I m looking forward to it If you want to attend be sure you RSVP or you might not be able to get in Here are the details What New York PHP When April 24

    Original URL path: https://benramsey.com/blog/2007/04/new-york-phps-april-meeting/ (2016-04-26)
    Open archived version from archive

  • NY Thoughts and Zend_View_Helper Notes, by Ben Ramsey
    the Zend Framework I d like to provide some pointers on using helpers with views in a much more automated way Just as views can be automated that is you don t have to instantiate a Zend View object the controller does it all for you when you call this render from any controller action you do not have to explicitly tell Zend View where your helpers reside as the manual suggests Instead place your helpers in a special helpers folder where the Zend Controller Action s initView can find them In keeping with my previous example your helpers would live in a helpers folder beneath the views folder application controllers models views helpers TranslateText php scripts library webroot All helpers contained in this helpers folder are automatically available to your views albeit with a few caveats The Zend Framework manual doesn t make it very clear how to name your helpers It states The class name must at the very minimum end with the helper name itself using CamelCaps E g if you were writing a helper called specialPurpose the class name would minimally need to be SpecialPurpose You may and should give the class name a prefix and it is recommended that you use View Helper as part of that prefix My View Helper SpecialPurpose Thus when I first created a helper I simply gave it the class name TranslateText because I was working on a translation helper This did not work So I gave it another name My View Helper TranslateText This also did not work The helper was not available to my views until I specifically named it Zend View Helper TranslateText Then I was able to access it from a view with this translateText The file name however can be whatever you want If you

    Original URL path: https://benramsey.com/blog/2007/04/ny-thoughts-and-zend_view_helper-notes/ (2016-04-26)
    Open archived version from archive

  • Zend Framework View Notes, by Ben Ramsey
    example if your application is set up like this application controllers models views library Zend Zend php webroot index php Then to make use of the controller s default render behavior add a scripts directory under the application views directory Then inside the scripts directory create a directory for every controller The directory must have an all lowercase version of the controller name without the word Controller So if you have a CustomerController class then the directory would simply be customer Inside this directory create a view file for every action you will render following the same naming conventions Thus if you have an indexAction and an addressAction you would have the files index phtml and address phtml in application views scripts customer The phtml extension is the default for views in the Zend Framework see Rob Allen s discussion on the use of the phtml extension Finally to use the views you ll need to initialize them in your controller Do this by creating an init method and calling this initView from within it This sets up the default view for your controller From within any action you may now set properties on your view as normal with this view propertyName and you can render the view with this render there is no longer a need to echo So to recap with a directory structure like this application controllers CustomerController php models views scripts customer index phtml address phtml library Zend Zend php webroot index php and a controller like this php class CustomerController extends Zend Controller Action public function init this initView public function indexAction this render public function addressAction this render you can much more easily work with views in the Zend Framework Note that Zend Controller Action initView determines the location of the views directory on

    Original URL path: https://benramsey.com/blog/2007/04/zend-framework-view-notes/ (2016-04-26)
    Open archived version from archive



  •