We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
making my computer a personal server
Topic Started: Apr 2 2005, 02:56 PM (611 Views)
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
hi

is it possible for me to get PHP to run on my computer, by making it a personal web server. i don't want to open my computer up as a web server as such.

for example, i want my computer to be able to parse php and run it on my machine.

i don't want to host anything from my pc

if anybody understands what i am on about please let me know

Thanks
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
You could do that.
But if its not for making it a webserver, phpdev would do the trick.
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
so what exactly does this phpdev do to my machine?

(problem is its a shared pc for the family, i can;t really screw anything up)
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
Sure.

Download Apache HTTP Server 2.0, install it, get everything running nice and pretty, then go to PHP.Net. Download the Windows files. Not the installer, but the source. The installer doesn't work correctly.

Unzip the contents of the download to C:\php, copy the php4apache2.dll (Or similar, change the 4 to 5 if running PHP 5.) from the php\sapi folder to the php root folder.

Open install.txt, and search for the header 'INSTALLING PHP AS AN APACHE MODULE". Once you have found that, go to the Apache Root Folder, open the conf folder, and then the httpd.conf file. Scroll to the bottom, then add the configuration lines found in the PHP install file.

After saving the httpd.conf file, restart Apache. If Apache fails on the restart, check the paths to all files, and if it still doesn't work, ask here

Create a new file in notepad entitled php.php. Add this code to it:

Quote:
 
<?php phpinfo(); ?>


Save that in the Apache\htdocs folder. Open your browser, and point it to http://localhost. Choose php.php from the list of files. If PHP is correctly configured, then you should receive a long list of PHP's configuration settings. Otherwise, you will see the page source.

Hope this helps. :)
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
thansk for all the help blarog...can i just clarify that this doesn't open my system up to the internet at all

and also will it affect system startup?
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
It will not affect the startup other than to start the Apache Service, and no, it will not be on the web.
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
so this apache service will just run in the background?

sorry for all the questions, i just need to be sure
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
Yes. You'll only see it on the browser when you open Localhost. Apache 2 also adds an icon the the System Tools bar on the start bar next to the clock. Just minor stuff. :)
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
ok thankyou very much
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
I'd advise getting Apache 2 and PHP 4.3.

Once you get all that set up, add this to the Conf file:

Quote:
 
# For PHP 4 do something like this:
LoadModule php4_module "c:/php/php4apache2.dll"
# Don't forget to copy the php4apache2.dll file from the sapi directory!
AddType application/x-httpd-php .php


And underneath....

Quote:
 
# configure the path to php.ini
PHPIniDir "C:/php"


http://us4.php.net/manual/en/install.windows.php
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
i got a problem installing apache...it wants my server settings...what do i put? it also wants an email address, do i put my own? (the default is at my isp)
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
Umm, Localhost, and any E-Mail. I use Admin@localhost.
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
thanks a lot
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
i am running windows 98, should i use apache 1.3?

Edit:whoops sorry for double post
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
I don't think it matters, really. Does Apache run alright so far?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1