Connect iPhone to locally installed web server (XAMPP) on a PC via WLAN

Dear all,

I think I want to do a simple thing: I am developing a web page that shall work with both PC/Mac (real computers) and iPhone; it switches the page content depending on the user agent (Safari on iPhone or "normal" PC).

Anyway - the point is: I want to watch my page both with PC and iPhone; since I don't have connection of my PC notebook (on which I develop this) to the internet right now (I write this post here with the iPhone...), I got the idea to connect the iPhone to the PC via WLAN and use the locally installed webserver XAMPP on the PC which I use anyway for my development, so that I could open my developments on Safari on the iPhone by typing "localhost" in the adress bar on the iPhone.
However, it isnt as simple - and first problem is to establish a WLAN connection between PC and iPhone - and I dont know if what I plan would work anyway.
So, my question: can anybody tell me if this works? Any tutorial on the web? I could not find anything useful among the tons of material about tethering iPhone and PC to use iPhones internet connection by the PC... I would be very grateful for a step-by-step guide for establishing the connection between iPhone and PC.

The data: I use win XP SP3, XAMPP 1.6.6a and iPhone first generation; I can't download any additional software - but Bonjour is installed (cant find the version now - at least 1.0.6).

Okay - thanks for any hints! With kind regards - and: Merry Christmas!
Björn

Mac mini 2GHz Core 2 Duo, Mac OS X (10.5.2)

Posted on Dec 25, 2008 1:22 PM

Reply
2 replies

Dec 26, 2008 11:14 AM in response to bBcuda

Ok, first you need to get a network conection from the of to the phone. If you have a wireless router, you can plug that router in, connect the iPhone via wifi, and connect the computer via Ethernet, then find the internal ip address your computer. Type it into the iPhone, there you go, no internet required. If the computer you have has wifi, you can create an adhoc network and conect you iPhone. Jus remember, google is your friend.

Dec 27, 2008 11:05 AM in response to mosesdog2

Hi!

Thanks for Your post; is it right - Your post seems to suggest to me that what I want (use the local XAMPP web server on my notebook to serve web pages to my iPhone via WLAN/WiFi) should actually work?

Well, thanks for Your suggestions; actually, my main point was to first find if somebody can tell me if what I want should actually work before I loose more of my energy into fighting with the Win XP WiFi settings. After Your post I was encouraged and put several more hours into getting an ad-hoc network between the iPhone and the PC notebook running - but to no real avail up to now... Although the ad-hoc network is there (I disabled WEP and made it open to make things as simple as possible), I don't get positive results when I try to ping the iPhone via its IP adress (which was given by DHCP, which seems to work - the subnet masks on both the iPhone and PC are also identical: 255.255.0.0).
I don't see the problem now - and consider quitting my idea, since I just wanted to test some web pages that I created for the iPhone with my PC as long as I cant upload them to an internet server (which I can again on tuesday...) - connecting to a PC via ad-hoc WIFI is not half as ad-hoc as it pretends, I'm afraid... 🙂

Well, my only hope is that someone else here has a suggestion on how to solve the problem; am I right in expecting ping to work between PC and iPhone if the connection is okay?

Thanks again for any hints and answers!

With kind regards,
Björn

Message was edited by: bBcuda

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Connect iPhone to locally installed web server (XAMPP) on a PC via WLAN

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.