Sharing some PHP pages in a LAN

Discussion in 'Programming/Scripts' started by getbiplab, Feb 25, 2008.

  1. getbiplab

    getbiplab New Member

    I have some PHP pages where there is a need to share them among some clients..I want the pages to be kept in a server where frm the clients can access them....Is it possible to implement it with CGI????plz suggest and plz in detail...
     
  2. topdog

    topdog Active Member

    What kind of php pages are they web based or command line scripts ?
     
  3. getbiplab

    getbiplab New Member

    I have web based php pages....with mysql database connection
     
  4. topdog

    topdog Active Member

    Just setup a webserver on the lan.
     
  5. make-fun

    make-fun Member

    Hi there,

    here's what I've done to have a local testing environment — in detail and assuming you're on Win…?! or if not you figure how to do it on Linux.
    1. Edit your Windows Host-File (C:\WINDOWS\system32\drivers\etc\hosts) with some Domain-Names which will be routed to your own Computer/Localhost/Testserver
      Let's say you're working on a project called "newhowtoforge" then set an entry in a new line:
      Code:
      127.0.0.1    www.newhowtoforge--2--mynetwork.com
      (you will never be able to access this domain if someone would really register it, as you are telling your computer to look for it at IP 127.0.0.1 - your machine)

    2. Install XAMPP for Windows on your local machine (http://www.apachefriends.org)

    3. Edit the XAMPP Apache-httpd.conf in D:\apachefriends\xampp\apache\conf\httpd.conf (if you install in D:)
      Look for the section "NameVirtualHost 127.0.0.1" in httpd.conf and add a VirtualHost for your project called "newhowtoforge":
      Code:
            <VirtualHost 127.0.0.1>
             ServerName www.newhowtoforge--2--mynetwork.com
             ServerAlias www.newhowtoforge--2--mynetwork.com
      
             DocumentRoot "D:/yourProjects/newhowtoforge"
             ErrorLog "D:/yourProjects/newhowtoforge/error.log"
             TransferLog "D:/yourProjects/newhowtoforge/access.log"
            </VirtualHost>
      And put your files in that dir…

    4. And then get your friends to change thier Edit Windows Host-File (as in step 1), but point it to the IP of the XAMPP install. Then they'll all get a nice looking web site when they type http://www.newhowtoforge--2--mynetwork.com in thier browser

    Hope this helps — if you still need it ;-)
     
    Last edited: Apr 6, 2008

Share This Page