NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
howto profile Drupal based site?


Joined: 18 Feb 2008
Posts: 6
Reply with quote
I am trying to profile the Drupal based site that I have installed on my local machine (WAMP). I followed the instructions and created a project and set to use the 3rd party server. When I clicked on the Run Profiler button the first page (index.php) located at http://localhost/drupal5/index.php is being profiled. But when I click on any link in the output window, the profiler is not working. I beleive it is because the subsequent links do not have DBGSESSID variable appended to it. I tried to copy the part after ?DBGSESSID=394965797178800001;d=0,p=1,c=0 and still its not working. How can I make the urls automatically append with the debug session variables. BTW: I also tried to use the Debug toolbar and it didnot work either. I also tried to search the forum for any help on instruction on how to setup the drupal based site with phped but none showed up. I would appreciate your help in setting up the PhpED for drupal based site. Thanks in advance for your cooperation.
View user's profileFind all posts by satynosSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
Quote:
But when I click on any link in the output window, the profiler is not working. I beleive it is because the subsequent links do not have DBGSESSID variable appended to it

No. Debugger should not append anything to the URLs on your pages. It may send DBGSESSID cookie if you allowed it to do so. Only if this cookie is set, profiling will continue upon further clicks on the links pointing to the same domain (localhost in your case).
To allow this you need to check "Debug Session" in the debugger settings.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
howto profile Drupal based site?


Joined: 18 Feb 2008
Posts: 6
Reply with quote
dmitri: Thanks for the quick response.

The debug session option in the settings window has been checked, but the profiler is not working past the first page. I also selected Run Profiler along with the Debugger option and hit on the Run in Debugger option, still it isnt working (its not even opening the profiler window in this case). Any thoughts on how to configure the settings to make drupal based site work. As a matter of fact, i tried to run phpbb3 and wordpress, but either one works past the first page.

Also just before posting this page, when I tried to run the profiler, even the first page is not showing any profiler output (its blank) but the Output window shows the page.

BTW: I also have APC installed, do you think this is causing the problem?

Thanks in advance.
View user's profileFind all posts by satynosSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
if Debug Session option was checked, DBGSESSID would be with c=1 flag, not with c=0.
Quote:
BTW: I also have APC installed, do you think this is causing the problem?

sure, it bypassed the profiler.
If you need to profile php code, comment out all php caches and restart web server.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Feb 2008
Posts: 6
Reply with quote
dmitri wrote:
if Debug Session option was checked, DBGSESSID would be with c=1 flag, not with c=0.
Quote:
BTW: I also have APC installed, do you think this is causing the problem?

sure, it bypassed the profiler.
If you need to profile php code, comment out all php caches and restart web server.


I did double check the debug session option and it is checked, still c=0 is showing. But when I did manually change the c=1 in the url, all the successive calls have been profiled. Thanks for the headsup. Do you know why the debug session option is not being effective in the settings window. (C is for cookie, P is for profiler and what is D stand for in the URL?)

Also you mentioned that the php opcode extensions should be uninstalled, does it apply to the php version installed on my WAMP stack or is it in the php version that comes with phped?

Thanks for the feedback in advance. You are really being helpful.
View user's profileFind all posts by satynosSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
Quote:
what is D stand for in the URL?

it triggers debugger.

Quote:
Also you mentioned that the php opcode extensions should be uninstalled, does it apply to the php version installed on my WAMP stack or is it in the php version that comes with phped?


You need to uninstall or disable opcode cache if you want to work with debugger and profiler.
Suppose you've run a file without profiler with APC turned on (same goes to any other opcode cache). So the file is cached by APC as is, without debug info. Next time you try to run the same file with debugger or profiler, opcodes will be picked up from the cache and because they are produced without debug info, neither debugger nor profiler will work.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Feb 2008
Posts: 6
Reply with quote
I did double check the debug session option and it is checked, still c=0 is showing. But when I did manually change the c=1 in the url, all the successive calls have been profiled.
Do you know why the debug session option is not being effective in the settings window?
View user's profileFind all posts by satynosSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
Debug session turns on only if you run debugger. In other words, it works only together with flag d=1. I did not think that it's that useful to have profiler working for sessions. Nevertheless feel free to post feature request to the appropriate forum.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Feb 2008
Posts: 6
Reply with quote
dmitri wrote:
Debug session turns on only if you run debugger. In other words, it works only together with flag d=1. I did not think that it's that useful to have profiler working for sessions. Nevertheless feel free to post feature request to the appropriate forum.


dmitri: Thanks for following up so quickly. To be frank, this is the first time I am looking into debugging and profiling option for php. I am not quite sure how to debug but rather liked the profiling option as it shows the time it took for all the functions. At this point of time not knowing completely about debugging (particularly step over, step into and other stuff) what I am trying to acomplish is to look at profiler window next to the out put window for all the page requests that I do in the out put window, how can this be accomplished?

I will go through the material at your website about debugging and profiling 101. By any chance do you happen to know any weblink that points me to the right direction to start understanding about debugging?
View user's profileFind all posts by satynosSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
you can turn "stop on the first line after run" off (see debugger settings) and run debugger. It will run both profiler and debugger. If you don't have any breakpoints, it will work exactly the same way as if profiler were run alone, but sessions will be supported and you can click through all your site. Then check profiler history.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Feb 2008
Posts: 6
Reply with quote
dmitri wrote:
you can turn "stop on the first line after run" off (see debugger settings) and run debugger. It will run both profiler and debugger. If you don't have any breakpoints, it will work exactly the same way as if profiler were run alone, but sessions will be supported and you can click through all your site. Then check profiler history.


I did change the setting of stop on the first line after run and hit the run in debugger. It is showing the output window with all variables (d, p, c) as true, but for somereason profiler window and the debugger window are not showing up. just the out put window is showing. Any thoughts?
View user's profileFind all posts by satynosSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8335
Reply with quote
you can close profiler window and open it again using Tools->Show profiler

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
howto profile Drupal based site?
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