Yii Framework Forum: [EXTENSION] Yii Debug Toolbar (1.0.x version) - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] Yii Debug Toolbar (1.0.x version) Rate Topic: -----

#1 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 11 January 2010 - 02:17 AM

This extension is very useful in the development stage of project. It helps you to get info about PHP environment, application, queries logs, benchmarking with a simple little toolbar at the top of the page.

It is a recreated Symfony's developer toolbar.
First idea and very first implementation was my, but this version mostly implemented by Eduard Kuleshov.

This version tested for 1.0.x branch of Yii Framework.

Work for 1.1 branch is doing (maybe it will need to full rewrite code).

You can download it from these places:
* http://www.yiiframew...ion/yiidebugtb/
* http://code.google.c.../downloads/list
http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
2

#2 User is offline   r.vas 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 22-December 09

Posted 11 January 2010 - 03:10 AM

generally it works on 1.1.0

under php5.3 requires some minor modifications.
Dev: Win+Wamp (php_5.3.0, mysql_5.1.36, apache_2.2.11)
Prod: Debian (php_5.3.1, mysql_5.1.41, nginx)
---and i'm a total noob
0

#3 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 11 January 2010 - 03:20 AM

View Postr.vas, on 11 January 2010 - 03:10 AM, said:

generally it works on 1.1.0

under php5.3 requires some minor modifications.


Which modifications we need to make to work this extension on the PHP 5.3? You can send me to "kuznecov.sg@gmail.com" and I can commit it to code.google.com.
http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
0

#4 User is offline   robregonm 

  • Expert Yii Developer
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 595
  • Joined: 30-July 09
  • Location:Colombia

Posted 11 January 2010 - 08:49 AM

Hello,
Congratulations, excelent extension, I've tested with Yii 1.1.0 and PHP 5.3 and it's working like a charm. No problems 'til now.
Gr8 extension.
Ricardo Obregón

YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/ - https://1server.co/
PHP 5.5+, nginx 1.7, MySQL(MariaDB & PerconaDB), PostgreSQL 9, Yii 2, CanJS
Follow me: @robregonm & @obregonco & @1ServerCo.
0

#5 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 11 January 2010 - 09:11 AM

View Postrobregonm, on 11 January 2010 - 08:49 AM, said:

Hello,
Congratulations, excelent extension, ...
Gr8 extension.


Thanks!

View Postrobregonm, on 11 January 2010 - 08:49 AM, said:

...I've tested with Yii 1.1.0 and PHP 5.3 and it's working like a charm. No problems 'til now. ...


Hmm...

That's sounds like I am the only one looser! :) On my Mac OS X 10.6.2, Apache/2.2.14 (Unix), PHP 5.3.1 I have an error:

Fatal error: Class 'CErrorEvent' not found in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 251


I think that it could be possible because of late static binding in PHP 5.3, but I'm not sure.
http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
0

#6 User is online   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,898
  • Joined: 04-October 08
  • Location:DC, USA

Posted 11 January 2010 - 10:15 AM

This is great!

The 'CErrorEvent' error is caused by some PHP strict notices. For example,

formatArrayAsHtml and yiiAppAsArray are called statically while they are not declared so.
Also, CLogRoute::collectLogs() signature is changed in Yii 1.1.
0

#7 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 11 January 2010 - 10:45 AM

View Postqiang, on 11 January 2010 - 10:15 AM, said:

This is great!
...


Thank you very much! I'm proud that project leader says this words about this little extension! :)

View Postqiang, on 11 January 2010 - 10:15 AM, said:

...
The 'CErrorEvent' error is caused by some PHP strict notices. For example,

formatArrayAsHtml and yiiAppAsArray are called statically while they are not declared so.
Also, CLogRoute::collectLogs() signature is changed in Yii 1.1.


Thank you very-very-very much! You show me the right way to solve this task! There are was few problems like these:

macdi:yiidebugtb cr0t$ php XWebDebugRouter.php 
PHP Strict Standards:  Declaration of yiiDebugDB::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 251

Strict Standards: Declaration of yiiDebugDB::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 251
PHP Strict Standards:  Declaration of yiiDebugTrace::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 272

Strict Standards: Declaration of yiiDebugTrace::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 272
PHP Strict Standards:  Declaration of yiiDebugTime::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 284

Strict Standards: Declaration of yiiDebugTime::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 284
PHP Strict Standards:  Declaration of yiiDebugMem::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 297

Strict Standards: Declaration of yiiDebugMem::getInfo() should be compatible with that of yiiDebugClass::getInfo() in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 297
PHP Fatal error:  Class 'CLogRoute' not found in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 439

Fatal error: Class 'CLogRoute' not found in /Users/cr0t/Workspace/com.site/protected/extensions/yiidebugtb/XWebDebugRouter.php on line 439


But I can see they only when try to run from command line (apache logs was not so talkative :( ).

I'm commit fixes to code.google.com project and also update downloads section at the extensions.

Now it working with Yii 1.1 and PHP 5.3 without errors.
http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
0

#8 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 26 January 2010 - 05:01 AM

Extension updated:
Fixed horizontal scroll, removed borders from yiidebugpanel, fixed fonts for yiidebugpanel.

You could download fixed version here: http://www.yiiframew...rdersfix.tar.gz
http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
0

#9 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 09 May 2010 - 02:24 PM

Hello,

Is it possible to change position of the toolbar e.g. to bottom, right, left?

I have couple toolbars and need to fit both :)

Thanks,
CoLT
0

#10 User is offline   Chris83 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 440
  • Joined: 27-February 10
  • Location:Helsinki, Finland

Posted 12 May 2010 - 05:14 PM

Great extension! Good work. :)
Best regards,
Chris

My contribution to the Yii community:
Account | Yiistrap | Auth | Bootstrap | NordCms | Rights | LESS | SEO | Img

Follow me:
Twitter | GitHub | Bitbucket
0

#11 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 12 May 2010 - 06:04 PM

This is really good. I'm using it

One thing I noticed in the docs is that it says to include the application.extensions.yiidebugtb.* in the autoload config. You actually do not need to do this if you simply directly reference the XWebDebugRouter class in the config like so:
					array(
						'class'=>'application.extensions.yiidebugtb.XWebDebugRouter',
						'config'=>'alignLeft, opaque, runInDebug, fixedPos, collapsed, yamlStyle',
						'levels'=>'error, warning, trace, profile, info',
					),

http://php-thoughts.cubedwater.com - my bloggings about Yii
0

#12 User is offline   mauricioschneider 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 152
  • Joined: 16-August 10
  • Location:Santiago, Chile

Posted 23 October 2010 - 10:29 AM

Thank you for your work, it's working flawlessly.
0

#13 User is offline   Sarfraz Sarwar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 19-December 10

Posted 27 December 2010 - 02:55 AM

Hi all,

I am new at yii, basically new at any framework in php. I cannot get the yiidebugtb to work. I have followed all the instructions but am still not able to see the dialog box.

details
PHP Version 5.3.1
yii-1.1.5
yiidebug-1.0.x-1.1.x-trace-fix

Kindly help me. I dont know what I am missing

Regards,
Sarfraz
0

#14 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,358
  • Joined: 12-October 09
  • Location:Croatia

Posted 27 December 2010 - 03:07 AM

As you wrote that you are new... have you created a new webapp with yiic?

If you did... can you post here your config... (protected/config/main.php)
Find more about me.... btw. Do you know your WAN IP?
0

#15 User is offline   eval 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 85
  • Joined: 25-November 08
  • Location:Athens - Greece

Posted 18 January 2011 - 08:11 AM

Suggestion: In the array of allowedIPs add also the ::1 ipv6 address assigned to localhost. Had to dump the $app->request->getUserHostAddress() from inside the extension to check why i couldn't see the toolbar.


So, if anyone face problems seeing the toolbar try adding ::1 to this list.

Cheers
0

#16 User is offline   prchakal 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 20-January 10

Posted 21 January 2011 - 01:37 PM

I have enabled the extension, but i dont see nothing on my page.

How to use it?
0

#17 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 21 January 2011 - 01:41 PM

View Postprchakal, on 21 January 2011 - 01:37 PM, said:

I have enabled the extension, but i dont see nothing on my page.

How to use it?

Did you configure allowIPs array in the config file? And if you did that and don't see anything at all, check your local ip address (check previous to yours post in this thread).
http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
0

#18 User is offline   Borales 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 10-July 10
  • Location:Ukraine, Poltava

Posted 16 May 2011 - 07:11 PM

Hi! Can you add info from the code below? (CDbConnection#getStats)
CDbConnection::getStats()

And maybe some more info about DB?

Thanks in advance
0

#19 User is offline   kokomo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 289
  • Joined: 23-July 10

Posted 19 June 2011 - 12:21 PM

Found a small bug in the sessionAsArray() function.

At the moment the session detail outputs the session Data keys with one missing letter at the start of the session key
PHP:
  Key: 'd02e100655545c339f4ff0fb76506e2'
  Data: 	
      _id: '1' // should be __id
      _name: 'kokomo' // should be __name
      eg_date: '2011-01-16 23:41:38' // should be reg_date


public static function sessionAsArray()
...
 foreach ($_SESSION as $key=>$value)
 {
   if (is_null($sessKeyLen))
   {
	$values['PHP']['Key'] = substr($key, 1, strpos($key, '_')-1);
	// actual code
	//sessKeyLen = strlen($values['PHP']['Key'])+2;
	// correct code
	sessKeyLen = strlen($values['PHP']['Key'])+1; // +1 instead of +2
   }
   $phpSession[substr($key, $sessKeyLen)] = $value;
 }
...


Sorry that I post the bug here but I don't use GitHub so I don't have an account.
0

#20 User is offline   Sergey Kuznetsov 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 93
  • Joined: 16-February 09
  • Location:Russia, Saratov

Posted 19 June 2011 - 12:50 PM

Thank you, fixed.

View Postkokomo, on 19 June 2011 - 12:21 PM, said:

Found a small bug in the sessionAsArray() function.
...

http://summercode.com - Just an info page.
http://wiki.summercode.com/ - Many articles and tips about programming, patterns, language, SCMs, server administration and other stuff.
http://careers.stack...ergey-kuznetsov - CV page.
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users