13

I am a web designer and a PHP developer.

I have created some websites in PHP and deployed them to web servers from different vendors like GoDaddy, Yahoo, MediaTemple, etc.

But now, I am going to create an application that will be run on a LAN, so that from every computer on that LAN, the application can be available.

For development and testing, I use EasyPHP!

So my question is: should I use EasyPHP to install the application on my client's LAN server? If not, do you know any web tutorials which teach me how to deploy PHP web application on a LAN..?

can we create a separate windows installer in .net which install apache, PHP, MySQL as well as my application on PC ??

JV Lobo
  • 5,526
  • 8
  • 34
  • 55
  • 1
    if you have the web server installed on a Machine connected to a LAN, your development pc can act as the server over LAN. but make sure to enables settings that will allow this. Please look into relevant documentation of your server. – Shamim Hafiz - MSFT Aug 27 '11 at 09:00
  • 1
    I personally very much dislike packages like EasyPHP, WAMP, XAMPP etc because while they make it very easy to install the bundle of applications required for a hosting environment, they do NOT promote a good understanding of how the individual components actually work. Also, because they move config files around and use bits and pieces of non-standard config, they can be very hard to debug when something is not working as you expect it to. It's not difficult or particularly time consuming to set up Apache/MySQL/PHP on Windows, and you can copy common config files around to reduce setup time. – DaveRandom Aug 27 '11 at 09:12
  • You don't need any software to make your PHP application accessible on LAN. You can use PHP's built-in web server for that. Just enter the command: `php -S 0.0.0.0:8000 index.php` and it will be accessilble at: `machine_ip:8000`. Make sure to use `0.0.0.0:port` and not `localhost:port` otherwise it will not be available on lan. – progyammer Nov 14 '19 at 18:23

5 Answers5

12

When you install Apache or IIS or any other web server application, your computer acts as a web server. a webserver is not limited to local environment but it can respond to the request recieved from the internet too.

for example if you have installed Apache or IIS in your computer and you are connected to internet. then note down your IP address and switch to any other computer from outside and try accessing your computer and voila it accesses your files from within the web root directory as defined by your web server. your PC is now acting as a web server for the client. the same goes with LAN.

take for example there are 5 PC's connected to a WIFI router. the wifi will assign the local IP address to all the computer and hence

PC 1 have IP Address 192.168.1.2

PC 2 have IP Address 192.168.1.3

PC 3 have IP Address 192.168.1.4

PC 4 have IP Address 192.168.1.5

PC 5 have IP Address 192.168.1.6

now take for example you have installed Apache or IIS in PC 1 which have an IP address of 192.168.1.2, now all the other computer connected to netowrk will be able to access your web directory from the address 192.168.1.2. via a web browser. this will work regardless of what PHP application you are using. it is your Web server which is responsible for routing incoming request not your PHP application :)

hope this helps.

Ibrahim Azhar Armar
  • 25,288
  • 35
  • 131
  • 207
2

Should i use EasyPHP to install the application on my client's LAN server?

Yes. And those on the network would access the site just like you do from the local machine, except that they'll replace localhost with that machine's IP address.

AbdullahC
  • 6,649
  • 3
  • 27
  • 43
1

You just need to install EasyPHP and put your application in correct directory.

Alternatively for windows machine WAMP or XAMPP can be easy solution. And for linux you can manually install everything or use XAMPP.

These are just easy and straightforward to configure.

Kowser
  • 8,123
  • 7
  • 40
  • 63
0

Install the webserver and webapplication normally, other computers in your lan may access your webserver by simply accessing your network address (IP) normally something like 192.168.?.?

Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308
-2

yes you can deploy web application on LAN network by installing your web server in any PC connected to your lan after that you have to change some configuration in your web server to allow accessing it from any where even from outside throw the internet , and you can do some tricks like give it virtual host name as its normal web application , am sorry my English language is very bad .