pdf How to install a webdav server in PHP
Par keyphrene, Thursday 27 August 2009 à 08:51 :: Webdav server in PHP :: #9 :: rss
How to install a webdav server in PHP
It's very simple.
- Download this package, and decompress it.
- The
inc
folder contains PEAR and the HTTP_WebDAV_Server class. - Copy the
inc
folder andauthenticate.php
file in the include_path (see php.ini) - Copy
webdav.php
file in the root of your site. - Create Table with Fileserver.sql for the lock and unlock operations of the WebDAV server module.
The authenticate.php
file contains a digest authentification or You can replace this function with a simple .htacess.
The webdav.php
file create a webdav server
To read authenticate.php
<? include_once("authenticate.php"); ini_set("error_reporting", ""); # umask(2); # Activate if your PHP is CGI mode $phpcgi = 0; # With authentication $AUTHWEBDAV = 1; # Name of your restricted area $realm = 'Restricted area Keyphrene'; $DBHOST= "your host database"; $DB_WEBDAV = "your dbname to lock webdav"; $DBUSER = "your login"; $DBPWD = "your password"; $users = array($DBUSER => $DBPWD); # Remove $AUTHWEBDAV section if you use .htacess file for authentication. if ($AUTHWEBDAV == 1) { # With this authentication method, # your password is not readable when you use this service AuthenticationDigestHTTP($realm, $users, $phpcgi); # With method your password is hashed # AuthenticationBasicHTTP($realm, $users, $phpcgi); # With method your password is clear } require_once "HTTP/WebDAV/Server/Filesystem.php"; $server = new HTTP_WebDAV_Server_Filesystem(); # Database configuration for the lock method $server->db_host = $DBHOST; $server->db_name = $DB_WEBDAV; $server->db_user = $DBUSER; $server->db_passwd = $DBPWD; # Real path of your site $server->ServeRequest($DOCUMENT_ROOT."/www/"); ?>
To use this service, you must connect you at this adress http://mysite.org/webdav.php. You can configure a lot of access on your site. Becareful, if you must copy files on your server, you must use the good permissions with the FTP client.
Test your webdav connection with Naja, so create a signet

Now, you can browse on your server with a webdav client
Bookmarks

Comments
1. Le Tuesday 3 October 2006 à 09:32, par matemago
2. Le Tuesday 3 October 2006 à 20:13, par keyphrene
3. Le Wednesday 11 October 2006 à 17:23, par Johannes
4. Le Wednesday 11 October 2006 à 20:41, par keyphrene
5. Le Thursday 12 October 2006 à 15:42, par Johannes
6. Le Thursday 12 October 2006 à 20:26, par keyphrene
7. Le Friday 13 October 2006 à 12:36, par Johannes
8. Le Friday 13 October 2006 à 20:20, par keyphrene
9. Le Friday 13 October 2006 à 20:38, par keyphrene
10. Le Sunday 21 January 2007 à 09:01, par Remco Janssen
11. Le Sunday 21 January 2007 à 10:17, par keyphrene
12. Le Wednesday 2 May 2007 à 07:11, par anonymous
13. Le Sunday 6 May 2007 à 16:16, par keyphrene
14. Le Tuesday 19 June 2007 à 09:56, par Donny Kurnia
15. Le Thursday 12 July 2007 à 06:28, par Standalone
16. Le Wednesday 18 July 2007 à 07:46, par diyism
17. Le Thursday 26 July 2007 à 07:49, par diyism
18. Le Thursday 26 July 2007 à 16:59, par ligesh
19. Le Sunday 26 August 2007 à 07:38, par keyphrene
20. Le Sunday 28 October 2007 à 05:06, par callous
21. Le Thursday 6 December 2007 à 20:55, par Aldo
22. Le Wednesday 19 December 2007 à 15:46, par Zarhi
23. Le Monday 18 February 2008 à 10:36, par Thomas
24. Le Saturday 23 February 2008 à 17:16, par troggi
25. Le Monday 17 March 2008 à 15:20, par keyphrene
26. Le Monday 17 March 2008 à 15:35, par keyphrene
27. Le Saturday 26 July 2008 à 09:19, par keyphrene
28. Le Wednesday 13 August 2008 à 17:56, par keyphrene
29. Le Wednesday 3 September 2008 à 17:58, par Otto
30. Le Friday 5 September 2008 à 09:03, par Simon
31. Le Friday 5 September 2008 à 17:20, par keyphrene
32. Le Monday 3 November 2008 à 16:40, par Alfones
33. Le Monday 3 November 2008 à 19:48, par keyphrene
34. Le Tuesday 4 November 2008 à 08:32, par Alfones
35. Le Tuesday 4 November 2008 à 11:17, par keyphrene
36. Le Tuesday 4 November 2008 à 12:17, par Alfones
37. Le Tuesday 4 November 2008 à 12:47, par keyphrene
38. Le Tuesday 4 November 2008 à 14:47, par Alfones
39. Le Tuesday 4 November 2008 à 19:06, par Alfones
40. Le Tuesday 4 November 2008 à 19:42, par keyphrene
41. Le Friday 5 December 2008 à 07:43, par wsch
42. Le Friday 5 December 2008 à 08:01, par keyphrene
43. Le Thursday 5 March 2009 à 10:31, par JT
44. Le Thursday 5 March 2009 à 17:57, par keyphrene
45. Le Thursday 5 March 2009 à 21:28, par JT
46. Le Friday 6 March 2009 à 05:51, par keyphrene
47. Le Monday 23 March 2009 à 16:13, par Nick-Q
48. Le Monday 23 March 2009 à 18:46, par keyphrene
49. Le Tuesday 24 March 2009 à 08:21, par Nick-Q
50. Le Tuesday 24 March 2009 à 16:04, par Nick-Q
51. Le Thursday 26 March 2009 à 15:36, par keyphrene
52. Le Sunday 19 July 2009 à 18:27, par Nico
53. Le Sunday 19 July 2009 à 20:04, par keyphrene
54. Le Wednesday 16 September 2009 à 10:51, par Aj
55. Le Wednesday 16 September 2009 à 20:47, par keyphrene
56. Le Tuesday 3 November 2009 à 09:20, par forbi
57. Le Wednesday 4 November 2009 à 09:44, par keyphrene
58. Le Wednesday 4 November 2009 à 14:33, par forbi
59. Le Thursday 5 November 2009 à 09:24, par keyphrene
60. Le Thursday 5 November 2009 à 09:43, par forbi
61. Le Thursday 5 November 2009 à 12:03, par keyphrene
62. Le Thursday 5 November 2009 à 13:13, par forbi
63. Le Thursday 5 November 2009 à 13:43, par keyphrene
64. Le Monday 9 November 2009 à 12:26, par forbi
65. Le Wednesday 11 November 2009 à 09:12, par keyphrene
66. Le Friday 13 November 2009 à 09:24, par forbi
67. Le Saturday 14 November 2009 à 08:52, par keyphrene
68. Le Thursday 19 November 2009 à 04:47, par joe
69. Le Thursday 19 November 2009 à 09:16, par keyphrene
70. Le Friday 18 December 2009 à 19:58, par Ken
71. Le Saturday 19 December 2009 à 09:46, par keyphrene
72. Le Thursday 7 January 2010 à 16:59, par joe
73. Le Thursday 7 January 2010 à 17:35, par keyphrene
74. Le Friday 8 January 2010 à 01:04, par joe
75. Le Friday 8 January 2010 à 07:14, par keyphrene
Add a comment