NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Advice Temp location on Project

February 16, 2012
by missle3944
missle3944's Avatar

Hi everyone,

I'm needing some advice and if someone could point me in the right direction for a project were I want to be able to access a web page such as an appache server and see the temperature getting outputted by nerdkit. I dont really know how I would do the web part.

Possibly something like a php script like Mike and Humberto did in the iPhone controlled rc car.

How would I go about doing this?

-Dan

-Dan

February 16, 2012
by Ralphxyz
Ralphxyz's Avatar

"Possibly something like a php script like Mike and Humberto did in the iPhone controlled rc car."

What more needs to be said?

You need to do a PHP Serial to Apache interface like was done in the iPhone script (I just Googled PHP to Serial :-).

Ralph

February 17, 2012
by missle3944
missle3944's Avatar

Ralph,

Thanks for the reply, I guess I'll give that a shot. I did run into an error trying to install apache and php on ubuntu today though. For some reason Apache couldn't find my ip address so it just went with something like 127.1.1, so I will have to see if that will work.

I suppose when I do this I should set up some kind of password key right? I'd hate to have the Chinese poking around ;)

I'm completely new to all this stuff on web interfacing

-Dan

February 18, 2012
by treymd
treymd's Avatar

127.0.0.1 is the local loopback address, the address on which a machine points and can connect to itself. It will exist on most (probably all) machines that support IP version 4. Apache may default to running ONLY on this address as a security feature, forcing you to go into the configuration and modifying it to listen on other or all interfaces.

In httpd.conf there is an option: Listen

If that says "127.0.0.1:80" then your webserver will only listen on the loopback interface

If you remove the address specification and do just "Listen 80" it should bind to all interfaces.

February 18, 2012
by Ralphxyz
Ralphxyz's Avatar

Dan, like treymd said:

"In httpd.conf there is an option: Listen"

httpd.conf is in the etc folder!

I use XAMPP for my Apache, MySql, PHP and Perl (plus others) so httpd.conf is in my XAMPP/etc/httpd.conf.

httpd.conf is the primary configuration file for Apache.

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

You will see notes and links to getting a greater understanding of Apache and httpd.conf in particular.

It is neat to watch your progress in learning this computer technology, how I wish I had something like this when I was your age.

Keep us posted on your progress.

Ralph

February 18, 2012
by missle3944
missle3944's Avatar

Guys,

Thanks for the help, I just tested a simple Hello world text on php file but when I try to access it from another computer it times out and doesn't even connect. But it works fine on the host computer.

-Dan

February 18, 2012
by missle3944
missle3944's Avatar

There is no way to download the PHP Serial class so I will have to create a pipe like Mike and Humberto did I guess. And every time I try to implement the serial code I cannont access the page so I suppose it is something with the PHP code.

Post a Reply

Please log in to post a reply.

Did you know that our USB NerdKit comes with everything you need to get started with microcontrollers? Learn more...