• 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

    • Thanks to Herr Musk being a total poison pill, they can't even give those pieces of scrap away.  They can't even ship them to the UK/EU because they're completely illegal over here.  
    • Intel vs AMD? Microsoft seemingly has a clear recommendation for Windows 11 Pro PC upgrade by Sayan Sen Microsoft and its partners are now quite actively and regularly promoting the upgrade to Windows 11. Asus, for example, recently published blog posts about the "mandatory Windows 11 upgrade" that is coming as the Windows 11 end of support date nears. Microsoft itself, from time to time, urges users to upgrade to its newest OS. Back in February 2024, Microsoft released an advert highlighting the best things about Windows 11 over Windows 10. Later, in June in the same year, the tech giant busted "myths and misconceptions" surrounding a Windows 11 upgrade. And towards the end of 2024, in December, Microsoft put up a blog post outlining the gaming features a user enjoys on 11 if they were to upgrade from Windows 10. While technically there is nothing wrong with a company promoting its own product, sometimes these campaigns make little sense and they fall flat. For example, in January earlier this year, Microsoft shared a blog post headlined "Free Upgrade to Windows 11 (For a Limited Time Only)" which did not make sense as it offered little information about it being a "free upgrade," and it was rightfully, later taken down. The company is back again with a new commercial about Windows 11. This time it is aimed mainly at IT professionals and enterprises as the advert talks about upgrading to Windows 11 Pro from Windows 10. This landed a few days after Microsoft released a new backup tool for organizations for such a purpose. What is interesting is that the company is promoting Intel's vPro processors and there is no mention of AMD's Ryzen PRO parts. The commercial is posted on the Windows official YouTube channel and has been titled "Right side of risk | Windows 11 Pro and Intel". The video description says, "Windows 10 support ends October 14. Stay on the right side of risk—upgrade now to the power of Windows 11 Pro PCs with Intel vPro®." AMD does have a support article about the subject headlined "Support Your Customers’ Move to Windows 11, With AMD Ryzen™ PRO Processors" and you can find it here. This is not the first time Microsoft has promoted Intel CPUs over AMD ones. Back in 2021, the company also put up a full page explaining how users should "look for the Intel EVO badge" on a new device before making a purchase decision because such PCs are "verified wonderful" which was a bit of an odd language. Like the limited upgrade time article, the page above was taken down after we reported on it (can be viewed via the archive) and replaced with something else. The new commercial was published about a couple of days ago, and it is possible that Microsoft may have a dedicated AMD advert too in the pipeline scheduled for a later release, and that would only be fair if both companies get a similar treatment.
    • Don’t blame web developers for the downfall of Firefox. 😂
    • Microsoft, Indian police bust AI-powered tech support scam ring targeting elderly in Japan by Paul Hill Pop-up scams pretending to be Microsoft Working with India’s Central Bureau of Investigation (CBI), Microsoft recently assisted in busting a scam network that was targeting the elderly in Japan. The CBI raided 19 locations on May 28, leading to the arrest of six key operatives and the taking down of two call centers. The scammers were impersonating Microsoft specifically and using tech support scams against Japanese seniors. The raid led to the seizure of both digital and physical infrastructure, including computers, storage devices, and phones. The scammers were targeting older adults, who are more vulnerable to fraud. To put this activity to an end, Microsoft’s Digital Crimes Unit (DCU), the Japan Cybercrime Control Center (JC3), Japan’s National Police Agency (NPA), and India’s CBI conducted significant cross-border collaboration to trace the criminals. Thanks to the internet, cross-border crimes like these have been around for a while and multinational tech firms like Microsoft are making significant efforts to help law enforcement agencies crack down on cybercrime. Artificial intelligence is also starting to be used to make more sophisticated scams. The evolving threat This case reveals an evolution in how Microsoft’s DCU addresses cybercrime involving tech support fraud. Thanks to AI, scammers have been able to scale their operations. In response, Microsoft has moved away from focusing on individual call centers to target the heads of criminal operations and disrupting their technical infrastructure. Notably, Microsoft’s collaboration with JC3 is the first time the DCU has partnered with a Japan-based organization to assist victims. Microsoft is continually getting tips from JC3 about malicious pop-ups urging recipients to call fake technical support lines that claim to be Microsoft. This data has allowed Microsoft to shut down 66,000 malicious domains and URLs globally since May 2024. Microsoft noted that artificial intelligence is now being used by criminals to scale their operations. Some ways in which these entities leverage AI are for victim identification, writing convincing scam emails and building fake web pages, as well as for convincing translations. Anyone can use AI for malicious purposes so it could increase the number of people or groups carrying out attacks. It also makes attacks much more sophisticated and harder to detect and necessitates better consumer protections and more sophisticated security tools such as passkeys to reduce hacks. Protecting vulnerable populations and what readers can do Tech support fraud attacks have been found by the FBI to disproportionately affect older people, resulting in $590 million in losses in 2023 for just older Americans alone. In this operation that targeted Japanese victims, around 90% of the 200 affected people were over 50. If you’ve ever received suspicious communications from a party claiming to be Microsoft, you should know that Microsoft never sends unsolicited emails or makes phone calls requesting personal or financial information, and it doesn’t offer unsolicited tech support. If you do get any suspicious communications, then you should report it to Microsoft so that it can take action.
  • 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
      434
    2. 2
      +FloatingFatMan
      238
    3. 3
      snowy owl
      214
    4. 4
      ATLien_0
      211
    5. 5
      Xenon
      156
  • Tell a friend

    Love Neowin? Tell a friend!