• 0

Deploying PHP Applications as a Native Desktop Application


Question

Hi,

 

I am sure this is one of those things that people probably asked many times. However, my research still

hasn't pointed me to a suitable solution. Basically I am tring to make my PHP applications (running on CakePHP, and SQLite) as painless as possible to deploy.

 

Are there any kind of tool or a package of Apache and PHP that self-contained and is very small and makes it super easy

to deploy an application for production use? So, the end user just has to run a single file and it will take care of

starting the web servers and launching the website. And once the window is closed it turns off the servers as well?

 

A solution that works on three major platforms (Windows, Mac and Linux) would be ideal.

 

Any ideas or options?

 

FYI coding in JAVA is not an option. CakePHP and EXTJS are all you need!

 

Thanks :)

21 answers to this question

Recommended Posts

  • 0

WAMP/LAMP/MAMP or XAMPP? (These are useful for installing/configuring apache, mysql, php all together - then simply place your web application in a folder from the root of the server and browse to it).

 

Not exactly 'native'  but would suffice.

  • 0
  On 27/06/2013 at 12:07, TheGhostWalker said:

OMG I love you. Which one do you suggest though. Downloaded PHP Desktop and messed around with it. Which one provides the most options.

  • 0

PHP-GTK seems to be the oldest / most popular, although people like WinBinder. The real issue is that there wasn't a PHP release worth developing with on the desktop until (arguably) 5.3 so... obviously there's not a lot of support for desktop applications out there. Also, Python has existed as long as PHP has, and already covered the native application side of things.

  • 0
  On 27/06/2013 at 13:07, threetonesun said:

PHP-GTK seems to be the oldest / most popular, although people like WinBinder. The real issue is that there wasn't a PHP release worth developing with on the desktop until (arguably) 5.3 so... obviously there's not a lot of support for desktop applications out there. Also, Python has existed as long as PHP has, and already covered the native application side of things.

But I haven't been bothered to learn Python. Right now I do all of my web development in PHP/SQL so having the ability to transfer that knowledge to the desktop makes a bit of sense for me. I hate switching between languages on a daily basis. Eventually you confuse something and can't find what you did wrong because both versions look fine.

  • 0

What's stopping you from serving the app from a server? Surely that would take care of all your problems and make it even easier for people.

 

In any case, you're probably better of trying out the alternatives mentioned by TheGhostWalker to find which one you like since your requirements are a little bit on the vague side.

  • Like 1
  • 0
  On 27/06/2013 at 13:17, Jub Fequois said:

What's stopping you from serving the app from a server? Surely that would take care of all your problems and make it even easier for people.

 

In any case, you're probably better of trying out the alternatives mentioned by TheGhostWalker to find which one you like since your requirements are a little bit on the vague side.

I am not the OP :P. However, while nothing is stopping me from running it from the server, having to have a server itself is a limitation. No longer having that limitation is a plus in some situations. Servers add more variables of things that can go wrong. What if the person doesn't install the server correctly? What if they change a single setting and now the server doesn't want to launch anymore. I use to do stuff with XAMP until a client managed to render the software completely useless. Couldn't get it to launch. Reinstalling didn't matter. Tried for hours to get it to work but nothing would budge. Having everything confined and using very little settings and files is a much better solution than having to rely on a customer not somehow screwing up something by changing a single obscure setting. After looking through PHP Desktop, I noticed there are not very many files. If someone screws up, just copy and paste over the files and the software would work again. Simple solutions always trump unnecessarily complex ones in my book.

  • 0
  On 27/06/2013 at 13:10, ILikeTobacco said:

But I haven't been bothered to learn Python. Right now I do all of my web development in PHP/SQL so having the ability to transfer that knowledge to the desktop makes a bit of sense for me. I hate switching between languages on a daily basis. Eventually you confuse something and can't find what you did wrong because both versions look fine.

 

Well, usually you can either do everything with Javascript (now that local storage is available), or you're going to want access to APIs that PHP doesn't have.

  On 27/06/2013 at 13:25, ILikeTobacco said:

I am not the OP :p. However, while nothing is stopping me from running it from the server, having to have a server itself is a limitation. No longer having that limitation is a plus in some situations. Servers add more variables of things that can go wrong. What if the person doesn't install the server correctly? What if they change a single setting and now the server doesn't want to launch anymore. I use to do stuff with XAMP until a client managed to render the software completely useless. Couldn't get it to launch. Reinstalling didn't matter. Tried for hours to get it to work but nothing would budge. Having everything confined and using very little settings and files is a much better solution than having to rely on a customer not somehow screwing up something by changing a single obscure setting. After looking through PHP Desktop, I noticed there are not very many files. If someone screws up, just copy and paste over the files and the software would work again. Simple solutions always trump unnecessarily complex ones in my book.

 

This all sounds soooooo terrible :laugh:

 

PHP for desktop applications is very much the "if you only have a hammer, everything is a nail" mentality.

  • 0
  On 27/06/2013 at 13:29, threetonesun said:

Well, usually you can either do everything with Javascript (now that local storage is available), or you're going to want access to APIs that PHP doesn't have.

 

This all sounds soooooo terrible :laugh:

 

PHP for desktop applications is very much the "if you only have a hammer, everything is a nail" mentality.

Comes down to time constraints. I rarely do anything that is confined to a single desktop. Most of my work is for websites and applications that require a server anyway. If you are short on time, you make everything a nail. :P

 

Also, for SQL, even though JavaScript technically can be used, I prefer to stay away from that practice. It may just be me, but I find using PHP for any sort of processing is just more efficient.

  • 0
  On 27/06/2013 at 12:34, ILikeTobacco said:

OMG I love you. Which one do you suggest though. Downloaded PHP Desktop and messed around with it. Which one provides the most options.

My only experience is with php gtk, but winbinder seems lovely (and so does php desktop) :).

  • 0

Wow, thanks for those links guys. ILikeTobacco, I am glad that I am not the only crazy one looking for a solution like that. I honestly feel that PHP is badass and with the technologies like CakePHP, EXTJS or jQuery you can create badass applications. Surely, putting things on the web has its benefits but why not both :p.... I have a fetish for native applications or something.

 

I could switch to JAVA and make my application there. But honestly the amount of code and the things you have to do in JAVA just to build a cross platform application take more time than if you used a popular library like EXT for the front-end and CakePHP for handling the logic.

 

I was looking for a solution like Adobe AIR... but instead of just HTML/JAVASCRIPT or SQLLite, you would code in PHP.

 

ThreeToneSun, I am not familiar with Python. But did you just say if I create a web app in Python, it will act as if it's a native application? Or would I still have to fire up a browser to run them?

 

I just looked up EXTJS and JAVA... something interesting popped up :p

  • 0
  On 27/06/2013 at 17:47, roosevelt said:

ThreeToneSun, I am not familiar with Python. But did you just say if I create a web app in Python, it will act as if it's a native application? Or would I still have to fire up a browser to run them?

Python is just another server side language like PHP. However, it isn't as focused on web applications as PHP is. It can also be run directly on a desktop.

  • 0

Guys I ran into this awesome nugget. Even though it does not support PHP... using a badass Javascript library to handle user's actions would be a good replacement for this. It's called AppJS. Basicaly it allows you to package your HTML/JAVASCRIPT/CSS project as a native desktop application. And it runs on Windows, Mac and Linux. I tested EXTJS, my ultimate fetish, and it is working great!

 

http://appjs.org/

  • 0
  On 27/06/2013 at 19:17, roosevelt said:

Guys I ran into this awesome nugget. Even though it does not support PHP... using a badass Javascript library to handle user's actions would be a good replacement for this. It's called AppJS. Basicaly it allows you to package your HTML/JAVASCRIPT/CSS project as a native desktop application. And it runs on Windows, Mac and Linux. I tested EXTJS, my ultimate fetish, and it is working great!

 

http://appjs.org/

Nice. Is it possible to hide the code? I have been playing with PHP Desktop and that doesn't seem to be possible. Makes the code not very secure.

  • 0
  On 27/06/2013 at 17:50, ILikeTobacco said:

Python is just another server side language like PHP. However, it isn't as focused on web applications as PHP is. It can also be run directly on a desktop.

 

Python is not a server side programming language. You would need an Apache module to run it on a server, and most people use a framework like Django with it as well. It's just a general purpose programming language.

 

If you can able OO PHP, you could pick up Python in a week. It makes a lot more sense than PHP does. On the other hand, if you want to do all of your UI with HTML + CSS (and it sounds like you do), a straight conversion program like appcelerator probably makes more sense.

  • 0
  On 27/06/2013 at 19:49, threetonesun said:

Python is not a server side programming language. You would need an Apache module to run it on a server, and most people use a framework like Django with it as well. It's just a general purpose programming language.

 

If you can able OO PHP, you could pick up Python in a week. It makes a lot more sense than PHP does. On the other hand, if you want to do all of your UI with HTML + CSS (and it sounds like you do), a straight conversion program like appcelerator probably makes more sense.

That makes it a server side language. If you install Apache without any modules, PHP doesn't run on it. For something to be a server side language, it simply needs to be a programming language that runs on the server when it is called. Also, for most larger projects, people use frameworks in PHP. The two languages are both server side languages in that situation, however Python wasn't created to be a server side language like PHP.

  • 0
  On 27/06/2013 at 19:25, ILikeTobacco said:

Nice. Is it possible to hide the code? I have been playing with PHP Desktop and that doesn't seem to be possible. Makes the code not very secure.

 

Have you read the "Protecting sources" section on the KnowledgeBase wiki page?

 

  Quote

 

 

PHP Desktop doesn't provide a direct way for protecting your php sources, but you can load custom php extensions, thus allowing you to use many of the available php encoders such as Ion CubeZend GuardSource Guardian or Nu-Coder.

 

https://code.google.com/p/phpdesktop/wiki/KnowledgeBase#Protecting_sources

  • 0
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft 365 Word gets SharePoint eSignature, now you can ditch third-party signing tools by Paul Hill Microsoft has just announced that it will be rolling out an extremely convenient feature for Microsoft 365 customers who use Word throughout this year. The Redmond giant said that you’ll now be able to use SharePoint’s native eSignature service directly in Microsoft Word. The new feature allows customers to request electronic signatures without converting the documents to a PDF or leaving the Word interface, significantly speeding up workflows. Microsoft’s integration of eSignatures also allows you to create eSignature templates which will speed up document approvals, eliminate physical signing steps, and help with compliance and security in the Microsoft 365 environment. This change has the potential to significantly improve the quality-of-life for those in work finding themselves adding lots of signatures to documents as they will no longer have to export PDFs from Word and apply the signature outside of Word. It’s also key to point out that this feature is integrated natively and is not an extension. The move is quite clever from Microsoft, if businesses were using third-party tools to sign their documents, they would no longer need to use these as it’s easier to do it in Word. Not only does it reduce reliance on other tools, it also makes Microsoft’s products more competitive against other office suites such as Google Workspace. Streamlined, secure, and compliant The new eSignature feature is tightly integrated into Word. It lets you insert signature fields seamlessly into documents and request other people’s signatures, all while remaining in Word. The eSignature feature can be accessed in Word by going to the Insert ribbon. When you send a signature request to someone from Word, the recipient will get an automatically generated PDF copy of the Word document to sign. The signed PDF will then be kept in the same SharePoint location as the original Word file. To ensure end-to-end security and compliance, the document never leaves the Microsoft 365 trust boundary. For anyone with a repetitive signing process, this integration allows you to turn Word documents into eSignature templates so they can be reused. Another feature that Microsoft has built in is audit trail and notifications. Both the senders and signers will get email notifications throughout the entire signing process. Additionally, you can view the activity history (audit trail) in the signed PDF to check who signed it and when. Finally, Microsoft said that administrators will be able to control how the feature is used in Word throughout the organization. They can decide to enable it for specific users via an Office group policy or limit it to particular SharePoint sites. The company said that SharePoint eSignature also lets admins log activities in the Purview Audit log. A key security measure included by Microsoft, which was mentioned above, was the Microsoft 365 trust boundary. By keeping documents in this boundary, Microsoft ensures that all organizations can use this feature without worry. The inclusion of automatic PDF creation is all a huge benefit to users as it will cut out the step of manual PDF creation. While creating a PDF isn’t complicated, it can be time consuming. The eSignature feature looks like a win-win-win for organizations that rely on digital signatures. Not only does it speed things along and remain secure, but it’s also packed with features like tracking, making it really useful and comprehensive. When and how your organization gets it SharePoint eSignature has started rolling out to Word on the M365 Beta and Current Channels in the United States, Canada, the United Kingdom, Europe, and Australia-Pacific. This phase of the rollout is expected to be completed by early July. People in the rest of the world will also be gaining this time-saving feature but it will not reach everyone right away, though Microsoft promises to reach everybody by the end of the year. To use the feature, it will need to be enabled by administrators. If you’re an admin who needs to enable this, just go to the M365 Admin Center and enable SharePoint eSignature, ensuring the Word checkbox is selected. Once the service is enabled, apply the “Allow the use of SharePoint eSignature for Microsoft Word” policy. The policy can be enabled via Intune, Group Policy manager, or the Cloud Policy service for Microsoft 365 Assuming the admins have given permission to use the feature, users will be able to access SharePoint eSignatures on Word Desktop using the Microsoft 365 Current Channel or Beta Channel. The main caveats include that the rollout is phased, so you might not get it right away, and it requires IT admins to enable the feature - in which case, it may never get enabled at all. Overall, this feature stands to benefit users who sign documents a lot as it can save huge amounts of time cumulatively. It’s also good for Microsoft who increase organizations’ dependence on Word.
    • It's always good to have an option to secure your stuff to another medium. I did that with DVD/CD collection, and run my own media server now. It's more convenient that way and no need for separate players anymore.
    • Google Search AI Mode gets support for data visualization and custom charts by Aditya Tiwari Google announced it is rolling out support for data visualizations and graphs for finance-related queries in Google Search's AI Mode. Introduced last month at the Google I/O 2025 keynote, the feature lets you analyze complex datasets and create custom charts simply using natural language prompts. The updated AI Mode lets you compare and analyze information over a specific period, Google explained. It generates interactive graphs and provides a comprehensive explanation for your questions. AI Mode utilizes Gemini's multimodal capabilities and multi-step reasoning approach to comprehend the question's intent while accessing historical and real-time information relevant to the question. For instance, instead of manually researching individual companies and their stock prices, you can use AI Mode to compare the stock performance of different companies for a specific year. Once the graph is generated, you can choose the desired time period using the mouse cursor and ask follow-up questions based on the data presented. These new data visualizations for finance queries are available to users who have enabled the AI Mode experiment in Labs. AI Mode was introduced earlier this year as an experimental feature in the US. The feature is an upgraded version of AI Overviews, and Google closely worked with AI power users through the initial development process. It uses the “query fan-out” technique to perform multiple related searches across subtopics and different data sources, then combines them to come up with a comprehensive response. Google updated AI Mode last month to use a custom version of the latest Gemini 2.5 model. It added several new features, including Deep Search, live capabilities, agentic capabilities of Project Mariner, a new shopping experience, and the ability to add personal context by linking Google apps. The search giant is planning to turn AI Mode into its bread and butter. It has begun testing ads for the feature, which will appear below and be integrated into AI Mode responses where relevant.
    • Guys, you should find another way to promote your deals... It's the third article in the last months that promote this deal for an upgrade from 10. Considering that upgrade from 10 to 11 is free it's a total non-sense.
    • Store should be a shrine of useful applications, vetted and verified. Easily sorted by publisher. Windows should start with not much installed and have things as options in the store. Not the wild west mess that it is. You could delete 95%+ of the crap on there and no one would notice. They need to add a better UI to the updates, it's awful right now.
  • Recent Achievements

    • Week One Done
      luxoxfurniture earned a badge
      Week One Done
    • First Post
      Uranus_enjoyer earned a badge
      First Post
    • Week One Done
      Uranus_enjoyer earned a badge
      Week One Done
    • Week One Done
      jfam earned a badge
      Week One Done
    • First Post
      survivor303 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      432
    2. 2
      +FloatingFatMan
      239
    3. 3
      snowy owl
      213
    4. 4
      ATLien_0
      211
    5. 5
      Xenon
      157
  • Tell a friend

    Love Neowin? Tell a friend!