[PHP] Re: htaccess

2013-07-08 Thread Tim Streater
On 07 Jul 2013 at 21:22, Tedd Sperling t...@sperling.com wrote: 

 Confirmed. Those two lines cause the problem.

 However, commenting out those lines causes other problems.

 Are there similar statements to these:

   AddType application/x-httpd-php .php .htm .html

This one tells apache to recognise .php, .htm, and .html as suffixes of files 
that need to be sent to PHP. You probably don't want to remove that [1].

   AddHandler x-httpd-php5-cgi .php .htm .html

Dunno what this one does.

[1] But, having said that, realise that *all* files with those suffixes will be 
sent to PHP by apache, whether they contain any PHP code or not. Is that what 
you want? If I have an html file that contains some PHP code, I tend to use 
.phtml as suffix and so my AddType looks like:

 AddType application/x-httpd-php .php .phtml

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: htaccess question

2013-04-10 Thread James Moe
On 04/09/2013 11:07 AM, Al wrote:
 I know it's not a php question, but I can't readily find the answer
 elsewhere.
 
  Try http://www.apache.org/foundation/mailinglists.html.

-- 
James Moe
jmm-list at sohnen-moe dot com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: htaccess question

2011-04-26 Thread David Robley
Al wrote:

 I want to restrict access to all files except one on my site and in parent
 dir. Thought this should work; but it doesn't.
 
 Files *
 Order Deny,Allow
 Deny from all
 Allow from xx.36.2.215
 /Files
 
 xx.36.2.215 is actual value IP
 
 This file makes a captcha image and is called with
 img src=makeScodeImg.php alt=missing img file  / in file
 /dir/control.php
 
 makeScodeImg.php is= /dir/includes/makeScodeImg.php
 
 Works fine if allow all just for testing
 
 Thanks

Seems like more of a question for an apache group than a php group. Or you
might check the apache docs at:

http://httpd.apache.org/docs/2.2/howto/htaccess.html
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow


Cheers
-- 
David Robley

To be, or not to be, those are the parameters.
Today is Sweetmorn, the 43rd day of Discord in the YOLD 3177. 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: htaccess question

2011-04-26 Thread Al



On 4/26/2011 5:54 AM, David Robley wrote:

Al wrote:


I want to restrict access to all files except one on my site and in parent
dir. Thought this should work; but it doesn't.

Files *
Order Deny,Allow
Deny from all
Allow from xx.36.2.215
/Files

xx.36.2.215 is actual value IP

This file makes a captcha image and is called with
img src=makeScodeImg.php alt=missing img file  /  in file
/dir/control.php

makeScodeImg.php is=  /dir/includes/makeScodeImg.php

Works fine if allow all just for testing

Thanks


Seems like more of a question for an apache group than a php group. Or you
might check the apache docs at:

http://httpd.apache.org/docs/2.2/howto/htaccess.html
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow


Cheers


You're correct, thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: htaccess question

2011-04-24 Thread Al



On 4/24/2011 5:48 PM, Al wrote:

I want to restrict access to all files except one on my site and in parent dir.
Thought this should work; but it doesn't.

Files *
Order Deny,Allow
Deny from all
Allow from xx.36.2.215
/Files

xx.36.2.215 is actual value IP

This file makes a captcha image and is called with
img src=makeScodeImg.php alt=missing img file / in file /dir/control.php

makeScodeImg.php is= /dir/includes/makeScodeImg.php

Works fine if allow all just for testing

Thanks


Whoops. I meant to say I want to restrict access to all files in a directory 
[/includes] except allow access to makeScodeImg.php from one in the parent 
dir/control.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: htaccess question

2009-09-11 Thread Shawn McKenzie
tedd wrote:
 Hi gang:
 
 Is there a way I can use a htaccess directive to require a php script to
 be included within each file contained within that directory?
 
 For example, let's say I have a directory with 100 scripts in it, but I
 want each script within that directory to pass through an authorization
 script before executing.
 
 The hard way is for me to go through each of the 100 scripts and add the
 statement require(auth.php), but I don't want to do that (I'm too lazy
 and beside there is too great of a chance of an error). So, is there a
 way for me to circumvent this problem by using a htaccess directive?
 
 Now, I know that I can use htaccess to require basic authorization, like
 so:
 
 AuthType Basic
 AuthName admin
 AuthUserFile /home/httpd/vhosts/mydomain.com/.htpass
 require valid-user
 
 But I don't want a file containing user ids and encrypted passwords in
 the file system. Instead, I want to move the user ids and passwords into
 the database and out of the file system. I can do this with an
 authorization script, but I don't want to alter 100 scripts to do it.
 
 Opinions and suggestions welcomed.
 
 Thanks,
 
 tedd

.htaccess

php_value auto_prepend_file /path/to/auth.php

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: htaccess question

2009-09-11 Thread tedd

At 10:15 AM -0500 9/11/09, Shawn McKenzie wrote:


.htaccess

php_value auto_prepend_file /path/to/auth.php

Thanks!
-Shawn



AND

At 5:11 PM +0200 9/11/09, J DeBord wrote:


  Here is a link to the manual.

http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file

*PHP_INI_PERDIR* Entry can be set in php.ini, .htaccess or httpd.conf



Bingo!

I figured there had to be something like that.

Thanks guys.

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: .htaccess

2005-09-14 Thread blackwater dev
Yes, I had already changed the AllowOverride.

It might be php as I get this in my logs:

[Wed Sep 14 20:04:46 2005] [notice] caught SIGTERM, shutting down
PHP Warning:  PHP Startup: Unable to load dynamic library
'./php_mcrypt.so' - ./php_mcrypt.so: cannot open shared object file:
No such file or directory in Unknown o$
This version of ZDS requires a license. License check failed: Cannot
find the license file: zend_performance_suite.zl (path was:
/usr/local/Zend:/usr/local/Zend/etc:$
Zend Download Server not enabled.
[Wed Sep 14 20:04:51 2005 (18237)] [Zend Accelerator] [Info] License
check failed: Cannot find the license file: zend_canaveral.zl (path
was: /usr/local/Zend:/usr/lo$

[Wed Sep 14 20:04:51 2005] [notice] Apache/2.0.52 (Unix) PHP/5.0.3
configured -- resuming normal operations


On 9/13/05, David Robley [EMAIL PROTECTED] wrote:
 blackwater dev wrote:
 
  Thanks David,
 
  I just set it to AllowOverride All and restarted apache but it still
  doesn't seem to work.
 
  On 9/13/05, David Robley [EMAIL PROTECTED] wrote:
  blackwater dev wrote:
 
   I am using .htaccess files throughout my code directory tree to set
   certain directives such as php_value auto_prepend_file
   ../lib/libmatrix.php
  
The problem is, they don't work.
  
   I have this in apache:
  
   Directory usr/local/apache/htdocs/realtors/
   Options FollowSymLinks
   AllowOverride None
   /Directory
  
   Where realtors is the root directory of my site...how can I get it to
   work?
  
   Thanks!
 
  I think you need to look again at the apache documentation, especially
 
  http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride
 
 Odd - works for me (just tried it). By not working, I assume you mean the
 file is not being included, but you get no error. First, check that apache
 is truly reading the .htaccess file by putting a syntax error in it - if it
 is being read you should get a 500 Server error when you try to hit a page
 in the directory where the .htaccess file is.
 
 
 
 
 Cheers
 --
 David Robley
 
 When you're in love, you're at the mercy of a stranger.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .htaccess

2005-09-13 Thread David Robley
blackwater dev wrote:

 I am using .htaccess files throughout my code directory tree to set
 certain directives such as php_value auto_prepend_file
 ../lib/libmatrix.php
 
  The problem is, they don't work.
 
 I have this in apache:
 
 Directory usr/local/apache/htdocs/realtors/
 Options FollowSymLinks
 AllowOverride None
 /Directory
 
 Where realtors is the root directory of my site...how can I get it to
 work?
 
 Thanks!

I think you need to look again at the apache documentation, especially

http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride


Cheers
-- 
David Robley

On the other hand, you also have 5 fingers.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: .htaccess

2005-09-13 Thread blackwater dev
Thanks David,

I just set it to AllowOverride All and restarted apache but it still
doesn't seem to work.

On 9/13/05, David Robley [EMAIL PROTECTED] wrote:
 blackwater dev wrote:
 
  I am using .htaccess files throughout my code directory tree to set
  certain directives such as php_value auto_prepend_file
  ../lib/libmatrix.php
 
   The problem is, they don't work.
 
  I have this in apache:
 
  Directory usr/local/apache/htdocs/realtors/
  Options FollowSymLinks
  AllowOverride None
  /Directory
 
  Where realtors is the root directory of my site...how can I get it to
  work?
 
  Thanks!
 
 I think you need to look again at the apache documentation, especially
 
 http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride
 
 
 Cheers
 --
 David Robley
 
 On the other hand, you also have 5 fingers.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: .htaccess

2005-09-13 Thread David Robley
blackwater dev wrote:

 Thanks David,
 
 I just set it to AllowOverride All and restarted apache but it still
 doesn't seem to work.
 
 On 9/13/05, David Robley [EMAIL PROTECTED] wrote:
 blackwater dev wrote:
 
  I am using .htaccess files throughout my code directory tree to set
  certain directives such as php_value auto_prepend_file
  ../lib/libmatrix.php
 
   The problem is, they don't work.
 
  I have this in apache:
 
  Directory usr/local/apache/htdocs/realtors/
  Options FollowSymLinks
  AllowOverride None
  /Directory
 
  Where realtors is the root directory of my site...how can I get it to
  work?
 
  Thanks!
 
 I think you need to look again at the apache documentation, especially
 
 http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride

Odd - works for me (just tried it). By not working, I assume you mean the
file is not being included, but you get no error. First, check that apache
is truly reading the .htaccess file by putting a syntax error in it - if it
is being read you should get a 500 Server error when you try to hit a page
in the directory where the .htaccess file is. 




Cheers
-- 
David Robley

When you're in love, you're at the mercy of a stranger.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .htaccess authentification problem

2003-11-28 Thread Catalin Trifu
Hi,

When using .htaccess files the request does not reach
your scripts untill Apache has done his authentication.
So, I suggest you take out the .htaccess part for authentication
and deal with it only from PHP; for instance with sessions:
1. Ask for user/pass on first page and authnticate against DB
2. If ok, put it in the $_SESSION
3. When in the user dir, check his session and if he/she is not
authenticated make authentication with PHP (your code below)


Hope this helps,
Catalin

Michael HüBner [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hallo,

 Hope somebody can help me.

 I'm working on Linux, Apache.

 On my start-site the user can log in via inserting Username and Password
 into normal formfields, which are compared with a DB.

 After this login, he can change to his own user-directory which is
.htpasswd
 and .htaccess protected. Thats the reson he has to insert his Username and
 Password again ;(

 My Question:

 Is there a way, so the user has to insert his data only once?

 I've also tried it by doing a authentification like this first:

 ?php
   if (!isset($_SERVER['PHP_AUTH_USER'])) {
Header(WWW-Authenticate: Basic realm=\My Realm\);
Header(HTTP/1.0 401 Unauthorized);
echo Text to send if user hits Cancel button\n;
exit;
 } else {
 echo Hello {$_SERVER['PHP_AUTH_USER']};
 echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your password./p;
   }
 ?

 but it doesn't work for me, because when switching to the userdirs, the
 .htaccess authentification window pops up again (it is the same pwd and
uid
 in the DB and the .htpasswd) ;(

 Thank you in advance,

 Michael

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .htaccess authentification problem

2003-11-28 Thread Michael Hübner
Hi Catalin,

Thanks for your response.

I don't wont to do it this way, because I use the apache-module providing
automatic directory indexing. It is very fast and I don't have to program a
directory indexing by my own. Actually my server is only a Pentium 100 and
generating an index via php slows my machine down. But  maybe I don't
understand the hole thing: Is there a way to use apache's automatic
directory indexing and authentication with PHP at the same time?

Michael


Catalin Trifu [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Hi,

 When using .htaccess files the request does not reach
 your scripts untill Apache has done his authentication.
 So, I suggest you take out the .htaccess part for authentication
 and deal with it only from PHP; for instance with sessions:
 1. Ask for user/pass on first page and authnticate against DB
 2. If ok, put it in the $_SESSION
 3. When in the user dir, check his session and if he/she is not
 authenticated make authentication with PHP (your code below)


 Hope this helps,
 Catalin

 Michael HüBner [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hallo,
 
  Hope somebody can help me.
 
  I'm working on Linux, Apache.
 
  On my start-site the user can log in via inserting Username and Password
  into normal formfields, which are compared with a DB.
 
  After this login, he can change to his own user-directory which is
 .htpasswd
  and .htaccess protected. Thats the reson he has to insert his Username
and
  Password again ;(
 
  My Question:
 
  Is there a way, so the user has to insert his data only once?
 
  I've also tried it by doing a authentification like this first:
 
  ?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
 Header(WWW-Authenticate: Basic realm=\My Realm\);
 Header(HTTP/1.0 401 Unauthorized);
 echo Text to send if user hits Cancel button\n;
 exit;
  } else {
  echo Hello {$_SERVER['PHP_AUTH_USER']};
  echo pYou entered {$_SERVER['PHP_AUTH_PW']} as your
password./p;
}
  ?
 
  but it doesn't work for me, because when switching to the userdirs, the
  .htaccess authentification window pops up again (it is the same pwd and
 uid
  in the DB and the .htpasswd) ;(
 
  Thank you in advance,
 
  Michael

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .htaccess question protect my php test environment

2003-10-25 Thread James Moe
Frank Tudor wrote:
I restart the server and then go to another computer and put in
the URL and no password box comes up.
  Add this to the [virtual]host's section:
directory /virtual_0/path/whatever
AllowOverride AuthConfig Options
/directory
and restart httpd.

--
jimoe at sohnen-moe dot com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: .htaccess - Still asking for login information although already sent through address bar

2003-10-06 Thread PHP Webmaster

Php Webmaster [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all,

 Iv'e got a .htaccess file protecting a site using HTTPS. I have tried
using
 a form to send the login details to the site through the address bar
 (http://user:[EMAIL PROTECTED]) but the .htaccess password protection
box
 still appears asking for the username and password!

 The only thing I can think of is me sending invalid information, but I
know
 I'm not!

 Any ideas appreciated.

Just a quick update.

To ensure that invalid login info was not being sent, I copied the text that
was in the address bar after submitting the login form, closed down IE,
pasted in the text and it went straight in without any login boxes appearing
?!!?

It seems to be only happening after I use a form!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .htaccess settings

2002-03-04 Thread David Robley

In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...
 
 Under PHP3 I was able to do the following within an .htaccess file:
 
 php3_magic_quotes_runtime off
 php3_magic_quotes_gpc on
 
 How do I achieve the same thing under PHP4?
 
 --
 H | Life is the art of drawing without an eraser. - John Gardner
   +
   Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
   Director of Internet Operations / SysAdmin. 800.441.3873 x130
   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
 
 
 
 

From the manual, Chapter 3. Configuration
 


When using PHP as an Apache module, you can also change the configuration 
settings using directives in Apache configuration files and .htaccess 
files (You will need AllowOverride Options or AllowOverride All 
privileges)

With PHP 3.0, there are Apache directives that correspond to each 
configuration setting in the php3.ini name, except the name is prefixed 
by php3_.

With PHP 4.0, there are several Apache directives that allow you to 
change the PHP configuration from within the Apache configuration file 
itself. 


php_value name value
This sets the value of the specified variable.

php_flag name on|off
This is used to set a Boolean configuration option.

php_admin_value name value
This sets the value of the specified variable. Admin configuration 
settings can only be set from within the main Apache configuration files, 
and not from .htaccess files.

php_admin_flag name on|off
This is used to set a Boolean configuration option.

 
-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: .htaccess login id

2002-02-18 Thread David

Mohamed Ismail Bulale said something on 19 Feb 2002, in php.general:

 
 To get username and password with php, use this below code:
SNIP
 Best regards,
 
 Bulale

Or you could use the varibles $PHP_AUTH_USER  $PHP_AUTH_PW 
$PHP_AUTH_TYPE. 

http://www.php.net/manual/en/features.http-auth.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: htaccess

2001-09-21 Thread Richard Lynch

Read php.ini
Search for engine

I think you can only turn it off, not on, in .htaccess as your ISP
wouldn't want you to be able to turn it on if they turned it off in the
first place...

Actually, the whole engine directive may be httpd.conf only, not .htaccess

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Php List [EMAIL PROTECTED]
Newsgroups: php.general
To: php [EMAIL PROTECTED]
Sent: Friday, September 21, 2001 3:22 PM
Subject: htaccess


 Hi,
 I heard it was possible to turn off/on php execution in a directory using
 the .htaccess file.
 Can some one tell me how to do that?

 Thanks.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: htaccess php

2001-08-09 Thread Richard Lynch

Also make sure you are running PHP as a Module and not CGI.

You can't do HTTP Authentication from inside PHP under CGI.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Chris Kay [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Wednesday, August 08, 2001 6:49 PM
Subject: htaccess  php



 Hi

 My question is that i am about to start a database and i have been asked
to
 make the login/password like htaccess, now they also want to be able to
 modify passwords ect so i was going to do it with mysql.

 I have seen or been told that there is something where you can use sql/php
 and  make it use something that look like htaccess but is not.

 is this true?

 if so where would i start looking for something along these lines..

 Answers/Comments welcome



 
  Chris Kay - Tech Support - IDEAL Internet
 email: [EMAIL PROTECTED] phone: +61 2 4628  fax: +61 2 4628 8890
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: htaccess php

2001-08-08 Thread Inércia Sensorial

  Here:

  http://hotwired.lycos.com/webmonkey/00/05/index2a.html?tw=programming

--


  Julio Nobrega.

2B||!BB - That's the question.

Chris Kay [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hi

 My question is that i am about to start a database and i have been asked
to
 make the login/password like htaccess, now they also want to be able to
 modify passwords ect so i was going to do it with mysql.

 I have seen or been told that there is something where you can use sql/php
 and  make it use something that look like htaccess but is not.

 is this true?

 if so where would i start looking for something along these lines..

 Answers/Comments welcome



 
  Chris Kay - Tech Support - IDEAL Internet
 email: [EMAIL PROTECTED] phone: +61 2 4628  fax: +61 2 4628 8890
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: .htaccess

2001-07-24 Thread Jeremy Maziarz

Jon,

Try $REMOTE_USER

-Jeremy
Email: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]