Installing MacPorts, PHP, MySQL, Pear, and PHPUnit on Mac OSX Snow Leopard

September 28th, 2010 § 1 comment § permalink

This is a little redundant of a post, considering the myriad of posts out there covering this topic. However, I am constantly looking for this information so I am putting it all in one place. All of this information comes from these three links: Install Xcode Install MacPorts Install Apache, MySQL, PHP and PEAR Install PHPUnit Installing Xcode Go to the Xcode site above, click the Download link to download the .dmg Install the .dmg Installing MacPorts Go to the MacPorts site above, click the Snow Leopard link to download the .dmg Install the .dmg Install Apache MySQL, PHP and PEAR sudo port install apache2 sudo port install php5 +apache2 +mysql5 +pear I have also noticed that installed phpmyadmin +pear… » Read More

Using the Twitter API with Zend Part 1: Setting up your environment

September 10th, 2009 § 0 comments § permalink

Twitter API with Zend Part 1.  Post Moved to ReinforceMedia.com… » Read More

This is not form validation — and how to fix it

August 31st, 2009 § 0 comments § permalink

I was working on a site and noticed something that concerned me.  This is fodder for TheDailyWTF and makes me worry for the fate of any person who receives the results of forms with [non-]“validation” like this. The form element: <select name="favorite-color">  <option>Favorite Color – Choose One</option>  <option value="blue">Blue</option>  <option value="red">Red</option>  <option value="orange">Orange</option>  <option value="green">Green</option>  <option value="black">Black</option> </select> Here is what was in the processing script: switch ($_POST["favorite-color"]) {  case "blue":  case "red":  case "orange":  case "green":  case "black":   $data["favorite-color"] = $_POST["favorite-color"];   break; } … //data is appended to a string – matt's comment not a "real" comment in the script $string .= $data['favorite-color']; So… What is wrong with this? OMG what isn’t wrong with it? The select… » Read More

Username URLs just like Twitter

August 14th, 2009 § 0 comments § permalink

In your .htaccess just do this: RewriteEngine on RewriteRule ^([A-za-z0-9]+)/?$ user.php?name=$1 This will ignore php files, and any files that are requested deeper into the site like JS or CSS. Sphere: Related Content… » Read More

The AOL logo and the Genius form error are a little confusing

February 7th, 2009 § 0 comments § permalink

I was setting up Genius in Itunes tonight and I got to the form below, and didnt fill out the second input because it looked like they wanted AOL credentials.  Then, when the error came up, the red arrow and the blue triangle point to the same place, kind of confusing. Now, I know that if I would have just paid more attention, I would have gotten this from the start.  Even so, I sometimes stop paying attention and hope that the interface will be intuitive enough that I can just use it without thinking. I know, lame right?  Not necessarily, I have found that this is a good way to test out user functionality. If you have to stop… » Read More

Trim, I love your service, but please sanitize your inputs!!

February 5th, 2009 § 0 comments § permalink

I was replying to a friend on Twitter using trim, and I had a <script> tag in the post.  I realized when I submitted that the tag made everything after it in my tweet dissapear. If you want to see the actual tweets, you can find them in my twitter feed here: Matt Bernier’s Twitter Feed First thougt was, “No Way!”.  Second thought was, “What Else Can I do?”. So, I tried basic HTML with this tweet: <h2>Testing whether HTML breaks tr.im</h2> B/c my <script> tag did earlier</script> <span style="color:blue;"> ScreenShot coming</script> This got me this result: Then I tried an alert: <script type="text/javascript"> alert('does this work?'); </script> That got me this result: Then lastly, I tried a little more… » Read More

Services

January 18th, 2009 § 0 comments § permalink

Matt Bernier provides a list of services for your web-based needs including proposal consulting, website consulting, search engine optimization consulting, and website development. If you are interested in any of these services please contact me ASAP. Sphere: Related Content… » Read More

Where Am I?

You are currently browsing the Development category at Matt Bernier.