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…)
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 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…)
The official word on Windows 8 battery life is that it is improved over Windows 7 battery life.
The first reason for this is that the Windows 8 core uses less RAM than Windows 7.
The second reason is that Windows 8 Metro Apps do not run in the background. Rather than consuming resources when they aren’t in the foreground, they are essentially paused in the background.
While both of those claims appear to be true, the overall claim that Windows 8 battery life is improved may not be completely true, and if in fact battery life is worse on Windows 8, it may also not be Microsoft’s fault. (more…)
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:
Most likely culprits: Your LCD Display, old battery
Other likely culprits: Wifi, Bluetooh, Hard drive(s), memory
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…)
Facebook Apps: Do you care?
That just about sums up what people think of them.
When Facebook Apps debuted many people were confused. People began asking “Why do these apps exist?” “and What can I do with these apps?”.
But then something happened. The apps became crap, and people started asking a different question: “Why are these apps so dang annoyng?” and “How can I use Facebook but ignore all this App garbage?”. (more…)
Finding analogies for programming is very important for training programmers, for communicating to other programmers, to communication to customers and end-users, and to help a programmer’s understanding of their own code and goals for their code.
One thing to remember about analogies: They always brake down. An analogy is a “comparison” – and all comparisons will fall apart eventually, unless the things being compared are identical. In other words, at some point the comparison falls apart because the two subjects are different. This is okay, because we are just using this “comparison” mechanism for learning and understanding, we are not using this comparison to make the plans for the next space shuttle.
Example: A car needs new wiper blades, brake pads, and tires. And just the same, a web application or other application needs some basic maintenance.
How do I disable Webalizer?
Webalizer is a program which analyzes and generates statistics and reports about your webserver’s logs. It can be massively useful or it can be massively problematic. Very large log files can cause problems, and webalizer itself can cause problems even when not configured to process any log files.
Because of this it’s often necessary to disable it from running, as it can cause your server to hang.
1) Uninstall – Webalizer is a package which you can view in Webmin. Login to Webmin and click System > Software Packages and search for “webalizer”. You can uninstall webalizer completely from here.
2) Disable Cron – If you just want to disable it from running without uninstalling it, remove the cron entry under /etc/cron.daily – it may be called “00webalizer”.
A queue, in our context, is a way of lining up requests, and having a program that processes those. Basically, it’s a way of saying “do this later”. It might still be done immediately, but for a variety of reasons it may not happen immediately. The purpose of the queue may not to be “do it later”, but that will happen regardless. The purpose of a queue can be anything from fixing a performance problem, to preventing performance spikes, to delaying a request a minimum amount of time or a number of other reasons. (more…)
Crons can solve a lot of problems, but they can also create a lot of problems so be careful.
Usually you’ll make a cron to fix a specific problem, or to create a queue. There aren’t a whole lot of “standard” crons that we can discuss. (more…)