User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion

Reply
Thread Tools Display Modes
Unread 25 Nov 2002, 17:27   #1
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
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
Ragnarak is offline   Reply With Quote
Unread 25 Nov 2002, 17:34   #2
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
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?
Ragnarak is offline   Reply With Quote
Unread 25 Nov 2002, 17:59   #3
Gayle29uk
Bitch
 
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
Gayle29uk is just really niceGayle29uk is just really niceGayle29uk is just really niceGayle29uk is just really nice
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!!!
Gayle29uk is offline   Reply With Quote
Unread 25 Nov 2002, 18:08   #4
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
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
Ragnarak is offline   Reply With Quote
Unread 25 Nov 2002, 18:22   #5
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
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"
Structural Integrity is offline   Reply With Quote
Unread 25 Nov 2002, 18:35   #6
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
that's what i assumed it meant but don't know how to do it

got lots of documentation to read :/
Ragnarak is offline   Reply With Quote
Unread 25 Nov 2002, 20:45   #7
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
Alias /stuff/ "c:/stuff/"

in httpd.conf file
Ragnarak is offline   Reply With Quote
Unread 25 Nov 2002, 20:50   #8
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
now everything is working, anyone have any suggestions to make it more secure?
Ragnarak is offline   Reply With Quote
Unread 26 Nov 2002, 17:37   #9
Rythms
Guest
 
Posts: n/a
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.
  Reply With Quote
Unread 26 Nov 2002, 22:25   #10
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
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
MT is offline   Reply With Quote
Unread 27 Nov 2002, 06:23   #11
Outcast2k
Debonair
 
Join Date: May 2001
Location: India
Posts: 33
Outcast2k is an unknown quantity at this point
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
Outcast2k is offline   Reply With Quote
Unread 27 Nov 2002, 13:10   #12
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
Quote:
Originally posted by Outcast2k
Just a suggestion, get phpTriad.
got it

Ragnarak is offline   Reply With Quote
Unread 28 Nov 2002, 13:55   #13
Mong
Forever Delayed
 
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
Mong is on a distinguished road
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"
Mong is offline   Reply With Quote
Unread 28 Nov 2002, 14:25   #14
Ragnarak
Registered User
 
Ragnarak's Avatar
 
Join Date: Oct 2000
Posts: 4,944
Ragnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to beholdRagnarak is a splendid one to behold
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)
Ragnarak is offline   Reply With Quote
Unread 28 Nov 2002, 14:34   #15
Mong
Forever Delayed
 
Join Date: Sep 2000
Location: www.netgamers.org
Posts: 1,475
Mong is on a distinguished road
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"
Mong is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Forum Jump


All times are GMT +1. The time now is 00:36.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018