Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Chris Andruszko
Chris Andruszko
18,392 Points

Distributing a PHP website without an active connection.

I have a question about a project I'm working on for a client. I'm very new to databases, and I'm not sure if my idea will work.

Basically, my client uses a wifi router to distribute data from a USB drive. The idea for this is to allow a group of people to access a particular website without an internet connection (useful for distributing information in parts of the world where an internet connection is scarce. My job is to create a website that can be accessed locally through wifi without an active internet connection (although it will probably be put online eventually). The website involves directories, so I must use PHP, seeing how Javascript doesn't allow for accessing local files.

I was thinking one person could install XXAMP or MAMP (or another solution stack) on a host computer, then everyone in the group could access the website by entering the router's IP address.

Since I'm so new to this, I just want to confirm that this idea will work, in theory. And if you can think of any concerns or potential complications, please let me know.

Thanks for any help!

4 Answers

Placid Rodrigues
Placid Rodrigues
12,630 Points

Hi Chris,

I think you can do it. I have done similar work previously. For a client, I installed WAMP (You can install XAMPP/LAMP) on one of their PC and created web application with PHP in it. They are using it from multiple computers and I have just confirmed that they can access the site from mobile browsers too. From a locally connected device, the user just needs to open a browser and go to the IP address of the server computer (where the WAMP and website is setup).

Hope that helps.

Placid

Chris Andruszko
Chris Andruszko
18,392 Points

Great! Glad to hear someone else has done it!

Maybe a LAMP stack installed on a Raspberry PI, plugged into a LAN port on the wi-fi router.

Chris Andruszko
Chris Andruszko
18,392 Points

They have already chosen the equipment they want to use, and they're using it with similar applications. But I might buy a Raspberry PI just to play around with it.

Yeah, your theory sounds pretty correct! You might need a dedicated computer to manage it (a Raspberry Pi might not have enough juice) - it totally depends on your load.

Chris Andruszko
Chris Andruszko
18,392 Points

Good to know! This is an unusual project for me, so I'm glad to know my idea will work.

Just a point about wireless routers and accessing local resourses. In the wireless setup or wireless security settings of most routers, there is a setting for wireless isolation. Mobile (wireless) users can only access the WAN (internet in most cases) when this feature is turned on. Wireless isolation needs to be turned off to allow mobile/wireless devices to access local servers.

Chris Andruszko
Chris Andruszko
18,392 Points

Thanks for mentioning that. I'll have to see how my client is planning on handling the security issues involved with that.