Connecting to SQL Azure with PHP

To start, I would like to first say that although many PHP developers usually recommend MySQL as the accompanying database for PHP, it is not difficult to interface PHP with other databases such as SQL Azure, Microsoft’s cloud-based relational database offering. PHP connects with SQL Azure in a similar manner as how it does with Microsoft SQL Server, ie through an interface known as the Open Database Connectivity (ODBC), which is actually the standard software interface for accessing databases. Each platform and database has its own implementation following the ODBC standard but for this tutorial, I’ll focus on PHP. There are a few ways to connect your php site to MS SQL but the 2 main approaches are as shown in Figure 1.0. 1. Using the “php_mssql.dll” php extension requiring MS SQL Client Tools installed (Figure 1.0, right column). 2. Using the “sqlsrv” driver (“Microsoft Drivers for PHP for SQL Server”) requiring MS SQL Native Client installed (Figure 1.0, left column) ...

Singapore PHP User Group - 3rd Anniversary Meetup

SINGAPORE PHP USER GROUP – 3rd Anniversary Meetup! Agenda in brief: 7:00pm – 8:00pm Registration & Networking Session 8:00pm – 8:30pm MS Internet Explorer 9 + HTML5 8:30pm – 9:00pm CakePHP in the Wild! - FlickEvents 9:00pm – 9:30pm Introducing Enterprise PHP Center Asia TOPICS: 1) Microsoft Internet Explorer 9 + HTML5 Presenter: Jonathan Wong, Regional Product Manager for Internet Explorer, Microsoft He works with partners, customers and developers to help them innovate and build cool things with Microsoft technologies. Jonathan will be sharing with us about the cool new web tools in IE9 and its support for HTML5. 2) CakePHP in the Wild - FlickEvents Presenter: Huang Yaoquan, Founder, FlickEvents Easy event management as simple as a flick of switch. With FlickEvents, event organizer can now focus on organizing great events instead of worrying about the nitty-gritty stuff. See how its done in CakePHP - the PHP Framework http://flickevents.com/ 3) Introducing Enterprise PHP Center Asia Presenter: Rama Yurindra, Rynet Singapore, (Zend Technologies Representatives in Asia) The Enterprise PHP Center is a comprehensive collection of Enterprise PHP resources for Business Managers & IT professionals brought to you by Rynet Group and it’s affiliates and partners. The Enterprise PHP Center is a complete online resources in the PHP eco system. It will address business managers as well as individual developers with decision–making authority. http://www.enterprisephpcenter.com/ Venue Sponsor: Microsoft Singapore Food Sponsor: Foound Pte Ltd You could register the event here.

Integrate Bing Maps with PHP

Microsoft provides Virtual Earth Integration Kit for PHP to integrate Bing Map Applition into PHP pages. Microsoft’s Virtual Earth is an example of an element of the Microsoft platform which can be consumed by and integrated into PHP web sites. The Virtual Earth API is exposed through a Javascript library making it straightforward to integrate into any web based application. There are multiple choices for environment set up: Linux/Apache, Windows/Apache or Windows/IIS. Both IIS and Apache use port 80 as default port. Therefore, if you have both server running on your machine, you may want to change one of the port to avoid conflict. Also, you will need PHP 5.2 and MySql for set-up. ...

Microsoft Web Camp

We’ve got something really cool for you guys this June! James Senior (Microsoft’s “Social Web Guy”) is flying to Singapore to deliver a developer camp-style event called Web Camp. What is Web Camp? Web Camp is a free 2-day web developer event intended to educate web developers about the Microsoft Web Platform, including trending topics like ASP.NET MVC Web Forms, ASP.NET MVC, jQuery, Entity Framework, IIS, Visual Studio 2010 and much more. Who should go to Web Camp? Web Camp is for all web developers. Whether you’re currently working with PHP, Ruby, ASP or older versions of ASP.NET; or if you want to be updated with the new technologies on the Microsoft Web Platform, in an interactive environment where you can get down and dirty with your fellow web developers amongst Microsoft experts, then the Microsoft Web Camp is for you. Registrations are open! Check out the agenda and register here. See you there!

Bing Search Library for PHP

Today is Friday, and if you are a PHP developer with nothing to do this coming weekend, here is a new API library that you can try out over the next couple days. We are happy to announce a new Bing Search Library for PHP,available on Codeplex.com under an open source BSD license. From the project homepage on Codeplex.com: The Bing Search Library for PHP allows you to easily use Bing’s API to fetch search results and use in your own PHP application. The library for PHP is designed to give PHP developers an object-oriented interface to access the Bing API. It supports fluent interfaces in PHP so that options can be easily chained together for readability. ...

Microsoft Tag for Developers

Eighteen months of incubation and one billion printed Tags later, Microsoft Tag is finally coming out of beta. (If you are not sure what Tag is, it’s basically an advanced mobile bar code technology that allows you to use some very nifty custom designs as 2D bar codes.) The basic Tag services are still free of charge, including creating a standard Tag, reviewing standard analytics, and using the Tag Reader application. The Tag team also plans to add other value-added features over time such as advanced reporting and analytics and real-time location services. As part of this launch, Microsoft Tag also offers the following new features: ...

Windows Azure @ PHP User Group

[gallery link=“file” orderby=“rand”] (Check out more photos of the event here.) Last night, we hosted the Singapore PHP User Group (or the Philosophy in Programming Society, as they like to be called) at our office for their monthly meet-up. There were two presentations during the event. I presented on using the Windows Azure Platform with PHP, and Chin Yong presented on APC (Alternative PHP Cache – no, not Armored Personnel Carrier) Here are our presentation slides: [slideshare id=3869311&doc=phpugwindowsazurephpjonathanwong-100427054032-phpapp01] [slideshare id=3879226&doc=phpmeetupaprilapc-100427223208-phpapp02] You can also download my barebones Azure PHP code template here, if you are interested in trying to run your own PHP application on Windows Azure. Don’t forget that the one-stop location for everything you need to learn about and get started on Windows Azure is at this simple URL: www.windowsazure.com. Quote of the night comes from Chin Yong’s last slide: ...

The Lazy Man's "PHP Hello Cloud"

Due to the popular demand on how to actually host a PHP application on Windows Azure, this post teaches you the easiest way to deploy your PHP applications on the Cloud with the least effort and there is no need to use Windows Azure. Resources Needed PHP Binaries for IIS (http://windows.php.net/) MySQL PHP Solution Accelerator (http://code.msdn.microsoft.com/winazuremysqlphp) VS2008 SP1/VS2010 Beta 2 w/ Windows Azure SDK Steps Install the MySQL PHP Solution Accelerator. Extract the PHP binaries for IIS to the “php” folder in the PhpMyAdminWebRole directory. E.g. “C:SamplesAzureMySQLPHP_x86PhpMyAdminWebRolephp” Create a new “Windows Azure Cloud Service” solution in Visual Studio. Add an existing project, “PhpMyAdminWebRole” (From the Solution Accelerator), to the solution you created. Right click on “Roles” and select “Add-> Web Role Project in solution” and select the project you added in your solution previously. Add a new text file in “PhpMyAdminWebRole” and name it “index.php”. The contents of the file is “ <?php echo ‘Hello Cloud’; ?> “ (Optional). Open Web.config and replace “ <add value=“Admin.aspx”/>” to “ <addvalue=“index.php”/> “ And you are all set! Hit F5 in your Visual Studio to see your work in action on the Development Fabric.