|
25 Nov 2002, 17:27
|
#1
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
php and windows
i've installed apache on winxp and it all seems ok
also install php
after running apache and going to htpp://localhost/phpinfo.php i get all the php info stuff up so i'm assuming that means php is installed
i then made a v. simple php script to tell me the date called date.php
this only works when it's in C:\apache\htdocs
i can run it by http://localhost/date.php and it works
now how do i make it so it can be run from other directories?
if i create a directory inside the htdocs dir called php and put the file in their, i get file not found when i try http://localhost/php/date.php
i know this is prolly something simple like editing a line in a config file but i can't seem to get it working
|
|
|
25 Nov 2002, 17:34
|
#2
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
now it seems to be working in any subdirectories of htdocs
is this right?
"By default, all requests are taken from this directory, but
symbolic links and aliases may be used to point to other locations"
can someone explain this bit?
|
|
|
25 Nov 2002, 17:59
|
#3
|
Bitch
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
|
ln /usr/local/apache/htdocs/php/whatever.html /usr/local/apache/htdocs/index.html should give you a symbolic link to the .../htdocs/php/whatever.html file but placed in .../htdocs and called index.html. This isn'tanother file, it's just a pointer in the right direction. E.g. if someone asks for index.html it says"ooh ooh! I know where that is! It's over there!".
Clear as mud?
[edit]you're using WIndows so just ignore everything I just said hehe.[/edit]
[/edit2]there's an option in httpd.conf to allow subdirectories of htdocs to be used. Can't remember which one offhand though but it's well commented so a quick look through should find it [/edit2]
__________________
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und vatch
das blinkenlights!!!
|
|
|
25 Nov 2002, 18:08
|
#4
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
the subdirectories are working now
just wasn't sure about the pointing to other directories thingy but it's ain't that big a deal
|
|
|
25 Nov 2002, 18:22
|
#5
|
Rawr rawr
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
|
Quote:
Originally posted by Ragnarak
now it seems to be working in any subdirectories of htdocs
is this right?
"By default, all requests are taken from this directory, but
symbolic links and aliases may be used to point to other locations"
can someone explain this bit?
|
That probably means you can have names point to other directories on your HD.
I can confige my Win2k webserver in such a way that http://localhost/struct points to the folder F:\struct and that http://localhost/floppie points to the folder E:\inetpub\floppie...
I'm not 100% sure this is what they mean, but it could very well be it.
__________________
"Yay"
|
|
|
25 Nov 2002, 18:35
|
#6
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
that's what i assumed it meant but don't know how to do it
got lots of documentation to read :/
|
|
|
25 Nov 2002, 20:45
|
#7
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
Alias /stuff/ "c:/stuff/"
in httpd.conf file
|
|
|
25 Nov 2002, 20:50
|
#8
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
now everything is working, anyone have any suggestions to make it more secure?
|
|
|
26 Nov 2002, 17:37
|
#9
|
Guest
|
go to the conf file of appache, and type htdocs in search option of txt file
then you get two paths, which both need to be edited to the folder you want ur webfiles to be stored in.
|
|
|
26 Nov 2002, 22:25
|
#10
|
/dev/zero Retired Mod
Join Date: May 2000
Posts: 415
|
symlinks are a bit like shortcuts for *nix, they dont really exist under windows.
__________________
#linux : Home of Genius
<idimmu> ok i was chained to a desk with this oriental dude
|
|
|
27 Nov 2002, 06:23
|
#11
|
Debonair
Join Date: May 2001
Location: India
Posts: 33
|
Just a suggestion, get phpTriad.
__________________
The views expressed above are solely of the individual and in no form represent the views of Fury command.
[02:29:37] <@Grendels> most of the people in my school don't know what unix is
[02:29:47] <Add> in all fairness why should they
[02:30:11] <Add> would probably get laid more often
R3 : Can't remember
R4 : 169:4
R5 : 29:16
R6 : 21:12
R7 : 14:23
Come and learn how to do naughty things in #cootie
|
|
|
27 Nov 2002, 13:10
|
#12
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
Quote:
Originally posted by Outcast2k
Just a suggestion, get phpTriad.
|
got it
|
|
|
28 Nov 2002, 13:55
|
#13
|
Forever Delayed
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
|
Quote:
Originally posted by Outcast2k
Just a suggestion, get phpTriad.
|
Noooo! It's very out of date.
If you insist on one of these installers, use this one as it's updated a lot - although you'll need to tweak the conf files more than in EasyPHP for example.
M.
__________________
Firefly Oper and General l4m3r - "I Do Stuff"
O2 Rip-off campaign
<vampy> plus i hate people ... i despise humanity as a whole
pablissimo "I'm still geting over the fact you just posted a pic of your own vomit"
|
|
|
28 Nov 2002, 14:25
|
#14
|
Registered User
Join Date: Oct 2000
Posts: 4,944
|
Quote:
Originally posted by Mong
Noooo! It's very out of date.
If you insist on one of these installers, use this one as it's updated a lot - although you'll need to tweak the conf files more than in EasyPHP for example.
M.
|
i installed phptriad as it seemed very easy to set up
all i'm doing is using it as a webserver to test stuff without having to keep uploading it to my server
(managed to get 500mb server space and 5gb bandwidth a month for free from a friend of a friend )
you say it's out of date but if say a php script runs fine on my comp will it do exactly the same on the server where i'd be hosting it? (same versions of mysql/php/etc)
|
|
|
28 Nov 2002, 14:34
|
#15
|
Forever Delayed
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
|
Quote:
Originally posted by Ragnarak
you say it's out of date but if say a php script runs fine on my comp will it do exactly the same on the server where i'd be hosting it? (same versions of mysql/php/etc)
|
Generally yes, as long as it's at least PHP 4.1, for example.
But I'd not be 100% happy hosting stuff live on an old server - can your mate not upgrade it?
M.
__________________
Firefly Oper and General l4m3r - "I Do Stuff"
O2 Rip-off campaign
<vampy> plus i hate people ... i despise humanity as a whole
pablissimo "I'm still geting over the fact you just posted a pic of your own vomit"
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
|
All times are GMT +1. The time now is 00:36.
| |