Nginx – Prevent Access to Debug file [closed]

I’ve frequently seen this used in Apache 2.2: <Files “debug.log”> Order allow,deny Deny from all </Files> but that’s deprecated in Apache 2.4: The Allow, Deny, and Order directives, provided by mod_access_compat, are deprecated and will go away in a future version. You should avoid using them, and avoid outdated tutorials recommending their use. I just … Read more

Easy code troubleshooting in wordpress

The best way to troubleshoot/debug your PHP code for WordPress is to use the XDEBUG debugger for PHP coupled with an IDE/editor that can leverage XDEBUG. By far my favorite IDE for PHP/XDEBUG is PhpStorm (best money I have ever spent), but you can use for free on the bleeding edge with their EAP (Early … Read more

How to Debug the ‘save_post’ Action?

Your code works just fine on my end. So, I’d say your problem is elsewhere. Troubleshooting guide. You can use standard debugging or FirePHP. I also use the following for cases where FirePHP doesn’t display information, i.e., save_post. function my_log( $msg, $title=”” ) { $error_dir=”/Applications/MAMP/logs/php_error.log”; $date = date( ‘d.m.Y h:i:s’ ); $msg = print_r( $msg, … Read more

Get list of scripts / styles and show file which enqueued them

This is not possible the way you think. It would maybe be possible if you use Reflections or debug_backtrace(), but there’s no reliable way to do this. WordPress does not keep a stack or queue where it tracks file names. The only thing I could imagine is just hooking into the action and inside wp_enqueue_scripts(): … Read more

Debug.log file is never created?

I found the problem. In the Apache server, inside the php.ini, the variable… track_errors = Off To get this information, you can do in a phpfile phpinfo();. So, to write the debug log file, you need to set track_errors as ‘On’.

Filtering custom taxonomies

This is not a tought quest, but you’d have to read carefully the Codex. Especially tax_query part of WP_Query. Your proposed query_posts call is wrong. This should look like this: query_posts( array( ‘post_type’ => ‘myportfoliotype’, ‘paged’ => $paged, ‘posts_per_page’ => 80, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, //or tag or custom taxonomy ‘field’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)