what to know about server configuration?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

what to know about server configuration?

Post by newmember »

What things i have to know about host server configuration (where my site will be stored)?
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

To find out about your server, run the

<?phpinfo();?>

to get the details.
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

Post by newmember »

it will be possible to run phpinfo()? i thought that host admins probably will set very strict security rules...

Anyway, can you tell me what is the typical setup for webhosts?
for examle, how php is configured to run...
as apache module or as cgi executable?
what is the typical path for user home directory?

And about one more thing i was wandering is how do i protect my files from being directly viewed from web...
what i mean is, let's say i keep simple file-based guestbook... so i save user comments to file...
How do i make sure that this file won't be accessible from outside?

thanks...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

as apache module or as cgi executable?
module.
what is the typical path for user home directory?
/usr I think..
How do i make sure that this file won't be accessible from outside?
.htaccess search the forums for further details.
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

Post by newmember »

i know about .htaccess... but will i have enough priviligies to setup one?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

normally, yes, if you have a decent host.
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

Post by newmember »

so basicly if i can't setup .htaccess then i can't protect my files?
so it is very important to find out whether my webhost allows this? right?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can protect them, you just have to be a LOT more careful and/or elaborate with the protection..
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

Post by newmember »

ok thanks:)
maybe you can give some clues how to protect?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

best option, after htaccess is, put the data in a directory that isn't accessible to the web users (outside the webroot)
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

Post by newmember »

ok i see
thanks for help:)
Post Reply