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".
  • Zend Executable Debugger Eclipse Plugin, by Ben Ramsey
    the PHP IDE you can find it in the same place but the name has changed The name change isn t what I wanted to write about though Rather I wanted to take a moment to talk about the free Zend Executable Debugger plug in for Eclipse The Zend Executable Debugger plug in is part of the all in one PDT package but if you want to install it on your own since it s possible to use this debugger without the PDT and with PHPEclipse for example then you ll need to install it using the Eclipse Update Manager the easier way To install the Zend Executable Debugger plug in using the Update Manager follow the instructions I provided earlier to set up a new update site using the following information PHP Development Tool PDT UPDATE URL http downloads zend com pdt Please note that the Zend Executable Debugger is not available from the Eclipse site s PHP update URL listed in my earlier post Instead you must use the Zend update URL listed here to install the debugger When installing if you already have the PDT installed simply choose to install only the Zend Debugger Once installed you

    Original URL path: https://benramsey.com/blog/2007/01/zend-executable-debugger-eclipse-plugin/ (2016-04-26)
    Open archived version from archive


  • Holiday Cheers!, by Ben Ramsey
    PHP community are aficionados of good beer Thus my Christmas gift to the PHP community this year will be a list of recommended winter brews I won t spend too much time describing the beers Instead I ll link to their pages at Beer Advocate a PHP driven site for reviews Sierra Nevada Celebration Ale Sierra Nevada Brewing Co Samuel Adams Winter Lager Boston Beer Company Samuel Adams Black Lager Boston Beer Company Samuel Adams Old Fezziwig Ale Boston Beer Company Bah Humbug Christmas Ale Wychwood Brewery Company Samuel Smith s Winter Welcome Ale Samuel Smith Old Brewery Sweetwater Festive Ale 2006 Sweetwater Brewing Company You can tell I m a big fan of the Samuel Adams beers My favorites in this list are the Sierra Nevada Celebration Ale and the Samuel Adams Winter Lager always a winter favorite of mine I was somewhat disappointed with the 2006 recipe for the Sweetwater Festive Ale it was a bit too sweet for my liking but I list it here because it s an Atlanta beer Feel free to leave a comment with your winter brew recommendations Cheers and Merry Christmas By Ben Ramsey Posted on 23 Dec 2006 RESTful POSTing Zend

    Original URL path: https://benramsey.com/blog/2006/12/holiday-cheers/ (2016-04-26)
    Open archived version from archive

  • RESTful POSTing, by Ben Ramsey
    uses the POST method form method POST action create customer php Name input type text name name br Address input type text name address br E mail input type text name email br input type submit form This form is simple enough When the user submits it they send a POST request to create customer php to create a new customer in the system with the given name address and email values The problem here is that create customer php does not follow the REST model It does not uniquely identify a resource Instead it merely processes data If I were to call it with a GET request what would it return Maybe nothing This is the RESTless way of doing things The RESTful approach requires that all URIs uniquely address a particular resource With this in mind an attendee at a recent Atlanta PHP meeting pointed out that the creation of a new customer could be as simple as changing the POST action to customer Again the light bulb in my brain still did not light up because I was thinking about the old way I suggested that customer while it accepts POST data would still return perhaps the newly created ID of the customer after creation and this does not represent a unique resource He pointed out that when POSTing you don t have to get back a unique resource but if you were to GET it you should Thus when you GET customer the response might include an XML document listing all the customers However POSTing to it might create a new customer that gets inserted into that listing Likewise GETing customer 1138 returns an XML document of customer data for the customer with ID 1138 but POSTing to it would update the data for that customer

    Original URL path: https://benramsey.com/blog/2006/12/restful-posting/ (2016-04-26)
    Open archived version from archive

  • Undefined Constant Is a String?, by Ben Ramsey
    E NOTICE will be issued when this happens See also the manual entry on why foo bar is wrong unless you first define bar as a constant PHP Manual Constants Syntax Hmm So if foo bar is wrong remind me again why this is even a feature In my opinion it should return at the least an E WARNING error Instead the error level is E NOTICE but let s examine what happens when the millions of people running distribution versions of PHP use this feature Most distributions use the php ini dist file instead of the php ini recommended file This means that error reporting is set to E ALL E NOTICE and notices are not generated or displayed so users will never know about their undefined constants My colleague was using the PHP distribution for Debian Debian s default php ini settings and thus was never aware of the notices generated by the use of undefined constants What s worse is that the code my colleague was using was not his own it was third party open source software Here s why it s bad to rely on this behavior In the follow snippet of code I expect that foo will always be the string foo The problem is that I m really using an undefined constant php var foo my func var When I pass var to my func the function may do something that expects the value to be the string foo but what if the core developers decide to add a constant with the name foo and assign it a value Now var is no longer the string foo It s whatever the language has defined it to be That s an unlikely scenario but what if another programmer in my team decides to define

    Original URL path: https://benramsey.com/blog/2006/12/undefined-constant-is-a-string/ (2016-04-26)
    Open archived version from archive

  • ZendCon & IPC Wrap-ups, by Ben Ramsey
    it And it never turned up during the entire week It was all I could think about I couldn t focus on any of the presentations and I wrote it off as having been stolen which made me even more angry that someone would steal my bag right out from under me and that this bastard was a member of the PHP community On the Saturday following the conference Chris Anderson yes the keynote presenter and editor in chief of Wired Magazine contacted me saying that he was in possession of my bag From what I can gather it seems that when they were closing the walls of the main conference room to divide it into the three session rooms they closed my bag on the other side of the wall from the room in which I gave my presentation Since the bag was near the stage of the middle room someone assumed it belonged to Chris Anderson who had just given his keynote presentation from that stage What happened next is left to interpretation Chris told me that the gift bag they handed him at the Zend conf registration appeared to be the bag I had lost There are two things that could have happened 1 someone turned in the bag claiming it was Chris Anderson s and he assumed it was his gift bag when they returned it to him or 2 the conference organizers had Nike bags similar to mine to give to the keynote presenters and when they found my bag they assumed it was one of their gift bags so they took it back to the registration tables and gave it to Chris In either case he somehow ended up with my bag as his keynote gift At any rate Chris quickly returned my bag and my faith in humanity and the PHP community was restored Still the conference was a bit ruined for me but that doesn t say anything about the topics speakers or Zend The last night of the conference was great though complete with an IBM pirate themed party and Microsoft sponsored drinks and karaoke There are pictures floating around on Flickr International PHP Conference Wrap up The last time I spoke at the International PHP Conference was during the Spring Edition 2005 in Amsterdam The location in Amsterdam was ideal It was right next to a train station and a tram stop was only a couple of blocks away giving conference goers easy access to the entire city The conference location in Frankfurt while undoubtedly cheaper than Amsterdam you can t beat 87 a night was farther out from the city with no nearby train stations the closest was several kilometers away While I was able to explore Amsterdam everyday during my stay I managed to leave the Frankfurt hotel only one night My complaints however deal primarily with the location The conference on the other hand was excellent as usual The organizers S S always put on a polished

    Original URL path: https://benramsey.com/blog/2006/12/zendcon-ipc-wrap-ups/ (2016-04-26)
    Open archived version from archive

  • Installing the Eclipse PHP IDE, by Ben Ramsey
    are not for you Simply download the full package and install it Everything should work fine out of the box These notes are for those who have a working installation of Eclipse want to install PHP IDE via the Update Manager and are having trouble finding all the download sites for the PHP IDE prerequisites Disable PHPeclipse if needed First off if you have PHPeclipse installed you ll need to disable it Navigate to Help Software Updates Manage Configuration From the tree on the left find PHPEclipse highlight it and choose the Disable link from the pane on the right Install the PHP IDE Prerequisites The PHP IDE installation page lists a handful of runtime prerequisites for the PHP IDE plugin However it doesn t list any URLs directing you to where the projects are located or what Update Manager URLs to use Thus I m providing those links here For each of these prerequisites you must follow these steps to install the package via the Eclipse Update Manager Open the Update Manager at Help Software Updates Find and Install Select Search for new features to install and click the Next button Click the New Remote Site button on the right Enter a name and the update URL for the update site click OK Make sure the checkbox next to the new site is checked and click Finish Follow the prompts to install the new package Now that you know how to install the packages here are the prerequisites and their update URLs Graphical Editing Framework GEF UPDATE URL http download eclipse org tools gef update site releases Eclipse Modeling Framework EMF UPDATE URL http download eclipse org tools emf updates Java EMF Model JEM from the Visual Editor Project VEP UPDATE URL http download eclipse org tools ve updates

    Original URL path: https://benramsey.com/blog/2006/12/installing-the-eclipse-php-ide/ (2016-04-26)
    Open archived version from archive

  • Flickr Namespace and array_multisort() Issues, by Ben Ramsey
    2 and I noticed two issues that occurred after the upgrade My Flickr photo feed no longer worked and My blogroll was no longer sorting alphabetically I easily solved both of these issues The Flickr photo feed I m not entirely sure whether this problem was a result of the PHP 5 2 upgrade and SimpleXML becoming more particular about namespaces or Flickr simply changing the namespace string in their feed I believe it was the latter In short my code stopped working because the namespace lacked a trailing slash It would ve been great if Flickr had notified everyone about this first The code looked something like this php flickr rss simplexml load file http www flickr com services feeds photos public gne id 49198866 N00 format rss 200 foreach flickr rss channel item as item link string item link media item children http search yahoo com mrss thumb media thumbnail attributes url string thumb url width string thumb width height string thumb height title string item title display image here Note the namespace listed in item children http search yahoo com mrss It s lacking a trailing slash This was never a problem before but it seems that the Flickr feed changed to include a trailing slash so SimpleXML was no longer able to properly get the data I simply changed it to http search yahoo com mrss note the trailing slash and all worked fine Blogroll sorting This was more than likely a result of the upgrade to PHP 5 2 though I can t be sure My blog sorting code worked like this php sort by name name array foreach blogs as k v name k v name array multisort name SORT ASC blogs Unfortunately after the upgrade this no longer worked I had to add

    Original URL path: https://benramsey.com/blog/2006/12/flickr-namespace-and-array_multisort-issues/ (2016-04-26)
    Open archived version from archive

  • Frankfurt Slides, by Ben Ramsey
    At this conference I gave two talks one on designing and implementing RESTful Web Services and the other an examination of input filtering techniques with Zend Filter Input and the new filter extension that s in PHP 5 2 I did find plenty to be desired in both of these while preparing my presentation so I have a few bug and feature requests to submit for ext filter and perhaps some patches to submit for Zend Filter Input I ll be writing more thoughts on the conference in a wrap up later including a wrap up of the Zend Conference last week but in the meantime I m going to get some rest and collect my thoughts For now I ve attached the slides and further reading links for my two talks Enjoy RESTful Web Services Download the slides PDF 2 5 MB Further Reading Architectural Styles and the Design of Network based Software Architectures by Roy Felding How I Explained REST to My Wife by Ryan Tomayko SimpleXML DOM JSON pecl json Extension Zend Framework Zend Json Class Zend Rest Server Class del icio us API Yahoo Web Search API Flickr API Filtering Tainted Data Download the slides PDF

    Original URL path: https://benramsey.com/blog/2006/11/ipc06-slides/ (2016-04-26)
    Open archived version from archive



  •