Someone's got to go first... |
DBG Tips |
Site Admin
|
Yeah, thank you Chris for your clear explanations and performing my work
Now few words about how it works with PhpED. I) PhpED comes with set of pre-compiled dbg modules for different php versions. So, the line loading dbg module should include php version, for example if you have php 4.3.2 installed it should be:
or if you run it under Linux
II) PhpED comes with commercial version of DBG and therefore it supports some more features, including for example IP security layer. So, you can enable it by setting two lines debugger.hosts_allow and debugger.hosts_deny. For example if you run debugger from two client machines which IP addresses are 192.168.1.10 and 192.168.1.11 you can add the following:
To "list" all IP addresses you can use either mask or partial IP, for example 192.168.1.10/255.255.255.0 or 192.168.1.*. You can use there host names, domain names and so forth. For detailed syntax see man pages for TCP_WRAPPERS (hosts_allow(5)). NOTE: deny=ALL means "mostly protected" policy, all hosts are denied until they are explicitly allowed in the allow line. III) If you debugged a script, got resulting HTML page and want to continue debugging after your submitted a new page from this one, you should keep cookies enabled and make sure that
IV) If you want to start debugging a page (b) resulted as a submit from a different one (page a) you can start debugging page a, press Run In Debugger once again to finish it up, then press submit button or make another action on your page to make a submit and PhpED should automatically add debugger request, regardless you use external browser or embedded one. This functionality relies on HTTP cookies only. V) Normally, you can just run your page in PhpED by simply pressing "Run In Debugger". But sometimes it's interesing to make an explicit debugging request from a page. In this case you can add DBGSESSID variable using one of the following forms V.a)
V.b)
V.c) you run your script as, for example:
VI) If you want to order DBG not to start debug session in case when it normally starts, you'd add -1 as a session id, for example "DBGSESSID=-1". No other stuff should be there, no clienthost, no 7869. VII) If you are running your site otside of your local IP space, for example when your address is 192.168.1.10 while IP address of your server is normal Internet IP, you'd tune your NAT and firewall to enable dbg module running on server to have an access to dbg listener running on your client machine. For example, it NAT runs on 192.168.1.1 you'd add there NAT rule as follows:
Anyway, before doing it, please consult with your network administrator regarding security risks. Best regards, Dmitri. |
||||||||||||||||||||||||||||
|
PHP gets stuck |
|
I've got a problem..
I've downloaded both PhpEdit and DBG alone, but none of the DBG DLLs work. When I add the line "extension=php_dbg.dll-4.3.2.dll" or "extension=php_dbg.dll", php just stops working and any attempt to run a PHP file through IIS will result in a script timeout For the matter, adding an extension line with a nonexistent DLL name causes the same thing.. I'm using PHP 4.3.2 (windows installer) and IIS on W2K, if that helps. Please help.. :/ - Gauche |
||||||||||||
|
|
Update!
I was running the program from the terminal server so I didn't see the msgboxes. It appears that PHP showed me msgboxes and that's why there was a timeout. Here are the error messages: If I add "extension=php_dbg.dll" I get: unknown(): Unable to load dynamic library 'c:\php\php_dbg.dll' - The specified procedure could not be found. If I add "extension=php_dbg.dll-4.3.2.dll" I get: unknown(): Unable to load dynamic library 'c:\php\php_dbg.dll-4.3.2.dll' - Access is denied. (note that IUSR does have permission for c:\php) Now hear this. After I renamed php_dbg.dll-4.3.2.dll to php_dbg.2.dll, it seems to load fine! But it's not over. Now I can't find any editor that can work nicely with DBG. PHPedit works partially the first time (it traces, but it doesn't show me array variables and won't let me add watches) but the next time I try debugging a file (reload), it reports: "File embedding doesn't work!". Here's what the listener says after the second time I try debugging 20/07/2003 17:57:11 Different version (2.04) of IDE CoClass, 2.11.23 expected 20/07/2003 17:58:16 10.0.0.150 client connected 20/07/2003 17:58:16 Listener is started 20/07/2003 17:58:20 Failed to initialize instance of IDE CoClass {D55B5E5E-B97E-4B88-A808-6FB7E337EA13}. OSERR (0x80010108) 'The object invoked has disconnected from its clients.'. (I did get more error messages before I took the DBG package from this site, copied it to the DBG subdirectory and re-registered it with regsvr32) |
||||||||||||
|
Site Admin
|
DBG has has 8)never8) been called php_dbg.dll-4.3.2.dll
Obviously you mistyped. It should be php_dbg.dll-4.3.2 Regarding PHPEdit, I don't know why it does not show arrays. I'm sure it's a kind of front-IDE problems. At least according to message logs, that particular version of PHPEdit expected DBG 2.04.xx instead of 2.11.xx. Seems, it's mostly outdated. Please contact marms for details. I don't know why you don't see any IDEs that work with DBG. NuShere PHPEd does work. Believe you or not DBG 2.14.9 shipped with the most recent version of this IDE shares the same variable serializer as DBG 2.11.23, so if there was any problem with arrays in 2.11.23 the same problem would be with PHPEd too. You can try and make sure that PHPEd does work fine. |
||||||||||||
|
extension_dir |
|
Do not forget to set the directory where you have your extension dlls in your php.ini:
extension_dir = "C:\php\extensions" Default is empty, and PHP will not find any of them unless you specify the full path when loading the DLL. |
||||||||||||
|
Someone's got to go first... |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by