You Are Here:

Community: Blogs

Maximiliano Firtman's Forum Nokia Blog

PHP and MySQL on Symbian

firt | 25 January, 2008 04:27

Yes guys, I’ve just installed PAMP (Personal Apache, MySQL and PHP) on my N95 and it worked!

Do we need another language for Symbian? I’ve also been a beta tester of a .NET Compact Framework for Symbian and it worked well too (but this is for another post).

So, my first thought was: “great, I can see a PHP running on my phone… and now what?” I’ve seen PHP running on an iPhone last weeks. But then, I realized that this are real good news. Not only because of PHP or Apache, because of MySQL too. We have MySQL on Symbian! A great database (recently acquired by Sun) with a lot of features that all web developers love.

Is PHP useful? Now you can port in 1 minute a development you already have in a website or intranet. There are thousands (millons?) of PHP developers in the world and now, they can run their applications in many Series 60 devices with no change. Many CMS (Content Management System) as Joomla or Drupal worked well too.

Ok, I had to install five applications and libraries (7.5Mb), I’ve received almost 15 warnings and disclaimers, but it worked. A simple user will be a bit frustrated. But this is the first beta of the product (hosted by Nokia Open Source) and I think there is a great opportunity in the future for this solution.

After installing it, I opened PAMP application and start both Apache and MySQL (you can start only one if you need). After 5-8 seconds I’ve both services running. Then, I opened my S60 browser and type 127.0.0.1 and I could see a phpinfo page with all the information about PHP version (5.2) and packages installed (like GD for image manipulation).

The PAMP application shows the obtained IP in your LAN, so you can type that URL in your desktop browser and you are receiving PHP files from your phone.

After that, I opened a MySQL client I frequently use for web development and tried to connect it to my phone’s IP, it worked too; so I created a database and one table. I inserted some records, all from my desktop computer (we still need a MySQL native client on Symbian, anyone?).

I could also write some CREATE SQL statements from the phone, but I don’t have a bluetooth keyboard ;-)

Then I opened PyEd on my N95 (the Python on device Editor) and wrote a simple PHP file that connects to the the MySQL and show me the results on an HTML page. I saved it on e:dataapachehtdocs (the root folder on my MicroSD card) and… everything worked!. And, I was surprised about the speed, even browsing the webpage from my desktop. It wasn’t a hard benchmark, but I’m satisfied about the response time.

I saw in the PHP’s package list some S60 packages, like contacts, messaging, but I couldn’t find any documentation about them. But I think you can use some Symbian API from PHP.

What's missing?

  • An API to access and query MySQL from Symbian, Python, Java ME and Flash Lite. It isn’t so hard to do. I’ve just review the MySQL protocol and with some free time, anyone can write a framework using sockets. Anyone with free time? Tongue out
  • Java ME and Flash applications connecting to Apache and calling PHP code
  • A native MySQL client for administration
  • Memory and battery optimizations
  • Cleaner and easier installer
  • MySQL alone?
  • A super duration battery and a fixed IP over 3G and we have portable web hosting Cool

What kind of application can we see developed in PHP?

  • Rapid CRUD applications for managing records.
  • AJAX applications with a rich UI over the browser.
  • Existing Open source CMS for many situations: blogs, eLearning, eCommerce. Only some of then will be useful to run on the phone.
  • Mini intranets. Just open your wifi connection and all the computers in the LAN (and other mobile devices, iPhones, iPods, Internet Tablets, etc) can access your application to view, upload and edit information from the browser. Close the Wifi connection or go ouside ;-) and the application is offline. Simple, clean, secure and quick.

Congratulations to the porting team that is working on PAMP and I would like to see more about this project.

By the way, only the N95 8B was tested succesfully by the team, but in my N95 classic with firmware v20 it worked ok in my little test. 

Follow the installation instructions and try it. What do you think?

RSSComments

You must login to post comments. Login
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxIE27mE20aE20mobileE20enthusiastE20thinkingE20inE20mobileE20lifeE2eE20ThereE20isE20stillE20placeE20forE20innovationE20inE20servicesE2cE20gamesE20andE20applicationsE2eE20WhatE20areE20youE20waitingE20forE3fE20E28E45nE20espaEf1olE20todavEedaE20hayE20mEe1sE20oportunidadesE29E20firtE20E7cE2025E20JanuaryE2cE202008E2004E3a27E20YesE20guysE2cE20IE92veE20justE20installedE20PAMPE20E28PersonalE20ApacheE2cE20MySE51E4cE20andE20PHPE29E20onE20myE20N95E20andE20itE20workedE21E20E44oE20weE20needE20anotherE20languageE20forE20SymbianE3fE20IE92veE20alsoE20beenE20aE20betaE20testerE20ofE20aE20E2eNE45TE20CompactE20FrameworkE20forE20SymbianE20andE20itE20workedE20wellE20tooE20E28butE20thisE20isE20forE20anoE2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2fmaE78imilianoE2dfirtmansE2dforumE2dnokiaE2dblogE2f2008E2f01E2f25E2fphpE2dandE2dmysE71lE2donE2dsymbianX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxMaE78imilianoE20FirtmanE27sE20ForumE20NokiaE20BlogE20E7cE20PHPE20andE20MySE51E4cE20onE20SymbianX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZBlogContentQ qdcZtypeQUqfntypeZBlogE45ntryQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxIE27mE20aE20mobileE20enthusiastE20thinkingE20inE20mobileE20lifeE2eE20ThereE20isE20stillE20placeE20forE20innovationE20inE20servicesE2cE20gamesE20andE20applicationsE2eE20WhatE20areE20youE20waitingE20forE3fE20E28E45nE20espaEf1olE20todavEedaE20hayE20mEe1sE20oportunidadesE29E20firtE20E7cE2025E20JanuaryE2cE202008E2004E3a27E20YesE20guysE2cE20IE92veE20justE20installedE20PAMPE20E28PersonalE20ApacheE2cE20MySE51E4cE20andE20PHPE29E20onE20myE20N95E20andE20itE20workedE21E20E44oE20weE20needE20anotherE20languageE20forE20SymbianE3fE20IE92veE20alsoE20beenE20aE20betaE20testerE20ofE20aE20E2eNE45TE20CompactE20FrameworkE20forE20SymbianE20andE20itE20workedE20wellE20tooE20E28butE20thisE20isE20forE20anoE2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fX qfnZtopicQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fFNE2d1E2fBlogTopicE2fgeneralXRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZbrowsingQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZseriesE5f60QRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtopicQUqfnTopicZwebE5ftechnologyQRqmarsZrelevanceQNx100X qfnZtypeQUqfntypeZBlogContentQ qfnZtypeQUqfntypeZBlogE45ntryQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZupdatedQDx2008E2d01E2d25X qfnZuserE5ftagQSxbrowsingX qfnZuserE5ftagQSxs60X qfnZuserE5ftagQSxwebE2dtechnologyX qmarsZdescriptionQSxIE27mE20aE20mobileE20enthusiastE20thinkingE20inE20mobileE20lifeE2eE20ThereE20isE20stillE20placeE20forE20innovationE20inE20servicesE2cE20gamesE20andE20applicationsE2eE20WhatE20areE20youE20waitingE20forE3fE20E28E45nE20espaEf1olE20todavEedaE20hayE20mEe1sE20oportunidadesE29E20firtE20E7cE2025E20JanuaryE2cE202008E2004E3a27E20YesE20guysE2cE20IE92veE20justE20installedE20PAMPE20E28PersonalE20ApacheE2cE20MySE51E4cE20andE20PHPE29E20onE20myE20N95E20andE20itE20workedE21E20E44oE20weE20needE20anotherE20languageE20forE20SymbianE3fE20IE92veE20alsoE20beenE20aE20betaE20testerE20ofE20aE20E2eNE45TE20CompactE20FrameworkE20forE20SymbianE20andE20itE20workedE20wellE20tooE20E28butE20thisE20isE20forE20anoE2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZBlogContentQ qrdfZtypeQUqfntypeZBlogE45ntryQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ