Kempwire.com

By Jonathan Kemp

Google Launches OpenSocial

Imagine having access to all your social networking data on other social networking sites. Facebook started doing this earlier this year by allowing developers access to publish social networking applications on their platform.

One of the complaints people have about Facebook, however, is that there is no way to get information from your profile and applications out of Facebook. Google is seeking to change that with the launch of a new set of APIs call OpenSocial. Today Google sent out a press release on Friday that is rocking the web 2.0 world.

It is titled “Google Launches OpenSocial to Spread Social Applications Across the Web.” OpenSocial is a set of APIs for building social applications for websites that want to add social features. Depending on how this is implemented, this could really impact social networking in a good way.

Soon you will have access to your information across multiple websites. This will also help developers, in that they can just write one application instead of an application for every platform. Here is a list of partners that Google has already announced are supporting OpenSocial.

Several developers, including Flixster, FotoFlexer, iLike, RockYou, Slide, Theikos, and VirtualTourist have already built applications that use the OpenSocial APIs. I am hoping that other services that I use a lot like Flickr, Twitter and Wordpress join in soon.

So far, Facebook has not announced any support for OpenSocial. In my opinion, Facebook would be making a big mistake not to. They need to announce this and quickly, or they will risk losing their credibility with developers and users.

Installing PHP 5 on Mac OS X

Okay, so I have been running PHP 4 locally on my Mac OS 10.4, but I recently needed to upgrade to PHP 5. In addition, PHP 4 will no longer be supported after the end of this year. The installation instructions are the same as for PHP 4, which is not a big deal. I also installed libcurl, which is not included by default for some reason.

Why am I posting this here then? So I can reference it, whenever I need to recompile PHP again. I am installing new libs all the time, it seems like, so it helps to know what I have done each time so I can do it again the next time. This is the third or fourth time I have done this, so I won’t go into that much detail. If you need more details, look at my other posts.

For step one, download and unzip PHP 5. Then, open the folder and run configure, make and sudo make intall, like this.

./configure --prefix=/usr/local/apache2/php \
--with-curl=/usr/local/src/curl-7.17.1 \
--with-zlib-dir=/usr/local/lib \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-gd --with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache2/bin/apxs
make
sudo make install

Remember to change your file paths, if they are different than mine. Restart Apache, and you’re done!

Apache 2.2 Included with Leopard

So here’s one more reason to upgrade to Leopard, especially if you are a developer. Leopard reportedly comes with Apache 2.2 installed. A co-worker of mine got it yesterday and was able to confirm this. This is the first I have heard on what software packages are installed with Leopard other than Ruby.

This is great news for developers. Mac OS 10.4 only comes with Apache 1.3 installed. You can upgrade to Apache 2 like I did by installing it yourself, but this way you have to manually stop and start Apache. As if I already needed a reason to upgrade, now I have an even better one. Good job on this Leopard guys!

PNG Not a Good Fit for the Web Afterall

Okay, I bought into the hype of the PNG format. I admit that on the surface, PNG is a superior format for the web versus JPEG and GIF.

There’s one problem. If you use PNG graphics with JPEG or GIF or CSS colors, the colors do not match up. This means if you use a PNG over a JPEG or colored backgound that is the same color as the PNG, the color will not look the same. This is a problem for me. So much so that I have stopped using PNGs in my designs. They only way I can use them is if the color matching is not a problem.

Also, PNG transparency is not supported in IE6. This is not such a problem because there is a workaround. But it is annoying and IE6 is still the most used browser in the world.

I found out that the reason PNG graphics do not mix with other formats is due to gamma correction. One solution is to remove the gamma information. GammaSlamma is a program for the Mac OS that does this. However, this does not work in all browsers.

I was happy to use PNGs until I figured out the problems with it. Until the technology catches up, I am still stuck using outdated graphic formats whether I want to or not.

Leopard Does What Tiger Took Six Weeks to Do

Apple today announced that they have sold two million copies of Leopard since it went on sale on this past Friday. By comparison, Tiger took six weeks to sell 2 million copies. To me, this shows how much Apple’s marketshare has grown.

Successful Hosting Not Successful at Keeping Their Websites Online

My web sites were down twice this week, and I had to contact tech support to get them back online. This is not a usual occurrence, but it was very annoying. This week I got an e-mail from my hosting company, Successful Hosting, entitled “Notification of Scheduled Maintenance.” Here is what the e-mail said:

Dear Valued Customer,

This is to inform you of a change window scheduled on Sunday October 28th, 2007, starting at approximately 3 A.M Eastern Time, and ending Sunday October 28th, 2007 at approximately 10 P.M Eastern Time. During this change window we will be moving all clients from Baltimore to our new Andover MA, Data Center. Please be aware that this is a client impacting event and there will be downtime during this move. We will make every attempt to get servers back online quicker than the window and will keep you fully informed during this move process.

Thank you for your patience and understanding during this move. We are confident that this move will result in an increase to your overall client experience. Along with being hosted in world class data center in our Andover facility the new platform will offer greater stability, flexibility and extensibility to your hosted applications.

So yesterday, which was Saturday, I woke up to find all my sites were down. My guess was that they started the server move a day early, but I had no way of knowing because I never received any notification of this. I went to the company forums to find out, but I had to have an account to view the forum and to post. I registered for an account, and then received notification that a moderator would have to approve my registration. So I waited for for my registration to be approved.

Once my registration was approved five hours later, I was able to login to the forums where I found the posts stating that they decided to move the scheduled maintenance up one day to Saturday instead of Sunday. This notification was not posted until 1:30 PM on Friday, October 26th and no e-mails were sent out, so if you do not check the forums you would have no way of knowing this is the case.

So to recap, they notified us that our sites that were hosted with them would be down for 20 hours on Sunday, then they decided to change it to Saturday one day before without notifying anyone. So their plan for the move is to unplug all the servers, move them to a new data center, plug them back up and turn them on, while all the sites and e-mail on those boxes is down. WTF? Isn’t there a better way to do this? I don’t know much about hosting, but it seems that would be the case to me.

Well, once their clients started to complain in the forums, they decided to moderate that thread so that no one could post in it unless it was an update on the status of the move by one of the mods or it was a client saying something positive. Again, not a good decision in my opinion. I understand the need to keep the forum productive so that updates can be posted, but it is not a good move to piss your clients off and then censor the negative reactions.

So I resigned myself to the fact that my sites were down, and there was nothing I could do about it until 10PM. Throughout the night, the mod kept posting updates saying that everything was still on track to be back online by 10PM. I questioned that after this status update that was posted at 6:55 P.M EST.

1)the truck is currently located: 1-2 hours away

2)approximate time it will take to arrive and unload: 1 hours

3)approximate time it will take to re-assemble/re-rack the servers?
2 hours

As far as I can tell, we’re still on schedule to meed the 10:00 P.M deadline.

So if you add this up, they are saying it will take 5 hours to complete the process. With 3 hours left, how could they be on track for 10PM? Well, as it happened they weren’t. I checked up until 12AM, and things were not back online yet, so I went to bed. When I got up, things were back online, but not until 2:30 AM apparently, going by the posts in the forum.

So things being as they are, there is not much to be done at this point. I am extremely displeased with the way this went. I don’t think it could have gone worse. But they have said this is a one time move that will greatly improve performance, so what can you do? Well, we will see if things improve. If my sites continue to go down like they have this week, I will be looking to move.

Nowrap for CSS

Today I learned that there is a “nowrap” equivalent in CSS. Nowrap is an attribute of the td or th tag that is deprecated in HTML 4.01. Nowrap tells the table cell not to automatically wrap the text contained in the cell.

The CSS 2.1 specification has a property called “white-space.” One of the values of white-space is nowrap. I tested this property, and it works the same as nowrap does. I also confirmed that it works in IE6, IE7 and Firefox 2.

So, if text automatically wrapping is a problem for you, don’t use “nowrap” because it is deprecated. Instead use the white-space property, with nowrap for the value. I added the property as an inline style rather than in the stylesheet, so that I didn’t have to create another class and I can use it only where it is needed. How you use it is up to you.

Leopard Release Day

You may have heard that Leopard for Mac OS X is due to be released Friday, October 26th at 6 PM. Apple sent out e-mails to their subscribers today announcing retail events across the country. The events are taking place between 6PM and 10PM on Friday.

According to the e-mail, Apple Store employees will be doing live demos of Leopard and giving away free t-shirts to the first 500 people to show up. My local store is in Knoxville, TN at the West Town Mall. I’m not sure what all will be going on, but I want a free Apple t-shirt, so I will be there!

Update – 10/26/07: Just got back from the Apple Store Leopard event, and I got my free t-shirt. There was a ton of people waiting in line. I was amazed that many people could all fit in the store. I have to admit I was impressed with Leopard. So much so, that I will probably upgrade. I’m not sure when though. Looks like I will be adding Leopard to my Christmas list!

Twitter Tools = Awesome!

Okay, I really like Wordpress, and I really like Twitter. Which means, I love Twitter Tools! I decided the other day it would be awesome if someone created a wordpress plugin that showed my latest tweets on my blog. Twitter Tools is exactly what I was looking for. It not only shows your latest tweets on your site, but it can also create a tweet whenever you update your blog, letting people know that you just updated your blog!

Other options include Twittering from the Wordpress admin or the front end and creating a blog post every time you update Twitter. The cool thing is you can set it up anyway you want. I really gotta give credit to Alex King. The man creates some awesome Wordpress plugins.

Update – 10/28/07: It looks like the Twitter updates in the sidebar are showing the blog post links. Something is wrong because Twitter tools is not supposed to be showing those. I will turn off the auto Twitter updating for the time being in the interest of not cross posting. I will contact Alex to see if there is a solution for this.

Installing Apache 2.0, PHP and Subversion on Mac OS 10.4

After trying to install Django on my Mac and failing, I have decided to try and upgrade my local version of Apache 1.3 to version 2.0. If you are developing on the Mac OS, you may know that Mac OS 10.4 comes with Apache installed on it. While this is one of the great things about the Mac OS, what’s not great is that it is out of date. For most cases when you are developing locally on the Mac, Apache 1.3 is fine. But, you may find that with Apache 1.3 installed, you will not be able to run certain software.

The solution to this is to upgrade to Apache 2.0. I admit that I was reluctant to do this myself, but I found a tutorial from Apple that convinced me to try it. Apache 2.0.61 is the current stable version of the 2.0 series, and that is the version I decided to go with. I downloaded the package and extracted it into /usr/local/src using the following commands.

curl -O http://www.eng.lsu.edu/mirrors/apache/httpd/httpd-2.0.61.tar.gz
tar xvfz httpd-2.0.61.tar.gz
cd httpd-2.0.61
export ac_cv_func_poll=no

Make the following changes to srclib/apr/network_io/unix/sendrecv.c in the apr_socket_send function:

Change:

do {
rv = write(sock->socketdes, buf, (*len));
} while (rv == -1 && errno == EINTR);

To:

try_write: do {
rv = write(sock->socketdes, buf, (*len));
} while (rv == -1 && errno == EINTR);

(That is, add “try_write:” right before the “do {“.)

Replace the following else clause (that is, delete these five lines):

else {
do {
rv = write(sock->socketdes, buf, (*len));
} while (rv == -1 && errno == EINTR);
}

with these two lines:

else
goto try_write;

Run configure, run make, and then run sudo make install to set up Apache 2.0 for installation:

./configure --enable-mods-shared=most --enable-ssl \
--with-mpm=worker --without-berkeley-db
make
sudo make install

Create a directory for mod_dav.h, and copy the module to it using the following Terminal commands:

cd /usr/local/apache2
mkdir -p modules/dav/main
cp include/mod_dav.h modules/dav/main/

Once you have it installed, run the following command to start Apache.

sudo /usr/local/apache2/bin/apachectl start

You also need to run the following commands to start Apache 2.0 on each reboot.

sudo -s
mkdir /Library/StartupItems # This directory might already exist
ditto /System/Library/StartupItems/Apache /Library/StartupItems/Apache2
mv /Library/StartupItems/Apache2/Apache /Library/StartupItems/Apache2/Apache2
defaults write /Library/StartupItems/Apache2/StartupParameters Provides -array "Apache2"
perl -p -i -e 's/WEBSERVER/APACHE2/g' /Library/StartupItems/Apache2/Apache2
echo "APACHE2=-YES-" >> /etc/hostconfig

I have a problem now in that turning off and on web sharing in the system preferences will not stop and start Apache 2.0. I am at a loss on how to make this work. I am also unsure whether or not Apache 2.0 will start on reboot or whether I have to start it manually.

Subversion is rather easy to install. I used the tutorial found at hivelogic along with the same one I used to install Apache 2.0. Subversion appears to be installed and working but I haven’t really tested it in depth.

Once I had Apache 2.0 installed, I wanted to be able to access it when I go to http://localhost/ and access the files in /Library/Webserver/Documents. You need to stop Apache and then edit the http.conf file found in /usr/local/apache2/conf/httpd.conf. Then you need to change the DocumentRoot and the Directory.

DocumentRoot "/Library/Webserver/Documents"
<Directory "/Library/Webserver/Documents">

Now you can restart Apache and you should be able to access Apache 2.0 on http://localhost/. However, I found that PHP was no longer working because I had not yet installed it for Apache 2.0. Don’t worry though all you have to do is recompile it. Here are the steps I used.

If you already have the php files on your machine, go into that directory.

cd /usr/local/src/php-4.4.7

If not download it and unpack it again and then go into the directory you just created. Now you need to create the directory to install PHP into.

sudo mkdir /apache2/php

Then all you need to do is configure it with the right options. I used the following commands which adds support for the GD graphics library, in addition to mysql.

./configure --prefix=/usr/local/apache2/php \
--with-zlib-dir=/usr/local/lib \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/lib \
--with-gd --with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache2/bin/apxs
make
sudo make install

I ran into problems doing this. I kept getting the error from mysql.

dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib

I fixed this by copying the file into that path using the following commands.

cd /usr/local/mysql/lib
mkdir mysql
cp libmysqlclient.15.dylib mysql/libmysqlclient.15.dylib

I ran configure, make, sudo make install again, and it worked. An optional step you may want to take is to create a php.ini file. I created the php.ini file with this command.

sudo cp php.ini-dist /apache2/php/lib/php.ini

Now we need to edit the http.conf again so that PHP will run in Apache. Add the following lines in the appropriate sections.

LoadModule php4_module modules/libphp4.so
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php

Now restart Apache 2.0. Once I did that it worked. I now have Apache 2.0, PHP 4.4.7 and Subversion 1.3 installed locally on my Mac.

Disclaimer: Your mileage may vary. This is the compilation of a lot of work over a period of several days. I have tried to recount the steps I used as closely as possible. Use at your own risk. Here are some tutorials you may want to look at if you get stuck. Good luck.

Building and Installing Apache 2.2.4 and PHP 5.1.4 on Mac OS X 10.4.6
Apache 2.0 on Unix systems

Page 5 of 16« First...34567...Last »

Copyright © 2005-2010. XHTML | CSS