Trying to use PHP and Apache/Xampp on an offline PC

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Trying to use PHP and Apache/Xampp on an offline PC

Postby Seymour Clufley » 19. March 2008 17:13

All my creative work is done on a computer that is NOT connected to the Internet. It's running Windows XP Pro SP2. Default browser is IE 6.

I've been making a website for the last few weeks, and decided it's time to learn PHP. So, I downloaded the latest "stable" release, 5.2.5, and ran the installer. I ticked the option to install the Apache 2.0 server and this created an error during the installation - "trying access httpd.conf. You will need to manually configure the web server".

After opening a test PHP page and finding it, indeed, didn't work, I uninstalled and reinstalled trying Apache 2.2 instead. The same outcome.

So then I read about the Xampp "suite" and tried that - both the installer version and the zipped folder. In both cases, PHP pages are not handled. (I had placed them in the htdocs folder.)

Now, after a week, I'm getting mighty pissed off and just want the thing to be over so I can start working with PHP!

It's hard to find out crucial information - namely "can you run a virtual server on an offline PC?" And it's hard to find tutorials that just tell the layman exactly what to do - or at least, the tutorials I've found, I've followed to the letter and still the thing doesn't work.

One thing that may be relevant is this: when I open an HTML/MHT/PHP file, IE6 almost always shows a dialogue that the computer's offline, and asks if I want to "Connect" or "Stay offline". The first just leads to the same dialogue (naturally), so I always click "Stay offline". Could it be that this prevents IE from passing PHP files to a virtual server, because it assumes no server can be contacted since the system is offline? Either way, I can't find a way to get rid of this irritating dialogue.

Please, please help before I go nuts.

Thanks for reading,
Seymour.
Seymour Clufley
 
Posts: 11
Joined: 16. March 2008 09:40

Postby Milligan » 20. March 2008 01:39

Last edited by Milligan on 17. July 2008 05:10, edited 3 times in total.
Milligan
 
Posts: 136
Joined: 03. March 2008 06:23

Postby x-files » 20. March 2008 01:44

Namely: can a Web Server work Offline = Yes, definitely since it accesses http://127.0.0.1/ or http://localhost/ which means one's own HD.

Now, I know it is possible for I do this as often as I wish to. Points to check:
- Did you set xampp to run as service or do you have to use "start_apache.bat" ?

- Did you type url as http://127.0.0.1/folder_name/page.php or simply trying to open file.php in IE ?
x-files
 
Posts: 23
Joined: 16. November 2007 02:57

Postby Milligan » 20. March 2008 02:04

Last edited by Milligan on 17. July 2008 05:13, edited 1 time in total.
Milligan
 
Posts: 136
Joined: 03. March 2008 06:23

Postby Seymour Clufley » 20. March 2008 02:58

Thanks for your replies!

Here is the current situation. I read the PHP documentation and noticed it needed IIS installed. I hadn't noticed this before! Dumb mistake, and I'm very sorry about it. So here's what I did:

1. Uninstalled PHP and Xampp (I had installed both of these separately)
2. Installed IIS. After doing this, PHP files are recognised in Windows Explorer and have a purple icon - seems like a step forward, but...
3. Reinstalled Xampp, telling it to install Apache 2.2 as a service (as before). When the install finished, it threw up an error saying "ports 80 or 443 (SSL) already in use" - presumably by IIS - and installing Apache had therefore failed. And indeed, the Apache service is not checked in the Xampp control window.

I've googled this and one person says to uninstall IIS?! (See, this is what I mean about this whole saga! PHP says it needs IIS installed, but that introduces a conflict so you can't install Apache, so...) Another person says simply configure IIS to use a different port. Given that I want to test PHP offline, which is the better idea?

I will tackle the other issues mentioned by Milligan but I think the inability to install Apache is the main problem now.
Seymour Clufley
 
Posts: 11
Joined: 16. March 2008 09:40

Postby Milligan » 20. March 2008 03:07

Last edited by Milligan on 17. July 2008 05:14, edited 1 time in total.
Milligan
 
Posts: 136
Joined: 03. March 2008 06:23

Postby Seymour Clufley » 20. March 2008 16:36

I'm sorry, Milligan, but it was very frustrating after a week of fiddling around. However, I've now got it working, so thanks to you and x-files for your help.

There is one other thing, which I would appreciate help with.

I found *SPYWARE* which, I don't know if you know, allows you to specify a custom directory instead of xampp\htdocs for your website files. This simplifies the maintaining of my website.

But along with PHP, I'd like to use CGI executables (since I can make them with PureBasic). Do you know if there's anything I need to do re. setting exe permissions, because I've put the executables in the cgi-bin folder and I'm getting a 404 "You don't have permission to access..." error when I try to run any .cgi page. (These pages are being accessed by typing their localhost URLs in IE.)
Last edited by Seymour Clufley on 20. March 2008 17:43, edited 1 time in total.
Seymour Clufley
 
Posts: 11
Joined: 16. March 2008 09:40


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 36 guests