Who am I?

firt

I'm a mobile enthusiast thinking in mobile life. There is still place for innovation in services, games and applications. What are you waiting for?
(En español todavía hay más oportunidades)

Calendar

« January 2008 »
Mo Tu We Th Fr Sa Su
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

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

Re: PHP and MySQL on Symbian

rodangib | 09/02/2010, 03:36

Hi Max,

Since it's been 2 years since you posted this, have you run this on an N97? And if so, what improvements have you seen in the PHP/MySQL/S60 trio?

By the way, I noticed you speak Spanish, asi que te hablo en ese idioma. Soy nuevo en el cuento de programacion para telefonos moviles, pero bastante interesado en crear. Actualmente me encuentro planificando un programita sencillo y quiero hacerlo en ambos idiomas.

Bueno saludos and thanks.

You must login to post comments. Login
 
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved