Hi, welcome to this special tutorial. In here, I will be showing you how you can create a web-based desktop application using PHP, CSS, HTML, and JavaScript with the help of PHP Desktop. In fact, PHP Desktop is an easy and simple solution we can use to create a very powerful and complex desktop application.
What is PHP Desktop?
According to the official definition,
PHP Desktop is an open-source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop GUI applications using web technologies such as PHP, HTML5, JavaScript and SQLite.
- Source : Official Page of PHP Desktop
Mind you, the development workflow you are used to while creating web applications remains the same. The step of turning an existing website into a desktop application is basically a matter of copy and paste.
PHPDesktop is an all-made container that will just swallow your project. With that, you can easily transform an existing website into a desktop application without any modification. When you download PHP Desktop, you will have some set of files and folders; among them, you will have a folder called www
in which you will just paste your entire application.
For those who have used WampServer, Xamp or EasyPhp, it won't be a problem to understand the concept. When you are using these local servers, you usually create your projects into a particular folder called www, htdocs, or localweb
. It differs from one server to another, but the concept remains the same. That particular folder helps your webserver to know where to run your application (website) from.
PHP Desktop works the same way. The difference is that PHP Desktop does not require any particular installation; it is an all-in-one portable set of all these local servers have and it does all you can do with WampServer or Xamp and others in the same family.
PHP Desktop comes with a .exe
file. Whenever you run that .exe
, it will go into the www
folder and run your index file. I am going to explain this process later in this tutorial.
A bit of story
Back in 2005, I remember once I was called for a store management application. The principle was simple, the manager should be able to add records of new stock and all sales. In the end, the owner should be able to have a clean report of each day and if possible he can select a date or a period.
I told the client I could do it but it will be web-based, so it will be using their browser to work. Even though I knew they don't understand what difference that makes it was necessary for me to try to make it clear for them. Fortunately, the client accepted it that way.
I made the application using EasyPhp. So to run the application, I had to install EasyPhp on the client's PC. You may tell me oh yeah there is no problem in that
. Indeed, it seems like there is no problem, but such system/methodologies encounter a lot of problems such as:
- EasyPhp must be ON before the application runs otherwise they will receive a 404 error.
- I had to install the entire EasyPhp with all its modules while I needed just a few.
- Whenever EasyPhp refuses to start, they have to call me
- If somebody mistakenly uninstalls EasyPhp thinking it is a strange software, the entire application goes with all the records. Pffff.
- My database could easily be accessed.
- My application could be hacked by anyone using my URLs because they were visible.
- If they needed the same application in another store, I would have had to make the same process in that store by myself because they cannot install it themselves.
- Etc.
Definitely, it wasn't the perfect solution. Even though I did not have any problem, I cannot consider it as a good solution. I was just lucky. After that I had two others I did in the same way but I was never satisfied with my work until I have come to meet PHP Desktop.
I think you can understand the real problem we can face when it comes to desktop applications with PHP. I knew they must be a way; otherwise, my skills in PHP would have been used only for websites.
PHP Desktop comes to reduce (if not to solve) all these problems and gives a new horizon of software development experience:
- There is no need again to embed all modules for nothing, only required ones.
- No need to install any web server before, everything is embedded
- No need to worry about browser compatibility because PHP Desktop comes with an embedded browser
- The browser is very light and does not have all boring tools such as address bar, favorites bar, history bar, etc. After all, we will not need them.
- You can make the entire application a
.exe
file and send it to your clients so that they can install it themselves - PHP Desktop can also act as a packager for pure HTML5/JS applications
- No memory leaks
- You can use it for Perl, Ruby, and Python
- Etc.
Not wonderful ?!
What do we want?
Basically any PHP programmer would have liked to create any desktop application. Create an executable (.exe
) application that he can easily share or sent to his client(s). Any client can simply install the application following an installation wizard without any struggle or any need of the programmer.
Unfortunately, if you are really into PHP programming you should know by now that isn't actually possible. Since PHP is an interpreted programming language you can't compile your project files into a single executable (.exe
) file, and that's where the big problem is.
Most programming languages that are specialized in desktop application like Java have some libraries that provide then some set of elements (button, menus, color, shapes, etc.) to help create a software interface. Actually PHP doesn't have such thing, PHP is fully a scripting language. People have tried to create some extensions ( like PHP-GTK ) to provide such ability to the language, but still the problem is remains not totally solved.
Furthermore, PHP can be combined with HTML and JavaScript. And we know HTML tags can be styled with CSS... getting better. We can't imagine the limits of CSS in terms of designing. So, that's where PHP Desktop takes its power from.
How does it work?
PHP Desktop takes advantage of most web technologies to help PHP achieve our goal. PHP Desktop itself is a software that can embed yours in itself. So when you install PHP Desktop, you will now put your own application in PHP Desktop's folders. When you launch PHP Desktop it will go and read/parse your application therefor display/run it.
PHP Desktop Embeds all services your application may need before running. The main elements are the web server (Mongoose), the PHP Server, and a database Engine (Sqlite). To provide universal interfacing it embeds a browser (actually Chrome or Internet Explorer). The browser now can help us interpret JavaScript, HTML, and CSS.
So there is no need to install any other server or parser before using it.
Create your very first desktop application with PHP
It is very simple to create a desktop application with PHP.
- Download PHP Desktop (with Chrome or Internet Explorer)
- Create a new folder and name it
MyApp
- Unzip the content of PHP Desktop Inside
You should have something like this in your folder MyApp
:
I downloaded the one embedding Chome. No matter the one you have downloaded, what matters the most is the highlighted file, it is an executable (.exe
) file.
- Double click on that file to run it
You should get something like this:
- What happened?
PHP Desktop is very smart. When you clicked on the launcher, it went in a special folder to look for any available application, and this special folder is nothing than the www
folder. Go ahead and open the www
folder you should see something like this:
Surprised!, these files are what PHP Desktop listed when we clicked on the launcher.
Note: These files are .php files.
Click on any of them. You should see its content.
These files are sample file to help you know that PHP Desktop can do everything these files are doing. Among them, you have functionalities like cookies, environment variables, forms, iframes, javascript, etc. That means your PHP application can do almost everything.
- Why two windows prompted and what are they for?
By default, PHP Desktop prompts up two windows. The first one (bigger) is chrome/explorer. This is where your application will reside. Users will interact with it through that window. You will be able to change it if you like.
The second window (small and black console) is the debugging interface (log console). It helps you see if any error occurred while running your application, very useful in development phase.
- Another thing to notice
You should know that in production we won't need that black console, and we may also need to resize the main window, etc; these are settings.
PHP Desktop comes with a special file called settings.json
. This file will help us configure some behaviors of PHP Desktop.
So, for example if we don't want PHP Desktop to prompt the log console, we can open the settings.json
file with any text editor and locate this:
"debugging": {
"show_console": true,
"subprocess_show_console": false,
"log_level": "DEBUG4",
"log_file": "debug.log"
}
Then change the value of show_console
into false like that:
"debugging": {
"show_console": false,
"subprocess_show_console": false,
"log_level": "DEBUG4",
"log_file": "debug.log"
}
Then run PHP Desktop again. pfff gone!
- Now, let's us add our own application
Go in the www
folder in your MyApp
folder and delete all files inside.
Create a simple file and name it index.php
with the following content:
<html>
<head>
<title>MyApp</title>
</head>
<body>
<h1>PHP Desktop is awesome</h1>
<div style="background-color:blue; color:white; padding:2em; font-size:3em">
<?= "And PHP agrees!" ?>
</div>
</body>
</html>
now move your index.php
file in the www
(if you didn't create it inside www
) folder and launch PHP Desktop.
You should get something like this:
You can see that PHP Desktop has recognized your index.php
as the first file to launch. That's the job of the Mongoose server (the embedded webserver). Plus, Our HTML and CSS codes were parsed, and the PHP code too was interpreted. So you are good to go, try it with other codes.
Note: Look at Mongoose as Apache Server
Note: Our title in title tag doesn't show. The title of our application window should be set in the settings.json in the following object:
"main_window": {
"title": "PHP Desktop Chrome",
"icon": "",
"default_size": [1024, 768],
"minimum_size": [800, 600],
"maximum_size": [0, 0],
"disable_maximize_button": false,
"center_on_screen": true,
"start_maximized": false,
"start_fullscreen": false
}
You can see this object can help you influence the application's window.
So, What now?
Yes, you have your application ready? you can just take your folder MyApp
drop it anywhere in your computer. Anytime you want to start it just click on the launcher, or create a shortcut to it.
Bahh, that's not what we said we wanted. We need one executable file that we can send to the client then he can install the application himself.
Yes, of course. I was forgetting it lol.
In order to do that we will need another special and little software called Inno Steup.
What does that one do again?!
We will simply ask Inno Setup take the content of our folder MyApp
and transform it into a self-installing package. And at the end, we will have a simple setup.exe
file that can be sent to our client for installation.
In order to do that, follow the steps bellow:
-
Install it
If something like this shows up, choose "Create a new empty script file"
-
now go to
File > New
This wizard will appear:
Do not check the "Create a new empty script file"
-
Click on
Next
This wizard will appear:
Here we need to make some settings for your application:
Application name:
MyApp
Application version:
0.0.1
Application publisher:
iT Tutors Age Ltd
(Your company or your name)Application website:
www.phpocean.com(now lancecourse.com)
(Or your website) -
Now click on
Next
againThis wizard will appear:
Here we need to precise the name of the folder that will contain our application once installed in the user's computer. When you install an application, it usually goes in the
C:\Program Files
orC:\Program Files (x86)
. So we will keep the Application destination folder by default.Now let's change Application folder name into
MyApp
-
Click on
Next
This wizard will appear:
Here is where serious things happen. First Application main executable name. On the wizard, we have
MyProg.exe
(The encircled area). This is a default testing file from Inno Setup. We need to change it otherwise when we launch our application it will go and launch Inno Setup's test application.So click on
Browse
, browse your folder to ourMyApp
folder, and double click onphpdesktop-chrome.exe
.Next is the small white area with the label Other application files. This part too is very important and very delicate to manage. First, it means:
If you have other files that make up your application apart from the executable file added on top, add all of them here.
So normally you have to bring all files in the
MyApp
folder in here except thephpdesktop-chrome.exe
file one by one What is something hard and slow.I personally usually go in my folder and highlight all files, except the
phpdesktop-chrome.exe
then drag all and drop it in the small area. Simple and fast.So in the end, you should have something like this:
-
Then click
Next
againThis wizard will appear:
this one is self-explanatory. It is the name on which you will click to launch the application after you've clicked on windows
start
menu. There are other options you can activate too. -
Click
Next
againThis wizard will appear:
These are your application's documentation files: The license file, the instructions file before installation and the instruction file at the end of the installation.
While this is not a must but if you want a serious software you can add it. To create three different text files(
license.txt
,before-install.txt
, andend-install.txt
) somewhere in your computer. Then browse each one and add them to the respective fields.Whatever content you put in each, the user will see it while installing your software - try it and see.
-
Then click on
next
This wizard will appear:
These are the languages you offer your clients for the installation wizard of your software. So, when they're about to install it, they can choose the language the installation wizard should show instructions.
You can choose French and English or more.
-
Click on
Next
againThis wizard will appear:
The Custom compiler output folder is where you want Inno Setup to place your finale Executable file at the end for you. So Browse it and choose a folder in your computer (I chose my desktop folder).
The Compiler output base file name is the name you want your finale executable to have. You can keep the
setup
or change it intoMyAppSetup
like me.The Custom Setup icon is the icon for your executable file. The file has to be a
.ico
file. For now, just leave it.And leave the password field too then
click on next
thennext again
thenfinish
After that Inno Setup will prompt this:
Just click Yes
It will ask you again if you want to save the generated code somewhere for further use. Say Yes
if you want to keep it, choose where to save it on your computer and save. If you don't want, just click on no
.
Then Inno Setup will start compiling our files into an executable file.
Make sure you close PHP Desktop before getting here otherwise it will prompt an error that the elements are being used somewhere else.
If everything happens fine, you should get something like this:
Now go in the folder where you asked Inno Setup to save your executable file. In my case, I chose my desktop.
So, this is what I got there:
I have my executable file called MyAppSetup
and when I hover my mouse on it I have this:
All details are considered. Cool!
To install it just double click it and follow the instructions of the install wizard.
Samples [EDIT]
People asked me to provide them some sample of application done with PHP Desktop for real use case. Download a sample of an executable file here[38.9 MB].
Once installed to access the application use: Username: admin - password: admin
Bellow is some screenshot of applications I did:
Conclusion
Hope you enjoyed this long tutorial. I did not want to miss something because it is something very tricky. But, still, they may be something you couldn't get well. just ask it down here in the comments section.
This tutorial is a very simple one in this process. They are many things you need to consider when using PHP Desktop, like the window settings, environment settings, Usage of frameworks, accessing the computer files and hardware, etc.
We'll try our best to make another tutorial that shows you how you can actually create a full software with PHP Desktop considering some advanced aspects of it.
So, do not hesitate to sign up and subscribe to our newsletters to get our news.
Thanks for following.
Last updated 2024-01-11 UTC
138 Comments
Sign in to join the discussion

In which folder did you install the app?
In the tutorial I did not explain how to grand the admin right to your application.
You grant all rights to your application folder, and launch it again. You can also add it to your PATH.

But inside program files i am not getting any option to grand rights.
Thanks.

###How to take ownership of a folder###
You must have ownership of a protected folder in order to access it. If another user has restricted access and you are the computer administrator, you can access the folder by taking ownership.
To take ownership of a folder, follow these steps:
1. Right-click the folder that you want to take ownership of, and then
click **Properties**.
2. Click the **Security** tab, and then click **OK** on the Security message
(if one appears).
3. Click **Advanced**, and then click the **Owner** tab.
4. In the **Name** list, click your ***user name***, or click **Administrator** if
you are logged in as **Administrator**, or click the **Administrators**
group. If you want to take ownership of the contents of the folder,
select the **Replace owner on subcontainers and objects** check box.
5. Click **OK**, and then click **Yes** when you receive the following message:
> You do not have permission to read the contents of directory folder
> name. Do you want to replace the directory permissions with
> permissions granting you Full Control?
All permissions will be replaced if you click **Yes**.
**Note** folder name is the name of the folder that you want to take ownership of.
6. Click **OK**, and then reapply the permissions and security settings
that you want for the folder and its contents.
Source: [Microsoft Support](http://support.microsoft.com/kb/308421)

Please help me

i downloaded the sample project \' **hpm setup** \'as per your last comment.i installed the setup but the application is not starting.Any help?
i am running windows xp SP3.
Thankyou.



Thanks

here is the fix i found: instead of drag and drop files to Innosetup, click \'Add folder\' option and select root folder ( i.e, our MyApp folder itself - also confirm the dialog for including sub folders ).
drap and drop ( i.e, selecting folders and files inside MyApp folder ) is the trouble maker. while we install our .exe application, folder structure inside the MyApp is lost compared to our original version.
I would like to checkout your sample project hpm. let us know once you fix the setup file and update the link :)


i downloaded the new setup but on extracting,it gives an error about the file format damage.Can you please reupload the file and check the same?

Thanks

\"Error 500: Internal Server Error
Cannot spawn CGI process [C:\\Program Files\\hpm\\app/index.php]: No such device or address\".
Any help?

in path on Windows, So I suggest you try installing it in a different folder that doesn\'t have spaces in its name.


But, I suggest use use the Licensing system to limit users.

just asking is the application created with php desktop stable !! or will it crash and can it work with the Connectivety to the remote Server !!

Concerning the power of the application, there is no real limitation. I can say your only limit is the limit of your imagination.
With PHP Desktop, you have the possibility of combining PHP, Javascript, HTML5, CSS3, etc. Which is almost impossible to have a limitation in what you can create.

with it !! HELP please !!
I use to use the mysql before !!
Does it have some thing like !! it !! inbuilt with the php desktop



The tutorial should be available by next week.

but when creating exe file and install it. appear error when running app \"phpdesktop has stopped working\" can u help me to fix it ?

Also, if you could let me see what settings you have in your `settings.json`, that could help if it\'s a configuration issue.
Thanks.

[1]: http://
I have followed the above steps and after installing I cannot open my app from the shortcut icon created after installing the setup file. I checked the files and folders inside the program file and found out that all the folders (PHP, www, locales) are removed and all the files under those folders are moved to root dir... i.e C:\\Program Files\\MyApp\\ as show in the picture.
Can you please lend me your helping hand. I will be very grateful.


I have a big project to be developed as standalone software and I guess this is the best the best solution for a PHP developer Like me.


The framework is called `pinkPHP` It\'s a little *home-made* framework I developed for small projects. It helps me go faster.


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

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/][1]
[1]: https://www.mysql.com/oem/

eg: AllowOverride None to AllowOverride All
If you can help me apply this changes

Your response will be highly appreciated.

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][1]
Hope that helps, and i apologize for the delay of my answer.
Thanks
[1]: https://code.google.com/p/phpdesktop/wiki/Settings#web_server

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

Aside that I would advise you to <a href=https://code.google.com/p/phpdesktop/wiki/DownloadChrome target=_blank>download a new copy of php desktop</a> since the error seems to come from libcef.dll which is a windows DLL altogether.

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


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


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
1. After compiling with Inno Compiler, the sample application you gave above did not display. I just don\'t know why
2. With Inno Compiler, how do I protect the source code? I noticed the index.php in C:\\Program Files\\myApp
3. 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

Now concerning your question on how to protect your source code. The best solution should be <a target=_blank href=http://files.zend.com/help/Zend-Guard/zend-guard.htm>Zendguard</a>. For more information on how to protect your code, read this: <a target=_blank href=https://code.google.com/p/phpdesktop/wiki/KnowledgeBase#How_do_I_protect_PHP_sources_in_www_directory?>https://code.google.com/p/phpdesktop/wiki/KnowledgeBase#How_do_I_protect_PHP_sources_in_\"www\"_directory?</a>
As for synchronizing the desktop, think of using CURL combined with some ajax or Node.JS modules.

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

I get the following error message each time I click on phpdesktop-chrome
*There is no disk in the drive. Please insert a disk into drive \\Device\\Harddisk1\\DR1.
Options: Cancel, Try Again, Continue*
What I wanted is for the program to display the content of the index.php file in the www folder. If I click on Continue, the content \"Hello World\" displays fine. I initially thought that would not be a problem. I went on with the tutorial to compile the app with the Inno Setup Compiler but the end result wouldnt execute. The error message has been phpdesktop-chrome has stopped working. I need you to point me in the right direction please. Thank you.


<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title>Untitled Document</title>
</head>
<body>
<?php
echo \"<h1>HELLO WORLD</h1>\";
?>
</body>
</html>

Look, make it simple go and download a new copy of php desktop here: [https://code.google.com/p/phpdesktop/wiki/DownloadChrome][1] then remove all files from the `www` folder and place in it your own `index.php`.
Before you compile it with `Inno Setup` launch php desktop to make sure it works independently. That should do it
[1]: https://code.google.com/p/phpdesktop/wiki/DownloadChrome

Clicking any of the option, makes the application to work fine.
I went ahead to compile using Inno Setup but the error message I get after running the application has been \"PHP Desktop Chrome has stopped working\".

[1]: https://support.microsoft.com/en-us/kb/330137

[1]: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/phpdesktop/FzWjpFHJSJ0/_Hrzmyu-W5sJ

\"Error while opening the settings file, Application will terminate immediately\"
I followed your advice and still unable to get it working


<?php
$myDate = date( \"Y/m/d\", time() );


I\'m using CS6.

You can do it this way:
$dir = \'sqlite:/[YOUR-PATH]/combadd.sqlite\';
$dbh = new PDO($dir) or die(\"cannot open the database\");
$query = \"SELECT * FROM combo_calcs WHERE options=\'easy\'\";
foreach ($dbh->query($query) as $row)
{
echo $row[0];
}
Source: <a href=\"http://stackoverflow.com/questions/16728265/how-do-i-connect-to-an-sqlite-database-with-php\" target=\"_blank\">http://stackoverflow.com/questions/16728265/how-do-i-connect-to-an-sqlite-database-with-php</a>
And the method I use is this:
// Create (connect to) SQLite database in file
$file_db = new PDO(\'sqlite:messaging.sqlite3\');
// Set errormode to exceptions
$file_db->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
// Create new database in memory
$memory_db = new PDO(\'sqlite::memory:\');
// Set errormode to exceptions
$memory_db->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION);
Source: <a href=\"http://www.if-not-true-then-false.com/2012/php-pdo-sqlite3-example/\">http://www.if-not-true-then-false.com/2012/php-pdo-sqlite3-example/</a>

One thing to ask here, all of our php files will be exposed in the Program Folder and no security, right?


I have completed all the steps but after intalling that .exe file i am getting an error as
PHP Desktop Chrome has stopped working
Windows can check online for a solution to the problem.
Just help me out to solve it.



If you would like to change the icon that is embedded in the executable file then do the following steps:
1- Download [Resource Hacker](http://www.angusj.com/resourcehacker/) and run it.
2- From the "File" menu select open, navigate and choose "phpdesktop-msie.exe" (or "phpdesktop-chrome.exe").
3- On the left side there should be a tree control, expand "/Icon Group/128/1033", right click on the "1033", select "Replace Resource..." and replace that resource with your icon.
4- That's it, save it and see the changes by running the executable file.
When you change icon embedded in the executable file you do not need to set it anymore in the settings file.
source: [https://code.google.com/p/phpdesktop/wiki/Settings#main_window](https://code.google.com/p/phpdesktop/wiki/Settings#main_window)

I am shahzad ahmed from india.
I face some problem when i develop the php desktop application i follow same procedure according to your tutorial but still it is not working the problem is after develop the app when i launch the Php desktop launcher it is not showing my develop app and when i saw my develop app folder it is not showing the php folder and my application folder and a lot of file showing into the project.
Sir please help me regarding this problem.as soon as possiable.
Thanks


I just want to know how to create tables in the db that we are using in your hrm desktop app? Also a quick note will be very helpful about how to use and maintain my db like is there something like sqlyog that we use for mysql for this.
Thanks in advance
Sachin Bhardwaj

can you tell me more about the database that we use in this like is there anything like sqlyog for it. Or how to make tables in sqlLite(i have never worked with it before).
Thanks in advance


I am developing the Desktop Application and I Want to Update The Server Data When I Connected to the Internet. I Want Update Data Without Web Services.
Please Tell Me any Software is Available For this Or Any Other Technique for this.
Thanks
Shahjad Ahmed

Hope that helps.

i've followed your tutorial line by line. and after when i install the .exe file i've created. i cannot launch the application, even from the folder in program files or the desktop shortcut icon i cannot. any suggestions?





How to resolve this issue ??


**@wisdom isioma**, please try to doanload the `hpm` app I added to the tutorial. It does this already for you.

I created an application using AJAX but keep getting a request status of 0, thus my script does not work in php desktop. I have tested the exact script in IE, Chrome, Firefox and it works perfectly fine.
I did research and found something about CORS - because if I understand well php desktop uses a random port each time (?). Tried using a static port but I think there's more to it than that. Pls let me know if this is a common issue and how to workaround it
Sincerely frustrated.

"web_server": {
"listen_on": ["127.0.0.1", 7000],
"www_directory": "www",
"index_files": ["index.html", "index.php"],
"cgi_interpreter": "php/php-cgi.exe",
"cgi_extensions": ["php"],
"cgi_temp_dir": "",
"404_handler": "/pretty-urls.php"
},
So just replace the `7000` with the port of your choice.


Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 Server at 10.3.9.41 Port 80
Por eso no logro entrar a la pgina principal del phpDesktop.
I have not managed to solve it ... Thanks

@Isaac Hacker, sometimes too you have to call the full path like `http://127.0.0.1:7000/index.php`. Try that and see.

- Download a new copy of php desktop
- Place it a folder like, `Documents` or your `Desktop`
- Make sure you have administrative right on the folder, otherwise get
them
- An try again

Actually I was supposed to write another tutorial where I will give more details on how to proceed, but the issue is that I am presently working on a linux operating system on which it's not possible to do windows development.
So, please bear with me, very soon I will find another PC for that matter and we will work things out. For now, you can all try to [download the sample application](http://phpocean.com/assets/hpm_setup.zip) I gave you, open it and check how I coded it, and if you have any question on the code just ask it here.

Thank you.

any help please




"Error 404: Not Found
File not found" Message when i try to Zend module. So how can i debug actual cause of error. Looking to debug log i get
"13:56:32.032 DEBUG: OnLoadingStateChange: loading=0, url=http://127.0.0.1:53856/public/album
- 13:56:44.766 DEBUG: WM_DESTROY
- 13:56:44.766 DEBUG: RemoveBrowserWindow(): hwnd = 985192
- 13:56:44.766 INFO: Stopping Mongoose web server
- 13:56:44.766 DEBUG: Mongoose webserver stopped immediately
- 13:56:44.766 DEBUG: RemoveBrowserWindow(): hwnd = 1902702
- 13:56:44.766 DEBUG: GetBrowserWindow(): not found, hwnd = 1902702
- 13:56:44.766 WARNING: RemoveBrowserWindow() failed: GetBrowserWindow() failed"
Above error log. So How can i get actual php error.



Now my database is created and application is working fine.




Thank you.






Thank you.

I have done everything as you said step by step.
I have downloaded php desktop chrome version.
It is working when I click on "phpdesktop-chrome.exe"
Later I converted to single executable file using inno set up with the same www files with out changing once and 2nd time only with index.php in the www folder.
I have dragged once and loaded one by one in the another trail. I copied all the files and folders to the "other application files" Section.
But after converting it to single exe file app by using Inno Set UP, I am getting the following error
"php desktop chrome has stopped working"
But it is working fine with out inno set up.
I had closed php desktop while converting.
Can you give me a solution for this.
Thank you,
Chalam

I am attaching the screenshot of the error here.
![Php Desktop App Error][1]
[1]: http://
Thank you,
Simha.

here is the screenshot of the error.
unfortunately my attachments are not seen here.
![enter image description here][1]
[1]: http://

Hi,
I followed Rinas Muhammed's instructions at page 1.
my problem is solved. it is working for me now.
I am pasting it here for your reference
-------------------------------------------------
@zooboole here is the fix i found: instead of drag and drop files to Innosetup, click 'Add folder' option and select root folder ( i.e, our MyApp folder itself - also confirm the dialog for including sub folders ).
drap and drop ( i.e, selecting folders and files inside MyApp folder ) is the trouble maker. while we install our .exe application, folder structure inside the MyApp is lost compared to our original version.
I would like to checkout your sample project hpm. let us know once you fix the setup file and update the link :)

Can I create desktop application for Mac OS using the PHP Desktop..?
Please suggest.
Thank you,
Simha.







Thanks for this nice tutorial. There is a problem, i had created an application with your guideline, creation of setup.exe and install that setup successfully. But when i open the application it **doesn't open**. and there is **not even any error message coming** . by both the process i run that application (Run as Administrator As well as double click) Please help me!!





I unzip the phpdesktop to a folder on my desktop, the php explorer .exe file works files but after creating setup and install it am getting this error. I added the index.php, licence, setting.json, debbug and the folder php and www that are part of the application, still am getting error. As a matter of urgency, l have a conference on Friday and l need to collect people's info. Kindly help me out of this mess.
Thanks



I have been create and installed my PHP project as per above instruction..
After installed then click to open in a desktop icon, i'm getting following error
" PHP Desktop Chrome has stopped working
windows can check online for a solution to the program
--> click online for solution and close the program
--> close the program
"
Please guide me!..
I have completed the given above all the instructions but while i'm getting these like error, i could not able open my PHP project..
Pls guide me anyone!..

I have been create and installed my PHP project as per above instruction..
After installed then click to open in a desktop icon, i'm getting following error
" PHP Desktop Chrome has stopped working
windows can check online for a solution to the program
--> click online for solution and close the program
--> close the program
"
Please guide me!..
I have completed the given above all the instructions but while i'm getting these like error, i could not able open my PHP project..
Pls guide me anyone!..

i have tried all step but now i get error..
There is libcef.dll file is missing..
i have download libcef.dll file but it also show message libcef.dll file is missing..



Thank you for this nice tutorial, i'm having one problem after installing the software in a desktop shortcut icon file.
when i was click the desktop icon file the given below error will come,
" PHP Desktop Chrome has stopped working"
" Windows can check online for a solution to the problem."
--> Check online for a solution and close the program.
i couldn't able access my projects..
Please guide me asap...

Thank you for this nice tutorial, i'm having one problem after installing the software in a desktop shortcut icon file.
when i was click the desktop icon file the given below error will come,
" PHP Desktop Chrome has stopped working"
" Windows can check online for a solution to the problem."
--> Check online for a solution and close the program.
i couldn't able access my projects..
I followed given below link guide completely
http://phpocean.com/tutorials/back-end/create-your-first-desktop-application-with-php-and-php-desktop/4
Still i'm getting error.
Can i install any other VB or .NET package files?
or
any other support files?
Please guide me asap...


or
any other .NET related files!

may i know which version i will download now, could you possible to give exact URL and version name?

waiting for YOur reply.Thanks in advance.


I want help
I create php desktop application but i didn't understand how to connect database
plz tell me and replay this comment.
Regards
Sandeep

very good tutorial but there is a small problem.i created the setup file using inno setup compiler and insatalled the Myapp as per your guide above but on launching it, i am getting the following error.
\"Error while opening the settings file,
Application will terminate immediately\"
Any Help?