WAMP and https

Why is this important? It looks like the BluePrint-Q preview is broken on the WordPress themes directory: https://wordpress.org/themes/blueprintq-draft/ Turns out that some assets are expecting to be loaded through http, but the theme directory is using https, which is causing the unpleasant layout. So, this is something I want to debug locally. Out of the…

Increasing your upload limits

You may have issues with your hosting provider when uploading large images, typically more than 2MB.  That size can handle small images and icons, but nothing significant like audio, PDFs, etc.  To get around this, you can usually increase the size limit.  You do this by going into your php.ini file (or user.ini for cPanel/Plesk) and…

A call stack for PHP

So, I’ve not come across any useful tool, like VisualStudio, that has an interactive callstack.  Next best thing?  This function from PHP: debug_print_traceback.

Give it a go.  Besides just a bunch of echo/die statements, you might want to use debug_print_traceback to help identify from where a common function is called.

Odd SSL forcing

I’ve been with my wife at the hospital today and have been working on the BluePrint-Q Tones while she rests.  Inbetween sessions, exactly one of the websites that I develop on localhost stopped loading properly.  I saw a ton of errors like this in the browser console: GET https://localhost/tbs/wp-content/plugins/bpq.banners/bpq.banners.css?ver=1.4 net::ERR_CONNECTION_REFUSED Eventually realized that all of…

Benchmarks on WAMP 2.5

WAMPServer is the tool that I use to develop websites locally.  It is made up of three distinct technologies – Apache, MySQL, and PHP. I recently upgraded from WAMP 2.4 (Apache 2.4.4, MySQL 5.6.12, PHP 5.4.12) to WAMP 2.5 (Apache 2.4.9, MySQL 5.6.17, PHP 5.5.12).  At the time, I was developing an application with an AJAX…

Tips using phpDocumentor

I built a batch file that understands how to generate the documentation for my project.  Here are some points that I think are noteworthy for future reference: When using a batch file (instead of just going through a command-line), ensure that we call pear before phpdoc.  Evidently, this sets up some variables that phpdoc requires.…

Installing PEAR on Windows 8

PEAR is the PHP Extension and Application Repository.  It’s basically an add-on to PHP that has a bunch of frameworks that are available.  You can read more about it at the official site. Getting PEAR onto my system was not obvious.  I came across two articles that helped quite a bit: http://www.steptoinstall.com/install-pear-wamp-server-windows-7-8.html http://phpraxis.wordpress.com/2010/06/12/installing-and-configuring-pear-on-wampserver/ Although I…

Fatal error: Maximum function nesting level of ‘100’ reached

That’s the error I got when using Visual Composer’s Posts Grid element on a long and involved post.  It did not happen when displaying the post through the single.php or archive.php templates – only the Visual Composer element. After some searching, I came across this as a workaround: http://stackoverflow.com/questions/8656089/solution-for-fatal-error-maximum-function-nesting-level-of-100-reached-abor   Basically, it turns out that…

PHP multiple inheritance

Was double-checking this today and confirmed that PHP does not support derivation from multiple classes.  But worthy of writing this article was a new construct introduced in PHP 5.4: traits. Traits mostly remind me old-school C pre-processor #define calls.  So, I can do something like this: Mix this with inheritance and interfaces – wow! Official…