[RESOLVED] Help with installing php, and using the upload file function.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

First place I'd turn to for that would be the PHP manual. For example, if you're new to PHP altogether and are interested in a bit of background/introductory information about the programming language in general, take a look at the getting-started manual page.

Otherwise, skip ahead to the install section if you know how you want to install PHP (e.g. which webserver you want to integrate it with).

Originally Posted by hcaz

i need to kow what server i can use on my pc to share the page over the network.

Based on your recent reply, it sounds like a webserver would be the logical choice. As far as which webserver, well that's up to you. Apache is a very common choice, though.

Originally Posted by hcaz

I need a page that will allow me to upload a picture (or take a picture on the page) and then send it to my laptop over the WiFi and save it in a folder

As for the sending to the laptop, you'll have to figure out exactly how you want that file transfer to occur. For example, do you want to install an FTP server on your laptop and use the FTP protocol to transfer the files? Do you want to use a shared folder in Windows that gives others 'Write' access on your laptop?

From what i know about PHP (which is not allot) i can make a page on the laptop and the webserver will be on the laptop, connect to the ip from anover computer or phone, and click upload it would then same to the laptop, Does the server side script not save it on the servers local HDD?

Well yes, that is of course the place the file is first uploaded to when the form is POST'ed... but in your original post:

Originally Posted by hcaz

I need a page that will allow me to upload a picture (or take a picture on the page) and then send it to my laptop over the WiFi and save it in a folder

you talk about uploading the picture "and then" sending it to your laptop, as if those two items were different processes (suggesting that the webserver is not on your laptop).

If the webserver is on your laptop, then the application is reduced down to nothing more than a simple file upload script that accepts file uploads and moves them to the appropriate location on the hard drive.

Ahh sorry, yes i want the files uploaded to my laptop which is the webserver, i will install Apache on it, can you help me with the script, as if im right there will need to be a server side one as well as the client?

What operating system is your laptop running? If it's a Mac, you can use MAMP. If it's a PC, you can use WAMP. I myself bothered to learn how to install the things "from scratch" by compiling them, etc., but these packages are pretty user friendly and can get you started easily.

As for accessing this laptop, I'm assuming you want these other computers and phones to access it using a browser. Please note that if these other computers/phones are not on your LAN then you will probably have to configure a router or firewall.

For example, I have a LAN here at my office. All the computers connect via ethernet cable (or wifi) to a router. The router is connected to the cable modem which provides internet service for the entire network. My local computers can all "see" each other by accessing a local IP address like 192.168.1.2.

If someone from Europe wants to connect to a computer on my network here in Los Angeles, I would need to configure my router to handle incoming HTTP requests (on port 80) by sending them to one of the machines on my network. How one does this depends entirely on one's router.

Additionally, if you take your laptop to starbucks, you need an entirely different solution because your laptop's IP address would change when you went from the coffee bean to starbucks to pete's or whatever. Offhand, I'm not sure how you would handle this situation.

I understand i am running windows 7, and the laptop is hosting a wireless network (Ad-Hoc) for the phones and computers to connect to, and yes through the browser, so that's why i thought of a webpage and using PHP to upload?

WAMP stands for Windows Apache MySQL and PHP - it comes with everything but windows, which is what you will be installing it on.

Sadly, nobody codes for anyone on this forum. People taste your dishes and tell you what is missing, but they don't cook for you. ~anoopmailI'd rather be a comma, then a full stop.User Authentication in PHP with MySQLi - Don't forget to mark threads resolved - MySQL(i) warning