Reputation: 18798
What is the best way to build a non web browser stand alone php app that works with some sort of database without requiring the user to install a database server. Or am i just asking too much?
Upvotes: 5
Views: 13474
Reputation: 1
Checkout phpdesktop that gives you:
Upvotes: 0
Reputation: 2474
I dont know how to use PHP as standalone programming language, I mean without using a web server and a browser.i can answer your other question.
SQLite is a database system(to be more specific: a library!) which provides you all the basic capabilities of SQL database without needing to install any specific database servers.But you do need to copy a small .dll file(sqlite3.dll i suppose) into your working dirctory.The file is only a very small one,but you get all of the basic capabilities of a database such as INSERT DELETE UPDATE SELECT etc..Its a great light weight database..i mean it..really lightweight.
also PHP has inbuilt support for SQLite database.so compatibility will never be a problem
Have a look at their home page https://sqlite.org/
This is what they describe themselves:SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world.
Upvotes: 0
Reputation: 11
As Oakcool has mentioned, check out PHP-GTK. It is a GUI development tool on the similar lines of MFC for C/C++.
PHP-GTK alongwith SQLite or a text file as others mentioned above should do the trick.
Upvotes: 1
Reputation: 9157
Have a look at php compilers, you'll end up with a binary for people to run. It could be a desktop GUI application, or a "web server in a box" type of thing.
Upvotes: 2
Reputation: 774
Here is an idea: information can be stored in XML and thus usage of database can be avoided. That will work only for certain kind of purposes of course.
Upvotes: 1
Reputation: 3948
I'd suggest you try miniPHP. It is basically an IDE around Winbinder; it lets you concentrate on writing PHP while it takes care of details like compiling the application. You can create either GUI or command-line apps and it works just fine with both SQLite and MySQL. It has a preview mode and some debugging capabilities too.
Upvotes: 1
Reputation: 150759
I don't have any experience with it but there's a portable version of XAMPP.
You wouldn't necessarily have to use the Apache portion. The app could just run from the command-line, depending on what you're trying to do.
Upvotes: 0
Reputation: 2822
If you're targeting Windows, try WinBinder. It allows you to develop native Windows applications using PHP.
It also supports SQLite, so you don't need a database server.
Upvotes: 10
Reputation: 1496
Take a look at this 3 links
PHP GTKenter code here
http://gtk.php.net/
FLEX http://www.adobe.com/products/flex/?promoid=BPDEQ
AIR http://www.adobe.com/products/air/
I think any those will help you, check it out.
Upvotes: 0
Reputation: 6152
Embed the SQLite database in your app, then configure PHP to talk to the SQLite database:
Upvotes: 5