Archive for the ‘Troubleshooting Tips’ Category

Troubleshoot problems can be difficult or it can be easy. It depends on the problem being troubleshooted, and the person trying to fix it.

The most common method to start the troubleshooting processes with is a simple Google search. Just search for the problem you are having, and chances are someone has already had the same problem and has posted it online.

The Google Search method might be useful for known problems, but what about finding logical problems in a PHP application? That situation is more tricky, and since it often doesn’t relate to problems that other people have had, you need to use your noggin’ – your critical thinking skills to solve those problems. Sometimes a simple “print” or “alert” statement can help solve your PHP and Javascript woes.

Solution: How to keep your PHP sessions open as long as possible

Keeping PHP Sessions open, or any sessions open regardless of what language you use, can be a pain. One of the most commonly asked questions is “How do I keep my sessions open for 30 days or more?”.

This is written from the perspective of PHP, but of course Cookies themselves can be manipulated from whatever server-side language you use to code your web application.

So if your users only stay logged in for a few hours, maybe a a couple of days at the most, and you want them to stay logged in much longer, continue reading.

The main reason this method works is because it doesn’t rely on PHP to keep the session, and sessions on the server tend to get cleared out, which is probably the most common reason for users having to login again. Rather than rely on PHP garbage collection to work properly, you take control of a secondary session that you store yourself. When the primary login check fails (depends on your application), you check the secondary session against your own records, and if you find a match, you can auto-login the user, returning control to the PHP session itself. You can choose to be seamless about the whole process, or you can present your user with one of those unnecessary messages saying “Please wait while we find your account…”. (more…)

jQuery: AJAX File Uploads made easy

jQuery is an incredible Javascript library. It allows programmers, as well as other web developers with less programming experience, to develop high-end Javascript and AJAX features on their websites. Many situations require or benefit from software written from scratch, but other situations do not. For most Javascript functionality, writing your code from scratch isn’t worth it or necessary, and that’s where jQuery comes in. jQuery isn’t necessarily easy. The more customization you want, the more specific your requirements, the longer it will take you to get it right. But even if you have the time and experience, jQuery doesn’t do everything for you.

Many people are curious about how to perform a full AJAX file upload using jQuery. Some users have noted that HTML 5 supports AJAX file uploads, however most websites aren’t written in fully support HTML 5. Other users have also shown exactly how to do this using methods such as hidden iframes, and a Javascript XMLHttpRequest() object.
(more…)

Windows 8 apps running in the background, using memory and CPU when they are not supposed to?

Microsoft has touted their new Metro Apps as a key feature of Windows 8. Metro Apps have a bit of a mixed reputation. On one hand, they provide some much overdue features to the Windows line. On the other hand, they don’t really live up to the hype, and in many instances they are useful only because of other software shortcomings.

But Microsoft has given one claim to Windows 8 Metro Apps that, until today, I found to be true. (more…)

Windows 8 Metro Apps: Compensating for other problems

Windows 8 apps can be very useful, but their reputation and usefulness is mixed.

After a few months of using Windows 8, I find that one of the main reasons Windows 8 Apps are useful is because of shortcomings in other software.

For example, we want to use Windows 8 apps to play streaming music like Pandora, or to look at Facebook. But those are pretty lame reasons to develop and use a whole new App platform. I mean, those are already available in a format called “the web” and accessible using something called a “web browser.” So why do we prefer the apps over the web versions? In these cases, the Apps trump the web-based version simply because of computer resources. Having a browser open just for Pandora can drain battery and hurt performance, and the same applies for many other programs and web services. (more…)

jQuery .load() complete callback function doesn’t work properly

jQuery’s .load() method supports an optional callback function called when the request is complete. However, you might find that the complete callback function doesn’t work properly.

The jQuery .load() documentation shows 2 optional arguments to the .load() method.

The first optional argument is “data”, which is described as “A plain object or string that is sent to the server with the request.”

The second optional argument is “complete”, which is described as “A callback function that is executed when the request completes.”.

The examples on that page present some confusion, by showing this example:


$('#result').load('ajax/test.html', function() {
alert('Load was performed.');
});

The problem with that example is that the “complete” callback function is shown as the 2nd argument, not the 3rd. (more…)

How to improve Windows 8 Battery Life

Windows 8 battery might be worse than Windows 7 for some users (read more) but regardless of the reason, you’re probably reading this article because you want to improve battery life on your Windows 8 laptop or tablet.

There are a variety of angles you can attack this problem from, but you need to start by considering what is taking up your battery life to begin with:

Hardware

Most likely culprits: Your LCD Display, old battery

Other likely culprits: Wifi, Bluetooh, Hard drive(s), memory

Software

Most likely culprits: Software that came with your PC, start-up garbage

Other likely culprits: Open programs, system clogged with temporary files

Working through the problems

So let’s start at the top, and work through the problems (more…)

Microsft Excel Error: SYLK Error – “The file you are trying to open…is in a different format than specified by the file extension”

Do you ever see this error when trying to open up CSV files in Microsoft Excel?

  • “The file you are trying to open, ‘filename.csv’, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?”

And upon clicking “Yes” you receive another error message:

  • Excel has detected that ‘test.csv’ is a SYLK file, but cannot load it. Either the file has errors or it is not a SYLK file. Click OK to try to open the file in a different format.

(more…)

Google Sitelinks: Customize the subpages which appear in the Google search results

For websites that come up in a Google search, you might notice that sometimes Google displays links directly to a few subpages of the site. This is usually about 2-6 subpages.

It’s kind of a mystery as to how Google chooses which subpages to display, and many people wonder “How can I choose which subpages Google displays?”

That’s not an easy answer, but we’ll give you a few hints: (more…)

What is my IP address? A better tool for a smarter developer

The rule? Simplify.

When searching for your IP address, you usually just do a Google search for “what is my IP address” and pick one of the top results. For quite a while now, Google has been displaying your IP address right in the results for that search, which makes it much easier.

But what if looking up your IP address is something you do constantly, daily or weekly?

And what if you need to look up the IP address programmatically, lets say via PHP or even Javascript? (more…)

BuddyPress Bug: After De-Activating BuddyPress, my website is blank and broken. What do I do?

BuddyPress is a fantastic addition to WordPress, but as with any software it comes with some caveats. We recommend you install BuddyPress on it’s own WordPress installation, separate from your primary website, not only to protect your primary website, but because it’s safer to give BuddyPress full reign over it’s own installation.

If you need to De-Activate BuddyPress, be sure to Activate a different Theme prior to De-Activating BuddyPress.

If you don’t do this, you might notice your site goes blank – and is completely broken after you De-Activated BuddyPress. This is obviously a big problem, and a terrible bug. But it’s one that can be easily fixed by switching to a different Theme, and then switching back. (more…)