Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?

Ran into this error recently… here’s how to fix it, assuming you have OpenSSL already installed on your system.  For OpenSSL your PHP config values look like this:

–with-openssl[=DIR]    Include OpenSSL support (requires OpenSSL >= 0.9.6)

So, if you’ve compiled from scratch, you can just recompile adding this flag to your configure command.

Continue reading

To PHP5 or not to PHP5

I consider myself an Open Source Developer but I very rarely develop for the open source community. I create apps for businesses, where I work, and some side projects. I share code with those I work with obviously, but generally not with the PHP community as a whole. I share some items on this site that I think are helpful to people.

I’m not sure yet where I stand on the goPHP5 movement. I tend to use PHP5 on my newer development but still have to use PHP4 for legacy stuff. And by “legacy,” I’m talking internet time here, so about 4 years is “legacy.”

I’d like most of the common PHP apps to move to PHP5. I’ve got some PHP5 WordPress plugins in my code repo right now. And heaven knows that Drupal could really use PHP5 (or even the namespace support in PHP6). But I think forcing their hand is a little harsh.

Photo Matt isn’t moving WordPress towards a PHP5 model any time soon. And this is a bummer. But I understand the point of not leaving users of your product in the dust. I don’t really have that problem with my code.

As for my opinion, I feel like learning PHP5 was one of the best things I’ve done in my career. It helped the other object-oriented languages like Java and C# to seep into my head a little bit more. Knowing more then one language is always a good thing.

I love the object model in PHP5, as well as PDO, and the JSON extension is nice. But I find that I use the improved DOM handling of XML in PHP5 the most. It still really shocks me that more people aren’t interested in using this. And it still shocks me that more people aren’t interested in using XSLT and PHP.

Continue reading

Book Review of Pro Drupal Development by John K. VanDyk and Matt Westgate, published by Apress

Quite often web developers are faced with having to overcome problems quickly and efficiently without having much background in the problem area. Good tools and good documentation are your best friends in a situation like this. Recently, I was tasked with whipping up a website driven by Drupal in only a few days. I had used Drupal once before but this new site required going under the hood of Drupal and I hadn’t done that previously. The project required creating some custom Drupal modules for content-types and blocks as the basic pages of the site needed some extra stuff in them besides the normal title, content, and categories. Clicking around the vast Drupal site was a bit of a help on the issue but my savior was the copy of “Pro Drupal Development” by John K. VanDyk and Matt Westgate, published by Apress, that landed on my desk.

The book isn’t for Drupal beginners but it doesn’t really claim to be either. It’s helpful to have a Drupal site or two under your belt as the authors give a quick overview of the Drupal workflow and then they dive right into the guts of building custom modules complete with code examples. Building modules from scratch looked pretty daunting but this book takes you through step-by-step in various scenarios of why and how you’d need to create custom modules, complete with storing additional data in the database, creating admin screens, and utilizing the forms API. Once you go through about half of this book, you’ll be able to bend Drupal to your will through the creation of custom code modules.

A few more high points of the book include the great descriptions of nodes and taxonomy which tend to trip up quite a few people using Drupal. Also, the authors show you right away how to uninstall your test modules easily which is a great help. It’s this kind of extremely useful tip that pops up every few pages that make this book a MUST HAVE for every serious Drupal developer.

Continue reading

Drupal for single hierarchy corporate website

We needed a content management system (CMS) for a website at work for 3 reasons:

  • So the developers could be out of the content maintenance loop.
  • So the developers could be out of the content maintenance loop.
  • So the developers could be out of the content maintenance loop.

I remember when I first started web development years ago (gosh, has it been 10 years already?), that the “web guy” was called upon to make every little edit to the website. It could be a typo, a broken link, or an add-on to an existing application. Obviously, some of these things are not like the others. Fixing typos and broken links shouldn’t really be done by the programmers. They’re making too much money to deal with such minor issues. The people in charge of creating that content should be in charge of that stuff (ie, the marketing people).

There are a lot of companies where this is still the norm, the web development folks have to take care of a lot of minor issues like this. My current company was like that. But I’m trying to change the culture there. I’m trying to make the content creators responsible for the content and the programmers responsible for the programming. Enter stage left… use of a CMS for our new website.

After looking at a bunch of open source CMS apps (in PHP if you please) and also a handful of commercial CMS apps, I’ve come to the conclusion that CMS apps suck. 😉 No, really they do. Well, it’s not that they suck, it’s that you are never going to find one CMS that does every single thing that you want it to do. You’re just not. So give up now. I did.

So instead, putting my open source hat on, I tried to find the CMS that looked to be the most extensible or hackable. Drupal won this round hands down. There aren’t a lot of of examples out there about using Drupal for a fairly static corporate website, so I had to create some new modules to do things that I wanted but all in all the coding on the project went very quickly and we launched a successful site. I’ll be posting a few things that we learned along the way about using Drupal in this way in subsequent entries.

But for now, just know that we did keep the developers out of the content maintenance loop. And if you have any specific questions about the process, just holler.

Continue reading

Facebook.com opens up facebook platform similar to ning.com

Read about the new developer environment for Facebook.com on cnn.com. I can’t tell yet if this is Facebook.com adopting some of the Ning.com philosophy of “create your own social network” or if it’s just a giant widget factory on steroids.

No longer will Facebook consider itself merely another social network. Instead it is becoming a technology platform on which anyone can build applications for social computing… Outsiders can now develop Internet services on Facebook’s infrastructure, he explains, that will have full access to all its members. 

developer.facebook.com has more info on the facebook platform. And of course, you have to love that it’s built on PHP.

Continue reading

PHP is not doomed. But perhaps open source development of it is.

Read this today from Jeremy Privett “Is PHP Doomed?”  Internal devs fighting over the future of the language could be construed negatively, but I don’t think it matters at all.  Until someone starts talking about forking PHP, I think we’re on safe ground. As an outsider, I wonder how much pull Zend has anyway, and whether or not PHP is being pulled in the direction they want it to go.  Its not too far-fetched for them to get an agreement to just close the source.  Aren’t most of the PHP devs working for either Zend or Yahoo at this point? Besides, what kind of arguments do the internal devs in Redmond have over .NET?  Oh that’s right.  We aren’t really privy to that information. I think there’s been an uptick recently in PHP adoption in the enterprise.  How do I know that? Because I’ve gotten several job offers doing this very thing in the past 2 years.  I’m now working at a 60 year old company, that works quite a bit with the government.  We rely on PHP for quite a few internal apps.  This is not some fly-by-night Web 2.0 outfit. So, is PHP doomed?  I don’t think so.  And even if it is, Ruby’s not so bad 😉

Continue reading

How to for SSH, Subversion (SVN), Putty, Tortoise, and Zend Studio 5.x using svn+ssh

Attempting to connect my new Windows machine with Zend Studio 5.1 using svn+ssh to an svn repository on Linux, I am obliged to once again stand on the shoulders of giants that have come before me. Here’s some “how tos” that got me through it.

  • Logemann Blog – Subversion / TortoiseSVN SSH HowTo – Soup to nuts on how to set up both the server end as well as the client end of this ordeal. Includes ssh, ssh-keygen for generating keys, installing keys on client via Putty and Pageant, and using the ssh tunnel built to grab the repo via TortoiseSVN.
  • Zend.com Forums: Zend Studio => HOW-TO: Using SVN+SSH in ZS 5.5 – More ssh, ssh-keygen, installing keys on client via Putty and Pageant, and using the ssh tunnel with Zend Studio. (This seems to be missing one step for Zend to work though which is included next)
  • SVN – SSH connection produces errors – This post from the Zend knowledgebase adds the mysterious SVN_SSH environment variable that magically makes this work for Zend. NOTE – while they show this using the path to TortoisePlink.exe, you may also use Putty’s Plink.
Continue reading