Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run an php application without installing xampp on client system?

Tags:

php

xampp

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)

like image 416
Pavan Kumar Avatar asked Sep 27 '13 11:09

Pavan Kumar


People also ask

Can we run PHP file without XAMPP?

To run PHP for the web, you need to install a Web Server like Apache and you also need a database server like MySQL. There are various web servers for running PHP programs like WAMP & XAMPP. WAMP server is supported in windows and XAMP is supported in both Windows and Linux.

How run PHP code without any server?

Command line scripting. You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows).


2 Answers

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

like image 181
Rishav Avatar answered Sep 19 '22 11:09

Rishav


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.

like image 32
ideonexus Avatar answered Sep 17 '22 11:09

ideonexus