Enter Amount:

Latest Forum Posts

Login Form






Lost Password?
No account yet? Register
Discussions
Welcome, Guest
Please Login or Register.    Lost Password?
wp-pear-debug wordpress plugin (0 viewing) 
Wordpress plugin discussions
Go to bottom Post Reply Favoured: 0
TOPIC: wp-pear-debug wordpress plugin
#88
admin (Admin)
Admin
Posts: 72
graph
User Online Now Click here to see the profile of this user
wp-pear-debug wordpress plugin 1 Year, 7 Months ago Karma: 2  
This thread discusses the Content article: wp-pear-debug wordpress plugin

Please download the latest version of the plugin here
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/08/29 17:21 By admin.
  The administrator has disabled public write access.
#130
admin (Admin)
Admin
Posts: 72
graph
User Online Now Click here to see the profile of this user
Re:wp-pear-debug wordpress plugin 11 Months, 3 Weeks ago Karma: 2  
New methods were added in to allow ease of implementation. All the background stuff dealing with getting the instance of the debug class is handled automatically.
Code: :

  wp_pear_debug::add(); wp_pear_debug::dump(); wp_pear_debug::error(); wp_pear_debug::queryRel();

 
Report to moderator   Logged Logged  
 
Last Edit: 2009/03/22 20:42 By admin.
  The administrator has disabled public write access.
#203
Squintz (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:wp-pear-debug wordpress plugin 2 Months, 3 Weeks ago Karma: 0  
I am trying to figure out how to use the Pearl :: Debug plugin for wordpress but can't seem to find any documentation for beginners.

What all do I need to do in order to log messages to this plugin?

I have it installed and working but I'm not sure what I need to add to my PHP _script_s to log information. I tried using your example but the include /php/debug.... portion of the code causes fatal errors because I don't have a /php/ directory.
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/12/19 00:41 By admin.
  The administrator has disabled public write access.
#204
admin (Admin)
Admin
Posts: 72
graph
User Online Now Click here to see the profile of this user
Re:wp-pear-debug wordpress plugin 2 Months, 3 Weeks ago Karma: 2  
Hi, you are not required to do any includes. As long as the plugin is installed and enabled, you can use the debug functionality as follows:

Code: :

                wp_pear_debug::add($variable);                 wp_pear_debug::dump($arrayvariable);                 wp_pear_debug::error($message);                 wp_pear_debug::queryRel($query);

 
Report to moderator   Logged Logged  
 
Last Edit: 2009/12/19 01:06 By admin.
  The administrator has disabled public write access.
#205
Squintz (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:wp-pear-debug wordpress plugin 2 Months, 3 Weeks ago Karma: 0  
I still don't understand. Here is what I have...

Code: :

  $pr_db_version "1.0"; function pr_db_install () {    global $wpdb;    global $pr_db_version; //Concat Wordpress DB prefix to table name and Assign Table Names to Variables    $pr_orders    $wpdb->prefix "pr_orders";    $pr_vendors   $wpdb->prefix "pr_vendors";    $pr_approvals $wpdb->prefix "pr_approvals";    $pr_items     $wpdb->prefix "pr_items";    wp_pear_debug::add($pr_orders);    //Check if pr_orders table already exist and create if not    if($wpdb->get_var("SHOW TABLES LIKE '$pr_orders'") != $pr_orders){       $sql "CREATE TABLE " $pr_orders " (       id mediumint(9) NOT NULL AUTO_INCREMENT,       time bigint(11) DEFAULT '0' NOT NULL,       name tinytext NOT NULL,       text text NOT NULL,       url VARCHAR(55) NOT NULL,       UNIQUE KEY id (id)     );";               wp_pear_debug::add($sql);        //dbDelta($sql);    } } register_activation_hook(__FILE__,'pr_db_install');



Yet when I look in the logs and messages I don't see the outputs of those variables. Where should they be?

While I got your attention. Any idea why using dbDelta with the above code causes my code to break. I am getting:

Code: :

  Fatal errorCannot redeclare pr_db_install() (previously declared in /wp-content/plugins/purchase-request/pr_main.php:18in /wp-content/plugins/purchase-request/pr_main.php on line 46

 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#206
admin (Admin)
Admin
Posts: 72
graph
User Online Now Click here to see the profile of this user
Re:wp-pear-debug wordpress plugin 2 Months, 3 Weeks ago Karma: 2  
The error states that you are trying to redeclare function pr_db_instal(). You have it declared on line 18 in your file and now in like 46 in the same file. As a result any code in this duplicated function will be ignored. This includes the debug directives. Hence the absence of your debug information in the debugger.
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/12/19 01:08 By admin.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop