473,662 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3474
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.n etwrote:
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************ **********@q69g 2000hsb.googleg roups.com>,
ZeldorBlat <ze********@gma il.comwrote:
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.n etwrote:
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.n etwrote:
> 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.n etwrote:
ZeldorBlat a écrit :
On Jun 20, 10:50 am, Laurent ARNAL <laur...@clae.n etwrote:
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_modu le>
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 "^Dreamweav er-WebDAV-SCM1" redirect-carefully
BrowserMatch "MSIE" AuthDigestEnabl eQueryStringHac k=On
</IfModule>
</IfModule>
</IfModule>
</IfModule>
Jun 20 '07 #5
In article <11************ **********@n60g 2000hse.googleg roups.com>,
shimmyshack <ma********@gma il.comwrote:
<IfModule dav_module>
<IfModule dav_fs_module>
<IfModule setenvif_module >
<IfModule authn_file_modu le>
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 <Locationbloc k.

And, by the way, in that context, i don't see the point of using a
"<LimitExce pt 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...@boleski ne.patpro.netwr ote:
In article <1182358276.836 460.256...@n60g 2000hse.googleg roups.com>,

shimmyshack <matt.fa...@gma il.comwrote:
<IfModule dav_module>
<IfModule dav_fs_module>
<IfModule setenvif_module >
<IfModule authn_file_modu le>
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 <Locationbloc k.
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
"<LimitExce pt 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************ *********@o61g2 000hsh.googlegr oups.com>,
shimmyshack <ma********@gma il.comwrote:
And, by the way, in that context, i don't see the point of using a
"<LimitExce pt 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...@boleski ne.patpro.netwr ote:
In article <1182359802.321 460.10...@o61g2 000hsh.googlegr oups.com>,

shimmyshack <matt.fa...@gma il.comwrote:
And, by the way, in that context, i don't see the point of using a
"<LimitExce pt 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************ **********@k79g 2000hse.googleg roups.com>,
shimmyshack <ma********@gma il.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
360
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 control the display of xml file. However, I want to assume the user is authenticated in the directory where I have the haha.xml file. Yet, the user would not be able to see the content of the xml file as below ie) When some one type ...
1
3786
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? thanks!! document.onselectstart=new Function ("return false");
1
465
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="#" onclick='window.open("test.asp",null,"height=500,width=500,status=no,toolbar=no,menubar=no,location=no");'> open new win</a>
8
2458
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
2260
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
2136
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" href="comments/">Show Comments</a>
8
3697
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I disable the right mouse button? ----------------------------------------------------------------------- The oncontextmenu intrinsic event is the only safe and reliable method. Of the other approaches often presented, most depend on an alert box interrupting the process and rarely work. Note that oncontextmenu is a non-standard event and is not...
2
5926
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 completely. Specifically I don't want to see text slowly moving across screen on some stupid web sites. I assume they're all done with setInterval(). Is there a way to disable that in any browser? Thanks. Yong Huang
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8856
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.