18

In my application i have to deploy my application on client system. So is there any way to run my php application without installing xampp...

Because the client should access it as a readymade app without installing anything...

This is the description of my project...

We have to develop an application where the client will have our application he will connect to remote server

Then he will download the data from remote server...

Then he uses that downloaded data using that app

Here my requirement is the user may not have the knowledge of installing the xampp...

So is there any way to run the application in user system just by copying some files

U may suggest me a one click solution (like using installer which will include installation of xampp and copying my data into user system)

5
  • If the client system doesn't have PHP installed, you're pretty much f***ed... so you're going to have to install something Commented Sep 27, 2013 at 11:36
  • You must have a server environment to run your php code.. That's not a "maybe", it's a MUST have. Unless you put your php script online. Commented Sep 27, 2013 at 11:37
  • If you want to do standalone desktop apps, php is not your best bet, would be a lot easier in another language, say java (or .net for windows) Commented Sep 27, 2013 at 11:40
  • what you mean by client system? Only your server needs to be having PHP and web server installed. client access it using a browser.if you mean without server, it is like asking How can i run my word processor without installing an OS Commented Sep 27, 2013 at 12:00
  • Client means the user here... the User should use my app... Commented Sep 27, 2013 at 12:26

11 Answers 11

26

I really dont want to use any external software to render no database PHP pages so I did some digging and found that if you run php -S localhost:port in your working directory you basically start a server there.

S is a capital S and not s

Sign up to request clarification or add additional context in comments.

3 Comments

This should be the accepted answer now, much faster and simpler than anything else
Yes, this is the best way, but remember that the php built-in server not understand .htaccess
In order to configure this server, check the official documentation and especially its comments.
4

I'm a big fan of server2go. I've used it to deploy PHP applications on CD/DVD. It comes with MySQL and is relatively easy to configure. I've even replaced their splash screen with my own so no one knows I'm using it. It's donationware, but I was impressed enough to donate:

server2go-web

With this application, you don't have to install all that other stuff. It's self-contained in this executable and directory.

EDIT: To clarify, server2go does not install anything on the client machine. It runs as an exe only when you specifically want it to. When you click on the .exe file, it launches your PHP application in a browser window, then you can right-click on the server2go icon in the system tray and close it when you're done.

EDIT2: One gotcha: if you want to save data to the MySQL db on the client machine, you'll need to copy serve2go to a directory on the client machine or run it on a writable USB stick. If you run this application off CD/DVD, it will be able to read data from the database, but not write.

1 Comment

Yeah here i will give my application to user. so that we will run my application on his localhost...I need to create environment like xampp installed environment so client can run my app...
4

The better way is to use PHP Desktop Application. It will allow you to run your PHP Script like a Desktop application and you don't need to install Xampp or any other web server to run.

PHP Desktop Application

After downloading the .Zip file unzips it to any folder that you like. After unzipping, Go to the folder, and there you can see a folder "www". Delete all the files contained in it and move all your php script to it.

Once you moved all your files into it. Run the .Exe file named "PHP desktop-chrome"

It will open your PHP Script really like a Desktop Application.

This script doesn't require any kind of server software like Xampp, Wamp, Etc installed in your PC.

Comments

2

You can either host the php application or install the application into one system as server and call in client system using the ip of the server system like the following

http://**ip address/php file name 

Comments

2

Without Xampp we can use PHP in local system using below steps.

  1. Download PHP Zip package from php official website.
  2. Create php directory in c:\ drive and unzip PHP zip package there.
  3. Add C:\php to the PATH environment variable a) Press window key and search for Environment b) Go in Advance tab, and click on Environment variables button. c) In user variables select path and click on edit button d) Now click on New button and add path (C:\php) then save it.
  4. PHP’s configuration file is php.ini, this doesn’t exist initially, so copy C:\php\php.ini-development to C:\php\php.ini
  5. Create php project in local machine (any directory)
  6. Run php -S localhost:8000 command

Comments

0

If you don't want your client to install anything then you should create Client Server architecture, there is no another way.

Comments

0

PHP Application are not meant to be deployed on multiple clients. It's meant to be deployed on a webserver (your own server with sth. like IIS or XAMPP) so the clients can access it via their browser and doesn't have to install anything more.

If you want to deploy applications on the client pc's i recommened an other programming language like Java or C/C++.

7 Comments

Yeah but my requirement is the user use our application to download data from remote server and uses the data in localhost..
What do you mean with uses the data in localhost. Is there another application installed on localhost where the users needs the data for?
no my application it self can make use of the remote data...only i need to create an environment similar to xampp installed environment..
Then why not host your application on your server too and keep the data on your server? I think i don't understand your question completly/right. Why does the client need the data @localhost, if he needs the data for your application, which is a PHP application, which can be easily hosted on a server.
My application is i developed one application which download data from remote server..every user will download his individual data he makes use of that data in his localhost eventough he dont have internet..after the processing of that data he uploads his data agian to remote server..
|
0

I simply used xampp zip version so i copied my application into htdocs and the whole xampp is given to the customer so he simply running the application eazily without installation.

Comments

0

Make sure you have installed php from https://www.php.net/downloads.php. Once installed add it to path. Lastly type php -S localhost:8000

Comments

0

PHP needs to be installed on the machine it is running at in order to make sure it works. Since the app may grow and may require extension installing, PHP upgrading over time, hosting this on a client machine is not a very easy task in terms of management. You may want to host your project on a server and write a small bash script sending requests to the API.

If, for some reason you cannot host this on a server where your clients would send requests via the bash scripts, then you may want to install only PHP. If it does not need to listen to HTTP requests, then you do not need a server, you can just implement the PHP application and create a bash script so the user will be able to run it from the UI of their operating system.

Comments

-1

No, you need some kind of server - Wamp, Xampp, etc.

You can host it online, and then he can just browse it from his PC.

2 Comments

Yeah but my requirement is the user use our application to download data from remote server and uses the data in localhost..
Yeah we need some server environment.. can we install xampp and deploy my application into htdocs with single click

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.