app wrote in php and that works offline?

General discussion on Zend Studio
Post Reply
Posts: 1
Joined: Wed Sep 03, 2014 10:53 pm

app wrote in php and that works offline?

Post by silv6993 » Wed Sep 03, 2014 11:38 pm

Hi everybody
I need to know if it's possible to make an app (for android and/or ios) with zend studio with those features:
- written in php (because it's the language I know and use)
- works offline (I mean, also if the device is not connected to the net) and data sincronization with a web based aplication (when the device comes back online)
- easy to install. Where the final user doesn't need to install 2, 3... different apps to make it work, just my app or all the required stuff in one single one-click easy to install package.

Last but not least, if I have a web aplication and its code, do I have to re-write it completely or can I just run a kind of "import & go" (with few adjustments)?

User avatar
Zend Global Support
Posts: 997
Joined: Sun Dec 14, 2008 9:48 am

Re: app wrote in php and that works offline?

Post by zvika » Thu Sep 04, 2014 10:15 am


I see a mix of several (mis) concepts in your question.
PHP app for mobile - PHP runs on web server or as CLI - Mobile apps are written in native code or with a wrapper that can display for example forms or HTML5 using a host (which is in native code).
Zend Studio can produce the PHP backend for your frontend mobile app (native or HTML5), and you can use the mobile tools to create a mobile GUI, those are 2 different projects and you have enough tutorials on how to develop mobile app in Zend Studio (you can always ask specific questions in this forum or open support tickets for official product support).

Works offline - this depends on your app capabilities to endure being offline, and how to constantly check or stick to network change event which can alert the mobile app to re-sync with the PHP backend.
PHP can also run in ANY capable server, if you are using Zend Server PHP you can check the system requirements for compatible OS and install on local LAN for tests and even use gateways or proxies for your final backend PHP (one PHP can connect to another by API / socket etc.).
Also possible, is to place the same PHP app with some local data source on the mobile itself - there are solutions to run PHP on mobile, along with the actual mobile app (frontend), so in case of being offline, some backend operations can be executed by the PHP running on the same "machine". I have no idea about the quality and availability of such mobile PHP runtime, but you are invited to try and have funnn playing with such projects.

Easy installation - nothing in life, especially integration is easy, if you are starting to mix and match. Easy is somewhat achieved with Zend Studio and Zend Server, where you can produce an installable package for your mobile (lets say, APK file signed or unsigned), and ZPK for your PHP (Zend Server Package format). Another manual, longer approach is to just drop your code on the PHP server and schema on the DB, configure the connections on the mobile to PHP and PHP to DB and you can fire your app. The ZPK deployment on Zend Server also requires you to know what you're doing, for example, you might add a deployment script (check the online reference, or ask in the Zend Server forum) to manage the DB, check for live services, configure Zend Framework etc.) which does what your manual operations are doing, for easy automation and continuous integration of updates.

Hope this helps.

BTW - if you want an easy, import and go approach, you should look into some easy tool to produce mobile apps with backend data, cloud service behind etc - there are companies who specialize in easy mobile app creation, hosting and maintenance and the small money they take for this service is worth to get short time to market for your concept apps.
Zvika Dror
Zend Support Team

Posts: 3
Joined: Wed Feb 15, 2017 4:51 pm

Re: app wrote in php and that works offline?

Post by file4086 » Mon Mar 12, 2018 11:38 am

thanks for sharing such a nice article keep sharing with us

Post Reply