Create your first Desktop Application with PHP and PHP Desktop



Ankur Lakhani Since Feb 16, 2015 8 Posts

Waiting for the full new tutorial on developing database driven PHP applications for desktop.

mohamad jefri abdul karim Since May 16, 2015 1 Posts

Assalamualaikum

good tutorials you have.. just want to know whether you can share with us on how to embed mysql as part of the database instead of using sqlite..

Thanks & regards

zooboole Since Jan 22, 2015 117 Posts

Walaekum salam Mohamad.

Thanks for your comment. In fact you are rising an important point.

Since MySql is common and suitable to most cases it would have been great to use it instead of Sqlite. But, the issue is that MySQL is a server based RDBMS, which makes it hard to be embedded while Sqlite is just a simple file alongside your files.

Even though Mysql is server based DBMS, they still have some embedded versions you can use. But they are not free. If you want to read more about the mysql embedded, head over here: https://www.mysql.com/oem/

Thukten Dendup Since Apr 29, 2015 6 Posts

@zooboole ... I have developed my application using Zend Framework and to run we have to make some changes to httpd.conf apache file like
eg: AllowOverride None to AllowOverride All If you can help me apply this changes

Thukten Dendup Since Apr 29, 2015 6 Posts

@zooboole ... I checked the application which you have uploaded over here. It does contain the .htaccess file. But Since we cannot set the Apache Configuration of Allowoverride None to Allowoverride All, I think the .htaccess file is of now use. Or you have a way to set this configuration in Apache web server. Your response will be highly appreciated.

zooboole Since Jan 22, 2015 117 Posts

As you noticed it, Thukten in previous version of php desktop you could not configure Apache. In my sample app, i had to use static URLs.

But from PHP Desktop Chrome 31.8, you can configure Apache for url rewriting. To do that, download the recent version of PHP Desktop and open up the settings.json file. Look for the "web_server" object, in there change the 404_handler:"" . That will allow you to handle 404 errors url rewring. Read more about the configuration here: https://code.google.com/p/phpdesktop/wiki/Settings#web_server

Hope that helps, and i apologize for the delay of my answer.

Thanks

Ravinesh kumar Since May 25, 2015 1 Posts

First of all Thanks for the best tutorial . I got some issue i follow the same above step and its also generate exe on my desktop but when i run and complete the process then output is showing "PHP Desktop Chrome has stopperd Working" and when i click on view problem details its showing below message

Problem signature: Problem Event Name: APPCRASH Application Name: phpdesktop-chrome.exe Application Version: 31.8.0.0 Application Timestamp: 546f0770 Fault Module Name: libcef.dll Fault Module Version: 3.1650.1562.0 Fault Module Timestamp: 52d3dd6e Exception Code: 80000003 Exception Offset: 001179c0 OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt

zooboole Since Jan 22, 2015 117 Posts

Hi @Ravinesh kumar and welcome to phpocean. For your issue check this answer: http://phpocean.com/forum/topic/create-your-first-desktop-application-with-php-and-php-desktop/4/list/2#65.

Aside that I would advise you to download a new copy of php desktop since the error seems to come from libcef.dll which is a windows DLL altogether.

ravinesh kumar Since May 25, 2015 1 Posts

hi i have tried many time but same time its displaying same error.i had downloded latest version but i still stuck up in the issue please help .

i downloaded this file Chrome 31 with PHP 5.6 for Vista or later (Win7, Win8)

and i follow above all step provided by you but still i am getting error please help me

zooboole Since Jan 22, 2015 117 Posts

Then the problem should be coming from your source code. Can you let us have a look at it if possible?



Caleb Sands Since Jun 13, 2015 2 Posts

Hi Zooboole,

This was an excellent tutorial. However, I created a simple Hello App to test the whole process of building and creating a standalone executable. When i install my program and go to launch it, it get an error stating that the libcef.dll file is missing from my computer. How can I go about fixing this problem?

Thanks,

SandmanTS1

zooboole Since Jan 22, 2015 117 Posts

Thanks Caleb. Please check in your installation folder. Do you have the libcef.dll file within it ?

Daniel Atakpa Since Jun 17, 2015 5 Posts

I love the tutorial and the choice and tone of words used in your explanation zooboole...nice work. I have followed the steps outlined above judiciously and every thing seem ok, however I need your explanation to be able to proceed in the following areas

After compiling with Inno Compiler, the sample application you gave above did not display. I just don't know why With Inno Compiler, how do I protect the source code? I noticed the index.php in C:\Program Files\myApp Is it possible to access the database for a desktop application after some time and synchronize it with the online version of the same project? How can that be done?

I am working on an application that need to put these into consideration.

Thank you in anticipation

zooboole Since Jan 22, 2015 117 Posts

Thank you Daniel, I really Appreciate. I am still working one clearer application with PHP Desktop. Though I am late about it but soon it will come out. It will have all information one could need for a complete PHP app.

Now concerning your question on how to protect your source code. The best solution should be Zendguard. For more information on how to protect your code, read this: https://code.google.com/p/phpdesktop/wiki/KnowledgeBase#HowdoIprotectPHPsourcesin"www"directory?

As for synchronizing the desktop, think of using CURL combined with some ajax or Node.JS modules.

Caleb Sands Since Jun 13, 2015 2 Posts

zooboole,

Yes, it was in my installation folder and it is also in my project as well.

Thanks, Caleb