Do you have GD and the PHP GD extension installed and yet it's not getting loaded into your PHP? If you getting the following error logged to your php error log, then the source of the problem is simple.
In an earlier post I explained how to do Ternary shorthand if/else statements in PHP. One of the major benefits of using a shorthand if/else statement is that you can use it inline with a string. But what if you only need to do in inline if statement, without the else?
If you make use of the code analyzer available in many modern IDE environments when coding strictly to PHP5 standards, you may have noticed that you will get errors thrown at you for using variables before they are declared in included files. For example, lets say you have two files, header.php and index.php.
Today I modified my blog topic listing layout from just a simple link list to a more traditional blog style with a summary for each topic. It was a major improvement but I felt that it was a little too bland and decided that thumbnails of the videos and images contained within each topic would make it more appealing.
I decided to add the previous post & next post navigational links that you see at the top of this page for more internal cross-links as well as an easier means to browse posts. I went to type up the code really quick and had a temporary "coding block." So naturally I check google for a quick answer and found a few results of people asking for the same thing but no posted solution that I could see.
No matter what languages you program in, chances are you have uses for regular expressions. Even though they comprise of only simple operators and switches, it can can be very tough to memorize how to properly harness the power of regular expressions. This is where these cheat sheets come in handy!
This error popped on one of my clients website and it got me stumped. Through SSH, the DNS seemed to work fine. I could run host domain.com, curl, wget, etc - but when php would try to load the url, it failed with the above error. I tried setting different DNS resolver servers, restarted services, and checked for config errors but could not find the source of this problem. So I then turned to google.
In PHP you have the ability to pass information between pages through the URL. This technique is extremely simple and great for things such as telling a script what bit of information is needs to load (example: a forum topic).
Any programmer will agree that the IF/ELSE statements are a fundamental part of any language. The basic syntax is pretty universal between languages but many dont realise that there is a shorthand version that allows switching to be done inline.