NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHPEd and Apache 1.3.28 with MOD_DAV remote debugging enable


Joined: 18 Dec 2003
Posts: 4
Reply with quote
hi,

i use the evaluation version of PHPEd and a remote installation of Apache 1.3.28 with PHP 4.3.4 using MOD_DAV on a RedHat Linux Machine.

in httpd.conf I put in the following for Authentication and ForceType text/plain to open and "smart up/download" php script files.

<Directory />
Options FollowSymLinks
DAV On
AuthType Basic
AuthName "PHP Development Workspace"
AuthUserFile /usr/local/apache/htdocs/.htpasswd
Require user root nobody
Options FollowSymLinks
ForceType text/plain
</Directory>

In this case verything seems to be ok, but when I try to "preview" formerly called "execute" the script I allways get the the source of the script. When I comment out the "ForceType" Directive I can execute the php scripts but I can't edit it or smart "up/download" it, because I allways get the result of the script which is executed. that's terrible ... Twisted Evil

Hey is there anyone here who has the same problem ? I need help for this problem because it's a little confusing. Next step I try to integrate debugging on this site, but first i have to solve this problem ...

best regards

rudolf


Last edited by RWallner on Fri Dec 19, 2003 6:26 am; edited 1 time in total
View user's profileFind all posts by RWallnerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It's a common gotcha.
You have to create a separated virtual host for WEB DAV.
Otherwise it will interfere the way you described.
It happens because both WEB DAV and HTTP use HTTP/GET command to get source or html results respectively.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Apache Virtual Server Configuration


Joined: 18 Dec 2003
Posts: 4
Reply with quote
ah,

i will try this ... the result must be, that i configure the mod_dav account on one Virtual Server on port 80 with ForceType text/plain and the other is like it is , the original web server for preview and test the result of php scripting ... that's logical for me .. thx

I post the configuration solution later ...

regards

Rudolf
View user's profileFind all posts by RWallnerSend private message
wow ... this works cool


Joined: 18 Dec 2003
Posts: 4
Reply with quote
hi,

now i have configured the apache web server for source x-change on port 81 and the preview on standard port 80. on port 81 is authentication for DAV over .htpasswd file enabled... that's Laughing now i can configure the rights for authoring. thats very confortable ...

thanks for helping to solve my problem, next i try to configure the remote debugging session for PHPEd. Anything is important for configuration ...

best regards

rudolf
View user's profileFind all posts by RWallnerSend private message
debugging is cool


Joined: 18 Dec 2003
Posts: 4
Reply with quote
Hi,

I have configured the apache server now for DAV protocol and remote debugging and everythings run's fine. here's a little workaround what to do and how to configure the php.ini [debugger] section .

first installing apache, next installing php with-apxs=/usr/local/apache/bin/apxs option and sigchild
install mod_dav with-apxs option

edit /usr/local/apache/conf/httpd.conf and put/change the following lines:



Listen 80 # for preview mode
Listen 192.168.0.1:81 # for DAV and smart up/download source projects




LoadModule php4_module libexec/libphp4.so
LoadModule dav_module libexec/libdav.so





User nobody
Group nobody








DAVLockDB /usr/local/apache/var/DAVLock
DAVMinTimeout 1200




<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>














NameVirtualHost 192.168.0.1:81

<VirtualHost 192.168.0.1:81>
ServerName 192.168.0.1:81
DocumentRoot /usr/local/apache/htdocs
<Directory />
Options FollowSymLinks
DAV On
AuthType Basic
AuthName "PHP Development Workspace"
AuthUserFile /usr/local/apache/htdocs/.htpasswd
Require user root nobody
Options FollowSymLinks
AllowOverride None
ForceType text/plain # show script source
</Directory>
AddType application/x-httpd-php .php .php4 .php3 .phtml .html .xml .xsd
</VirtualHost>


Save this file - restart apache - create an account in PHPEd for DAV Access to this website. Don't forget to define Port 81 to "ForceType text/plain", because you don't see the source if you don't do this Smile) in Mapping Section define the Root URL to Port 80, this is the preview site and defined without "ForceType text/plain" ... cool this works





downloading debugging extensions for php on linux, they are named like
dbg-2.14.10-Linux-i386.tar.gz or
dbg-2.14.10-Linux-i686.tar.gz

tar -ztvf dbg-2.14.10-Linux-i386.tar.gz
extract the content of this tar - archive in an OS folder

here you see the different debugging modules for different php version from 4.0.6 thru 4.3.3. If you use 4.3.4 use the debugging module from 4.3.3 instead ... it works fine on RedHat and SuSE

dbg-2.14.10-Linux-i386/
dbg-2.14.10-Linux-i386/dbg.so-4.0.6
dbg-2.14.10-Linux-i386/dbg.so-4.1.0
dbg-2.14.10-Linux-i386/dbg.so-4.1.1
dbg-2.14.10-Linux-i386/dbg.so-4.1.2
dbg-2.14.10-Linux-i386/dbg.so-4.2.0
dbg-2.14.10-Linux-i386/dbg.so-4.2.1
dbg-2.14.10-Linux-i386/dbg.so-4.2.2
dbg-2.14.10-Linux-i386/dbg.so-4.2.3
dbg-2.14.10-Linux-i386/dbg.so-4.3.0
dbg-2.14.10-Linux-i386/dbg.so-4.3.1
dbg-2.14.10-Linux-i386/dbg.so-4.3.2
dbg-2.14.10-Linux-i386/dbg.so-4.3.3

copy the debugging version into the extension folder to your php installation in my case thats /usr/local/lib/php/extensions - rename the file to dbg.so

edit php.ini on location /usr/local/lib

search for the line "extension_dir=..." and edit the line like this

extension_dir="/usr/local/lib/php/extensions/"

now search for Dynamic Extensions Section some pages down and load the following debugging module

extension=dbg.so

now go to the bottom of the page and insert the following lines for debugger configuration

[debugger]
; ================================
; Remote Debugging Configuration
; ================================
debugger.enabled=true
debugger_profiler.enabled=true
debugger.hosts_allow=localhost,127.0.0.1,myhost,192.168.0.10
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16


now save this file and restart apache - configure PHPEd for Remote debugging ... all its fine now ...

maybe this helps in some cases to configure PHPEd with apache/php/dav on a linux box with remote debugging enabled

have a nice christmas and freedom on earth

best regards

rudolf (rednose) Very Happy Idea
View user's profileFind all posts by RWallnerSend private message
PHPEd and Apache 1.3.28 with MOD_DAV remote debugging enable
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic