Google App Engine for PHP now officially available

If you are into Google’s IO event, they announced earlier year that they are adding support for PHP on their Google App Engine.

From fresh hands on it just last month, I tried it out Google App Engine for PHP, I was pretty amazed on how fast to develop and get up running immediately. The only drawback was that you have to whitelist your website before it can be deployed. Now that whitelist is officially removed.

If you are new to Google App Engine, this is the cloud hosting offering of Google similar to Amazon Web Services.
Read the rest of this entry »

Forbidden You don’t have permission to access /~username/directory in Mac OS X

I have this weird issue with my website backups. When I store them inside my Sites folder and try to view them from the browser.

1. They do not appear listed when I do a directory listing
2. Accessing the folder manually produces the error

You don’t have permission to access on localhost /~username/mydirectory

This is well known and documented on Apple here.

But my issue is it is only a problem for this backups, the existing directories I have in my system works fine.

The solution is not straightforward but this works.

Follow the solution from Apple website. edit your username.conf file using terminal and then add the following line before closing.

Options +FollowSymLinks

So it looks like this.

<Directory “/Users/username/Sites/”>
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
Options +FollowSymLinks
</Directory>

Then restart apache

service apachectl restart

Troubleshoot AWS SimpleEmailService – Sender – RequestExpired

On our AWS EC2 instance email delivery stopped working without any notice. Customers started reporting that they are not receiving their emails. Better check your error logs.

If you find something like this.

PHP Warning: SimpleEmailService::sendEmail(): Sender – RequestExpired: Request timestamp: Sun, 15 Sep 2013 06:39:50 UTC expired. It must be within 300 secs/ of server time.\nRequest Id: 552d8117-1dd2-11e3-a1bc-29ded7e8e9e2\n

This basically means that the timestamp of our server is off and does match the Amazon Simple Email Service. It is off by almost 300 secs.

By why will our server time suddenly be off. It appears that server time needs to be synch to a central NTP server. You can try the following suggested solutions.

1. Update locally
Install the ntpdate package on your system.
#sudo apt-get install ntpdate
#sudo /usr/sbin/ntpdate 128.101.101.101

2. Run and check against existing NTP Servers
#sudo /usr/sbin/ntpdate 0.north-america.pool.ntp.org 1.north-america.pool.ntp.org 2.north-america.pool.ntp.org 3.north-america.pool.ntp.org

Kudos to Mind Geek for the second solution.