PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > Include(filename.php) and security
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Include(filename.php) and security

Réponse
 
LinkBack Outils de la discussion
Vieux 02/11/2007, 00h27   #1
Animesh K
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Include(filename.php) and security

I have a file abc.php which includes another file (which primarily has
text) called text.php.

Is there a way I can secure the text.php file without affecting the
include_once('text.php') call in abc.php?

By secure, I mean the outside user should not be able to find the file
at all.

Of course one method is to obfuscate the name of text.php, but any
simpler solutions are preferred.

Best regards,
Animesh
  Réponse avec citation
Vieux 02/11/2007, 01h35   #2
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security


"Animesh K" <animesh1978@gmail.com> wrote in message
news:fgdnc8$25bu$1@agate.berkeley.edu...
>I have a file abc.php which includes another file (which primarily has
>text) called text.php.
>
> Is there a way I can secure the text.php file without affecting the
> include_once('text.php') call in abc.php?
>
> By secure, I mean the outside user should not be able to find the file at
> all.
>
> Of course one method is to obfuscate the name of text.php, but any simpler
> solutions are preferred.
>
> Best regards,
> Animesh


put it outside the of the web root directory. make sure your web server has
permission to acces the file.


  Réponse avec citation
Vieux 02/11/2007, 01h42   #3
Animesh K
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security

Steve wrote:
> "Animesh K" <animesh1978@gmail.com> wrote in message
> news:fgdnc8$25bu$1@agate.berkeley.edu...
>> I have a file abc.php which includes another file (which primarily has
>> text) called text.php.
>>
>> Is there a way I can secure the text.php file without affecting the
>> include_once('text.php') call in abc.php?
>>
>> By secure, I mean the outside user should not be able to find the file at
>> all.
>>
>> Of course one method is to obfuscate the name of text.php, but any simpler
>> solutions are preferred.
>>
>> Best regards,
>> Animesh

>
> put it outside the of the web root directory. make sure your web server has
> permission to acces the file.
>
>


Can you please explain it a bit more. Outside of the directory, but where?

Do you mean make a directory for those text files and keep it hidden
since people will not know where that directory is, so they cannot guess it?
  Réponse avec citation
Vieux 02/11/2007, 02h34   #4
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security

Animesh K wrote:
> I have a file abc.php which includes another file (which primarily has
> text) called text.php.
>
> Is there a way I can secure the text.php file without affecting the
> include_once('text.php') call in abc.php?
>


You could secure it with .htaccess, but that's the hard way.

> By secure, I mean the outside user should not be able to find the file
> at all.
>
> Of course one method is to obfuscate the name of text.php, but any
> simpler solutions are preferred.
>
> Best regards,
> Animesh
>


Put the file in a directory outside of the web server's root directory.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 02/11/2007, 03h49   #5
Animesh K
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security

Jerry Stuckle wrote:
> Animesh K wrote:
>> I have a file abc.php which includes another file (which primarily has
>> text) called text.php.
>>
>> Is there a way I can secure the text.php file without affecting the
>> include_once('text.php') call in abc.php?
>>

>
> You could secure it with .htaccess, but that's the hard way.


All methods are welcome.

>
>> By secure, I mean the outside user should not be able to find the file
>> at all.
>>

>
> Put the file in a directory outside of the web server's root directory.



I don't have a dedicated server. I am using a shared server and most
likely this cannot be done.
  Réponse avec citation
Vieux 02/11/2007, 03h52   #6
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security

Animesh K wrote:
> Jerry Stuckle wrote:
>> Animesh K wrote:
>>> I have a file abc.php which includes another file (which primarily
>>> has text) called text.php.
>>>
>>> Is there a way I can secure the text.php file without affecting the
>>> include_once('text.php') call in abc.php?
>>>

>>
>> You could secure it with .htaccess, but that's the hard way.

>
> All methods are welcome.
>
>>
>>> By secure, I mean the outside user should not be able to find the
>>> file at all.
>>>

>>
>> Put the file in a directory outside of the web server's root directory.

>
>
> I don't have a dedicated server. I am using a shared server and most
> likely this cannot be done.
>


Many shared servers give you access one level above your web root
directory. If you're doesn't, find one which does. If you need the
file protected, anything else isn't worth the hassle.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 02/11/2007, 03h55   #7
Animesh K
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security

Jerry Stuckle wrote:
> Animesh K wrote:
>> I have a file abc.php which includes another file (which primarily has
>> text) called text.php.
>>
>> Is there a way I can secure the text.php file without affecting the
>> include_once('text.php') call in abc.php?
>>

>
> You could secure it with .htaccess, but that's the hard way.
>



How about turning off warnings? That's what you mean by .htaccess? (like
warning off).
  Réponse avec citation
Vieux 02/11/2007, 03h57   #8
Animesh K
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Include(filename.php) and security

Jerry Stuckle wrote:

>
> Many shared servers give you access one level above your web root
> directory. If you're doesn't, find one which does. If you need the
> file protected, anything else isn't worth the hassle.
>


I use godaddy's service, and don't really plan to change (price!). I
will check if I can get to a higher directory (but the ftp program gets
me directly to the web-root and I haven't fiddled with the .. command).

I can always use some obfuscated directory for the file (like
/asaihsaihsaih/filename ..)

Thanks,
Animesh
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h45.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16839 seconds with 16 queries