473,325 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Disable .php handler for a specific browser,

Hi,

I would like to know if there is a way to remove/disable .php handler
when the request come from a specific Browser.

I ask this because I use dreamweaver / webdav to edit my .php files.
But when I try to open the .php file in dreamweaver, what I see if the
result of the .php executions, not the .php source files.

I know that you can create an Alias location "/dav", and disable the
..php handler for this location. It's a solution, but not the best I
think. It would be better if we can disable .php runtime where
dreamweaver Get the files.
Laurent.
Jun 20 '07 #1
9 3457
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.netwrote:
Hi,

I would like to know if there is a way to remove/disable .php handler
when the request come from a specific Browser.

I ask this because I use dreamweaver / webdav to edit my .php files.
But when I try to open the .php file in dreamweaver, what I see if the
result of the .php executions, not the .php source files.

I know that you can create an Alias location "/dav", and disable the
.php handler for this location. It's a solution, but not the best I
think. It would be better if we can disable .php runtime where
dreamweaver Get the files.

Laurent.
So what would happen when I go to your website using Dreamweaver?
Should I be able to see all your PHP code?

Jun 20 '07 #2
In article <11**********************@q69g2000hsb.googlegroups .com>,
ZeldorBlat <ze********@gmail.comwrote:
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.netwrote:
Hi,

I would like to know if there is a way to remove/disable .php handler
when the request come from a specific Browser.

I ask this because I use dreamweaver / webdav to edit my .php files.
But when I try to open the .php file in dreamweaver, what I see if the
result of the .php executions, not the .php source files.

I know that you can create an Alias location "/dav", and disable the
.php handler for this location. It's a solution, but not the best I
think. It would be better if we can disable .php runtime where
dreamweaver Get the files.

Laurent.

So what would happen when I go to your website using Dreamweaver?
Should I be able to see all your PHP code?
sounds great ;)

What you should do is setup an https webdav repository in an apache
alias directory, and disable php parsing for this alias. This is the
only secure way to do what you want.

patpro

--
http://www.patpro.net/
Jun 20 '07 #3
ZeldorBlat a écrit :
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.netwrote:
> Hi,

I would like to know if there is a way to remove/disable .php handler
when the request come from a specific Browser.

I ask this because I use dreamweaver / webdav to edit my .php files.
But when I try to open the .php file in dreamweaver, what I see if the
result of the .php executions, not the .php source files.

I know that you can create an Alias location "/dav", and disable the
.php handler for this location. It's a solution, but not the best I
think. It would be better if we can disable .php runtime where
dreamweaver Get the files.

Laurent.

So what would happen when I go to your website using Dreamweaver?
Should I be able to see all your PHP code?
Hum,

Good questions... !
Perhaps also use some sort of control access, so it only disable the php
runtime if I access with dreamweaver from the local network.
laurent.
Jun 20 '07 #4
On Jun 20, 4:16 pm, Laurent ARNAL <laur...@clae.netwrote:
ZeldorBlat a écrit :
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.netwrote:
Hi,
I would like to know if there is a way to remove/disable .php handler
when the request come from a specific Browser.
I ask this because I use dreamweaver / webdav to edit my .php files.
But when I try to open the .php file in dreamweaver, what I see if the
result of the .php executions, not the .php source files.
I know that you can create an Alias location "/dav", and disable the
.php handler for this location. It's a solution, but not the best I
think. It would be better if we can disable .php runtime where
dreamweaver Get the files.
Laurent.
So what would happen when I go to your website using Dreamweaver?
Should I be able to see all your PHP code?

Hum,

Good questions... !
Perhaps also use some sort of control access, so it only disable the php
runtime if I access with dreamweaver from the local network.

laurent.
have you enabled the web_dav apache module?

<IfModule dav_module>
<IfModule dav_fs_module>
<IfModule setenvif_module>
<IfModule authn_file_module>
DavLockDB "/path/to/tmp/DavLock"
Alias /webdav "/path/to/your/files"

<Directory "/path/to/your/files">
Dav On
Order deny,allow
Deny from all
Allow from xxx.xxx.xxx.xxx
AuthName DAV-upload

# /path/to/htpasswd -b /path/to/htpasswd.webdav user
AuthType Basic
AuthUserFile "/path/to/htpasswd.webdav"

<LimitExcept GET HEAD OPTIONS>
require valid-user
</LimitExcept>
</Directory>
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
</IfModule>
</IfModule>
</IfModule>
</IfModule>
Jun 20 '07 #5
In article <11**********************@n60g2000hse.googlegroups .com>,
shimmyshack <ma********@gmail.comwrote:
<IfModule dav_module>
<IfModule dav_fs_module>
<IfModule setenvif_module>
<IfModule authn_file_module>
DavLockDB "/path/to/tmp/DavLock"
Alias /webdav "/path/to/your/files"

<Directory "/path/to/your/files">
Dav On
.../..

I think I would rather write <Location /webdavinstead of <Directory
"/path/to/your/files">, and embed a "AddType text/html .php" into
the <Locationblock.

And, by the way, in that context, i don't see the point of using a
"<LimitExcept GET HEAD OPTIONS>" block to ask for authentication.

patpro

--
http://www.patpro.net/
Jun 20 '07 #6
On Jun 20, 5:59 pm, patpro ~ Patrick Proniewski
<pat...@boleskine.patpro.netwrote:
In article <1182358276.836460.256...@n60g2000hse.googlegroups .com>,

shimmyshack <matt.fa...@gmail.comwrote:
<IfModule dav_module>
<IfModule dav_fs_module>
<IfModule setenvif_module>
<IfModule authn_file_module>
DavLockDB "/path/to/tmp/DavLock"
Alias /webdav "/path/to/your/files"
<Directory "/path/to/your/files">
Dav On

../..

I think I would rather write <Location /webdavinstead of <Directory
"/path/to/your/files">, and embed a "AddType text/html .php" into
the <Locationblock.
you could use
RemoveHandler .php
and so on for other types.
And, by the way, in that context, i don't see the point of using a
"<LimitExcept GET HEAD OPTIONS>" block to ask for authentication.
i think it's so that browsers can see the content without being asked
for credentials, whereas any agent which tries to use other verbs will
be required to authenticate. but explain your objection - I have been
wrong before!!!
patpro

--http://www.patpro.net/

Jun 20 '07 #7
In article <11*********************@o61g2000hsh.googlegroups. com>,
shimmyshack <ma********@gmail.comwrote:
And, by the way, in that context, i don't see the point of using a
"<LimitExcept GET HEAD OPTIONS>" block to ask for authentication.

i think it's so that browsers can see the content without being asked
for credentials, whereas any agent which tries to use other verbs will
be required to authenticate. but explain your objection - I have been
wrong before!!!
if you want to protect your code, you need to activate the
authentication for every verb.

patpro

--
http://www.patpro.net/
Jun 20 '07 #8
On Jun 20, 11:17 pm, patpro ~ Patrick Proniewski
<pat...@boleskine.patpro.netwrote:
In article <1182359802.321460.10...@o61g2000hsh.googlegroups. com>,

shimmyshack <matt.fa...@gmail.comwrote:
And, by the way, in that context, i don't see the point of using a
"<LimitExcept GET HEAD OPTIONS>" block to ask for authentication.
i think it's so that browsers can see the content without being asked
for credentials, whereas any agent which tries to use other verbs will
be required to authenticate. but explain your objection - I have been
wrong before!!!

if you want to protect your code, you need to activate the
authentication for every verb.

patpro

--http://www.patpro.net/
thats not the case, since for GET HEAD ther server parses and doesnt
realease code. Wheras for the common webdav verbs this is not the
case:
* PROPFIND
* PROPPATCH
* MKCOL
* DELETE
* PUT
* COPY
* MOVE
* LOCK
* UNLOCK

Jun 20 '07 #9
In article <11**********************@k79g2000hse.googlegroups .com>,
shimmyshack <ma********@gmail.comwrote:
if you want to protect your code, you need to activate the
authentication for every verb.
>
thats not the case, since for GET HEAD ther server parses and doesnt
realease code. Wheras for the common webdav verbs this is not the
case:
* PROPFIND
....

WebDAV uses "GET" to retrieve files, so if Apache parses your code on
"GET", your WebDAV is useless as a mean to access and edit your code.

patpro

--
http://www.patpro.net/
Jun 21 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raymond Cheung | last post by:
How do I disable to show xml file content on web browser from across domain. I know we can have some sort of enbcription on the xml file content. I also know that we can use authentication to...
1
by: Matt | last post by:
I want to disable context menu bar in browser, and I do the following by copying a code in net, it is working though, but I just don't understand what is new Function here means, can anyone advise?...
1
by: jrefactors | last post by:
Even there is no status bar and toolbar, refresh still happens in the background. Is there any way to disable refresh feature in browser?? Winopentest.html <html> <body> <a href="#"...
8
by: Ken Yu | last post by:
Hi, How can i disable "RightClick Menu" in Internet Explorer, when access the frontpage ? tks a lot ! Ken
1
by: Gidi | last post by:
Hi, Is it possible to Disable editing of one specific cell in one specific row in dataGrid? Thanks, Gidi.
4
by: eggie5 | last post by:
I have this even handler (using prototype.js): showCommentsLinks.observe('click', function(event) { alert('hi') }); It's attaching to a link element: <a id="showCommentsLink"...
8
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? -----------------------------------------------------------------------...
2
by: yong321 | last post by:
My question is not about Javascript programming. I'd like to use a browser, either IE or Firefox or whatever, that allows me to disable a specific Javascript function but not disable Javascript...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.