archive-com.com » COM » S » STUARTHERBERT.COM

Total: 477

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

Or switch to "Titles and links view".
  • Stuart on PHP -
    php a properly installed command line program or perhaps as a drop in command for phix Data files cannot be written to your code should treat them as read only When your data files are installed for system wide use the files are owned by the root user Unless there is an almighty security cock up your code will never ever actually get to run with the root user s security privileges If your code tries to write to these data files it will generate a runtime error But this won t show up when you unit test your code So remember and don t write the code in the first place Where Do Data Files Go Inside The Component s Structure If we take a look at the ComponentManagerPhpLibrary component you ll find the data files are inside in the src data folder These are the skeleton files used for a PHP library component src data is meant to be a folder that holds the data files that you want installed into the computer system Where Do Data Files Get Installed When you use the PEAR installer to install your component pear install phix ComponentManagerPhpLibrary all of the files in your component s src data folder gets installed into usr share php data package name on your computer The PEAR installer s behaviour here is different to both command line scripts and PHP code the installer creates a sub folder with the name of your package and then installs your data files into this sub folder and not into the main data dir folder This isn t a problem in practice as long as you are aware of the different behaviour here The data file script src data php library README md therefore ends up installed onto your computer as usr share php data ComponentManagerPhpLibrary php library README md There s always the possibility that some Linux distros and Mac OS X will install data files into a different folder You can see where the PEAR installer will put these files on your computer by running sudo pear config show grep data dir PEAR data directory data dir usr share php data If you want to read these data files from your PHP code you cannot safely hard code the final installation location into your scripts it will vary from OS to OS and will also be different again if your component is installed into a vendor directory You ll need to locate these files using a different technique How Do I Locate The Data Files From My PHP Code Take a look at the top of the LibraryComponentFolder class from the ComponentManagerPhpLibrary component code lang php class LibraryComponentFolder extends ComponentFolder const DATA DIR DATA DIR ComponentManagerPhpLibrary php library code DATA DIR is a token that at runtime the PEAR installer expands to be the fully qualified path to the top of the computer s data dir Underneath that you need to remember to add your component s name to the path otherwise you ll be scratching your head and wondering why you can t find the data files The full instructions that tell the PEAR installer to expand this token are added to your component s package xml file when we build the PEAR compatible package I ll look at the final package xml file in detail towards the end of this series of blog posts How Do I Unit Test PHP Code That Relies On Data FIles There is one important downside to this technique any unit tests that rely on loading data from your data directory are going to fail because DATA DIR is only expanded when the PEAR installer installs your component At the time of writing I don t have an easy solution for this but leave it with me and I ll find a solution for this before the end of this series of blog posts Be the first to leave a comment PHP South West phpsw User Group Meeting 7pm Wednesday 13th April 2011 Bristol Posted by Stuart Herbert on April 11th 2011 in phpsw March s meeting of the PHP SouthWest User Group will be at The Golden Guinea in Redcliffe Bristol from 7pm on Wednesday 13th April What Is Planned Ade Slade will be giving his talk on unit testing something he has a deep passion for We ll also discuss progress on the phpsw community website and be looking for more volunteers to help build and maintain it How To Get There We ll be at The Golden Guinea 19 Guinea Street Bristol BS1 6SX It s a short walk from Bristol Temple Meads Railway Station if you re coming by train How To Get Involved Please join the PHPSW Google Group and say hello Be the first to leave a comment Gathering Requirements For A PEAR Channel Aggregator Posted by Stuart Herbert on April 9th 2011 in Toolbox I ve had several conversations on Twitter about how it could be a good idea for someone to setup a new community website for PHP components This website would not host components itself it would track all of the independently published PEAR channels and be the one stop shop for users to come to whenever they needed to find a component to solve a requirement I think this would be a good thing for the PHP ecosystem So requirements What do you want from such a website What do you want it to do How do you want it to work At this stage the sky s the limit Leave your requirements in the comments please and I ll pull them together into a summary post next weekend Once the requirements are stable ish I d like to organise a hackathon to get the first version built and live If you re up for that and want to help make that happen do ping me on Twitter stuherbert Be the first to leave a comment PHP Components Shipping A Command

    Original URL path: http://blog.stuartherbert.com/php/page/7/ (2016-05-02)
    Open archived version from archive

  • Stuart on PHP - » Ideas Of March
    that they don t have to be hitting Google to react to an avoidable problem in the first place Encourage your friends and colleagues to create and share reading lists or to give a talk or demonstration at their local PHP user group Get involved with community education projects like PHP Fundamentals so that we can create a self educating profession And above all irony intended use Twitter for the opinion pieces where the world can forget them after 4 days About The Author Stuart has been writing PHP applications since 2003 and has been contributing to open source software since 1994 He was an early writer for php architect a co author of the Official Zend Certification Study Guide for PHP 4 and a regular speaker at conferences and user groups since 2004 When he s not designing software Stuart loves to explore the world through a camera lens spend time with his beloved guitars and continue his study to T ai Chi Chu an Taijiquan 8 Comments BooBoo says March 15th 2011 at 3 50 pm I read planet php through rss reader how do you distinguish in your stats whether I came to your blog through planet php or your blog s rss they both will show in referer google s rss reader not entirely sure about it in google s case cause I see that the hash displays rss url btw is the hash sent in referer BooBoo says March 15th 2011 at 3 50 pm I read planet php through rss reader how do you distinguish in your stats whether I came to your blog through planet php or your blog s rss they both will show in referer google s rss reader not entirely sure about it in google s case cause I see that the hash displays rss url btw is the hash sent in referer Community News Ideas of March Kicks off a Blogging Revival Test SmartFtp Blog says March 16th 2011 at 9 04 am Stuart Herbert Community News Ideas of March Kicks off a Blogging Revival Test SmartFtp Blog says March 16th 2011 at 9 04 am Stuart Herbert KMB says March 16th 2011 at 10 11 am I like the concept of the Planet and I also used it to selectively fill up my PHP folder in Google Reader but I think that s one its biggest flaws To me and probably some more people the Planet worked as some kind of giant blogroll to get further blogs feeds from and to put those in our preferred feed readers because the Planet can not really compete with the advantages provided by those To be able to select what one want to read is another one So instead of the Planet I propose a reintroduction of the idea of the blogroll which can be easily integrated into the Ideas of March idea KMB says March 16th 2011 at 10 11 am I like the concept of the Planet and I

    Original URL path: http://blog.stuartherbert.com/php/2011/03/15/ideas-of-march/ (2016-05-02)
    Open archived version from archive

  • Stuart on PHP - » PHP South West (#phpsw) User Group Meeting, 7pm, Wednesday 9th March 2011, Bristol
    Street Bristol BS1 6SX It s a short walk from Bristol Temple Meads Railway Station if you re coming by train How To Get Involved Please join the PHPSW Google Group and say hello About The Author Stuart has been writing PHP applications since 2003 and has been contributing to open source software since 1994 He was an early writer for php architect a co author of the Official Zend Certification Study Guide for PHP 4 and a regular speaker at conferences and user groups since 2004 When he s not designing software Stuart loves to explore the world through a camera lens spend time with his beloved guitars and continue his study to T ai Chi Chu an Taijiquan Comments are closed Latest Photos Categories phpnw 1 Beginner 2 Intermediate 3 Advanced Brighton PHP Conferences Opinion phix PHP In Business PSR Servers and Hosting Storyplayer Talks Toolbox Training Uncategorized Archives February 2016 January 2016 November 2015 October 2015 August 2015 March 2015 January 2014 May 2013 April 2013 March 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 February 2012 January 2012 October 2011 September 2011 August 2011 July 2011 April 2011 March 2011 February 2011 October 2010 August 2010 July 2010 February 2010 January 2010 October 2009 September 2009 August 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 June 2008 May 2008 April 2008 March 2008 January 2008 December 2007 November 2007 October 2007 July 2007 April 2007 March 2007 February 2007 January 2007 This Month March 2011 M T W T F S S Feb Apr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

    Original URL path: http://blog.stuartherbert.com/php/2011/03/08/php-south-west-phpsw-user-group-meeting-7pm-wednesday-9th-march-2011-bristol/ (2016-05-02)
    Open archived version from archive

  • Stuart on PHP - » PHPUK 2011 Talk: Beyond Frameworks
    excellent http bit ly eRbUEw Henrik says February 28th 2011 at 5 25 pm I must say that i enjoyed you talk even though there are some minor things that annoyed me You said in the talk that Doctrine does not follow the PSR 0 Standard which i think know is wrong but that you are right saying Symfony1 and eZ Component does not Also that the PSR 0 group actually lists a autoloader on their site that can be used I agree with you perspective with the framework should be a thing layer for common components that can be integrated But most of the code that becomes components always starts out as some simple Framework test or class and then gets converted the trick is to know when to move the code out of the Frameworks fists But all in all a good talk 1 Stuart Herbert says March 20th 2011 at 5 04 pm henrik if you look inside Doctrine2 you ll see that it bundles a copy of Symfony s tools for console apps inside Because the Symfony tools aren t at the top level but are inside Doctrine s own folder it can t find the code just by using a normal PSR 0 autoloader well not withing telling the autoloader to look in two places which then would cause clashes with any upstream Symfony code also installed Henrik says February 28th 2011 at 5 25 pm I must say that i enjoyed you talk even though there are some minor things that annoyed me You said in the talk that Doctrine does not follow the PSR 0 Standard which i think know is wrong but that you are right saying Symfony1 and eZ Component does not Also that the PSR 0 group actually lists a autoloader on their site that can be used I agree with you perspective with the framework should be a thing layer for common components that can be integrated But most of the code that becomes components always starts out as some simple Framework test or class and then gets converted the trick is to know when to move the code out of the Frameworks fists But all in all a good talk 1 Stuart Herbert says March 20th 2011 at 5 04 pm henrik if you look inside Doctrine2 you ll see that it bundles a copy of Symfony s tools for console apps inside Because the Symfony tools aren t at the top level but are inside Doctrine s own folder it can t find the code just by using a normal PSR 0 autoloader well not withing telling the autoloader to look in two places which then would cause clashes with any upstream Symfony code also installed gggeek says March 21st 2011 at 5 51 pm Aside PSR0 it looks really like an ad for the Zeta Components library ex eZ Components Nice to see more people agreeing on the same good principles BTW it also looks a

    Original URL path: http://blog.stuartherbert.com/php/2011/02/25/phpuk-2011-talk-beyond-frameworks/ (2016-05-02)
    Open archived version from archive

  • Stuart on PHP - » PHP South West (#phpsw) User Group Meeting, 7pm, Wednesday 9th February 2011
    for PHP 4 and a regular speaker at conferences and user groups since 2004 When he s not designing software Stuart loves to explore the world through a camera lens spend time with his beloved guitars and continue his study to T ai Chi Chu an Taijiquan No Comments Tweets that mention Stuart Herbert On PHP PHP South West phpsw User Group Meeting 7pm Wednesday 9th February 2011 Topsy com says February 1st 2011 at 4 46 pm This post was mentioned on Twitter by Planet PHP Rob Mills Stuart Herbert Marcus Deglos PHP North East and others PHP North East said RT phpsw Next phpsw meeting will be 7pm Wed 12th Feb at the Golden Guinea in Bristol http t co K9uElS4 Please RT Tweets that mention Stuart Herbert On PHP PHP South West phpsw User Group Meeting 7pm Wednesday 9th February 2011 Topsy com says February 1st 2011 at 4 46 pm This post was mentioned on Twitter by Planet PHP Rob Mills Stuart Herbert Marcus Deglos PHP North East and others PHP North East said RT phpsw Next phpsw meeting will be 7pm Wed 12th Feb at the Golden Guinea in Bristol http t co K9uElS4 Please RT Latest Photos Categories phpnw 1 Beginner 2 Intermediate 3 Advanced Brighton PHP Conferences Opinion phix PHP In Business PSR Servers and Hosting Storyplayer Talks Toolbox Training Uncategorized Archives February 2016 January 2016 November 2015 October 2015 August 2015 March 2015 January 2014 May 2013 April 2013 March 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 February 2012 January 2012 October 2011 September 2011 August 2011 July 2011 April 2011 March 2011 February 2011 October 2010 August 2010 July 2010 February 2010 January 2010 October 2009 September 2009 August 2009 May

    Original URL path: http://blog.stuartherbert.com/php/2011/02/01/php-south-west-phpsw-user-group-meeting-7pm-wednesday-9th-february-2011/ (2016-05-02)
    Open archived version from archive

  • Stuart on PHP - » PHPNW10: Conference Audience
    hope you ve enjoyed them I ve also posted my thoughts on being a first time conference photographer over on my photography blog Copyright c Stuart Herbert Blog Twitter Facebook Photography Merthyr Road Daily Desktop Wallpaper 25 9 Twitter About The Author Stuart has been writing PHP applications since 2003 and has been contributing to open source software since 1994 He was an early writer for php architect a co author of the Official Zend Certification Study Guide for PHP 4 and a regular speaker at conferences and user groups since 2004 When he s not designing software Stuart loves to explore the world through a camera lens spend time with his beloved guitars and continue his study to T ai Chi Chu an Taijiquan Comments are closed Latest Photos Categories phpnw 1 Beginner 2 Intermediate 3 Advanced Brighton PHP Conferences Opinion phix PHP In Business PSR Servers and Hosting Storyplayer Talks Toolbox Training Uncategorized Archives February 2016 January 2016 November 2015 October 2015 August 2015 March 2015 January 2014 May 2013 April 2013 March 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 February 2012 January 2012 October 2011 September 2011 August 2011 July 2011 April 2011 March 2011 February 2011 October 2010 August 2010 July 2010 February 2010 January 2010 October 2009 September 2009 August 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 June 2008 May 2008 April 2008 March 2008 January 2008 December 2007 November 2007 October 2007 July 2007 April 2007 March 2007 February 2007 January 2007 This Month October 2010 M T W T F S S Aug Feb 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

    Original URL path: http://blog.stuartherbert.com/php/2010/10/21/phpnw10-conference-audience/ (2016-05-02)
    Open archived version from archive

  • Stuart's Photography - » 5 Lessons From My First Conference Shoot
    you can t move things out of the way to make a shot seem less cluttered You re much better off either moving yourself to find a different angle photoshopping things out not for me but I can understand people who do or learning how to incorporate the clutter into the shot In the morning feeling very nervous I seldom shoot people especially people trying to put on a performance less than 20 feet away I tried to find a different angle but I didn t move much I ended up with the motion blur problems mentioned earlier and sight line problems with the lectern when each speaker stopped moving Part of the problem was definitely being tied to the tripod moving it around mid talk would surely have been extremely distracting to speaker and audience alike And part of it was confidence I wasn t an official photographer for the event just an attendee who perhaps was pushing his luck as far as possible By the end of the day I was feeling more comfortable and happily moving around to pick out my shots Because I was feeling more confident in myself I feel that the afternoon s shots were the better portraits Lesson 4 You re Shooting With Fast Glass So Use It Like a lot of photographers my collection of f 2 8 lenses wasn t bought so that I could take photos in darkened lecture halls I use them for shallow depth of field shots I like the fact that I m free to pick out a subject from a scene to place the emphasis where I artistically think it s strongest or most interesting Within the laws of physics fast glass gives me room to be creative If only it automatically came with talent too Anyway one of the benefits of fast glass is that you can shoot in darkened lecture halls and the nice thing about depth of field is that the depth available doesn t depend on the amount of light available if you can shoot at all at f 2 8 You get the same depth of field in bright sunlight as you do in gloomy semi darkness So take full advantage of it Lesson 5 Don t Forget The Audience Whenever you see conferences covered online the photos tend to be of two types everyone drinking at the bar and of the speakers doing their thing in front of an audience It isn t often I see the audience photographed and that s a shame because my favourite shots from this conference were those I took of the audience I just wish more of those shots had turned out well enough to publish The thing with the audience is that there s simply more to capture in your photos A speaker up on stage is largely a solo portrait if you re lucky you might get a good slide behind the speaker but most of the time you re picking your

    Original URL path: http://blog.stuartherbert.com/photography/2010/10/18/5-lessons-from-my-first-conference-shoot/ (2016-05-02)
    Open archived version from archive

  • Stuart on PHP - » PHPNW10: Saturday Speakers, Track 1
    photographer over on my photography blog Copyright c Stuart Herbert Blog Twitter Facebook Photography Merthyr Road Daily Desktop Wallpaper 25 9 Twitter About The Author Stuart has been writing PHP applications since 2003 and has been contributing to open source software since 1994 He was an early writer for php architect a co author of the Official Zend Certification Study Guide for PHP 4 and a regular speaker at conferences and user groups since 2004 When he s not designing software Stuart loves to explore the world through a camera lens spend time with his beloved guitars and continue his study to T ai Chi Chu an Taijiquan No Comments David says November 25th 2010 at 9 51 am Real nice pictures thanks for sharing them David says November 25th 2010 at 9 51 am Real nice pictures thanks for sharing them Latest Photos Categories phpnw 1 Beginner 2 Intermediate 3 Advanced Brighton PHP Conferences Opinion phix PHP In Business PSR Servers and Hosting Storyplayer Talks Toolbox Training Uncategorized Archives February 2016 January 2016 November 2015 October 2015 August 2015 March 2015 January 2014 May 2013 April 2013 March 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 February 2012 January 2012 October 2011 September 2011 August 2011 July 2011 April 2011 March 2011 February 2011 October 2010 August 2010 July 2010 February 2010 January 2010 October 2009 September 2009 August 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 June 2008 May 2008 April 2008 March 2008 January 2008 December 2007 November 2007 October 2007 July 2007 April 2007 March 2007 February 2007 January 2007 This Month October 2010 M T W T F S S Aug Feb 1

    Original URL path: http://blog.stuartherbert.com/php/2010/10/20/phpnw10-saturday-speakers-track-1/ (2016-05-02)
    Open archived version from archive



  •