Execute Windows Commands from PHP without blocking

July 21st, 2007 by Aaron

When researching for my live error reporting posting, I tried running some exec and passthru command tests by starting up calc.exe. While they executed the command correctly, I got some weird results in my script … which I suppose now make sense. Lets see how we can start programs in Windows, and not run into the same issues that I did.

Continue reading Execute Windows Commands from PHP without blocking


Live Combined Error Reporting for Apache and PHP during Development

July 20th, 2007 by Aaron

So many times during development, I’ve missed little PHP errors because they were 1) on a processing page that was redirected or 2) output inside of a html tag - and rendered invisible. From time to time, I have to go back to my file system and check the php error log to see what happened. The first step to solving this was implimenting a custom error handler - which we did at (”the triangle”). But I’m torn on this: should the error handler script function the exact same during development as it does in production, or should we write two different error handlers. To keep the code as simple as possible and allow for scenario regeneration, I opted to have the error handler work the exact same way in development. Some might disagree, but thats not the point here. The issue was that I needed to watch the error log closer (I’m notoriously bad at not checking errors - see my previous post about error reporting…).

Another thing I knew would be nice to see would be the apache error log. As I’m not combining my error logs with php, I don’t often check the apache one. However, local mistakes can cause errors on the production server too.

Luckily, I was able to find a utility that made life easier - and of course - integrates into eclipse. Lets configure:

Continue reading Live Combined Error Reporting for Apache and PHP during Development


A Better Understanding of Error Reporting in PHP

July 19th, 2007 by Aaron

While working on a website for (”the triangle”), I came to a page running locally that just stopped - blank. This particular website was not using output buffering - so there is no excuse for a blank page. For whatever reason (laziness, stupidity, thursdayness), I haven’t checked my php.ini file for error reporting in the last few months… and for whatever reason a long time ago, I decided to go back to standard error reporting. Well unfortunately, this means months of developing has gone by on this particular set of websites that I was possibly missing errors (nevermind everything has successfully went through QA…hrm…) At any rate, I jumped out to PHP’s website - eager and ready to copy a quick fix for my error reporting issue. As I was getting ready to copy an error_reporting() line, I realized: I don’t fully understand what I want to do here…Well, thats never good - copying code and not fully understanding it… so lets fix this. Lets talk about error reporting.

Continue reading A Better Understanding of Error Reporting in PHP


Two New useful external tools for Eclipse

July 19th, 2007 by Aaron

In my posting about Integrating PHPDocumentor into Eclipse, I touched on External Tools a bit. The combination of external batch files, the external tools extra options and the console has made my life easier. I’m using two new additional batch files that I’ve written myself and integrated as external tools. These include automated SVN release update and resource refresh and Apache application control (for those who can’t run apache as a service on w32):

Continue reading Two New useful external tools for Eclipse


Eclipse Integration with Tortoise SVN

July 14th, 2007 by Aaron

I generally don’t like to be tied to a specific IDE when developing. Additionally, I like to have my choice in using tools to manage my source control (tortoisesvn, svn command line, etc). I just think this is the open-source way - it seems to be just a more free-spirited way of developing and managing projects. With this in mind, I’ve been looking for ways to integrate my SVN into my current IDE (Eclipse PDT) but not limit myself from accessing my SVN repositories from the file system. I’ve found a great plugin to help with this - so lets go over the specifics:

Continue reading Eclipse Integration with Tortoise SVN


Show the right files in PHP Explorer

July 11th, 2007 by Aaron

After I installed Eclipse PDT, I had two project navigators. I closed the native one and kept open the PHP Explorer. PHP Explorer showed my php, css, js, etc, files. It also puts a plus sign to the left of the filenames. Using this view, we can expand the file to see the classes and functions inside of the file without opening it.

The only issue was that, by default, I couldn’t see my .htaccess and .htpasswd files. On the bright side, using SVN, I couldn’t see my .svn folders - which is exactly what I wanted. Put, this put the issue into a different light - there must be some sort of filter that is restricting files that begin with a dot.

At the top of the PHP Explorer, there are a few toolbar buttons. Clicking the down arrow brings up a context menu. I choose the filters… menu item. By default, ‘name filter patterns’ was not checked. .* files and server projects were selected in the second box. This makes sense why I was not seeing my .htaccess file.

First, I unchecked my option .* files. This fixed the issue - I was able to see the .htaccess files - but I also saw my .svn folders as well as additional meta files.

I checked the box saying “name filter patterns” and put in the following string:

.cache, .settings, .svn, .project, .projectOptions

This seemed to do it for me.


The anatomy of a phishing attack - advanced technique

July 11th, 2007 by Aaron

So many phishing attempts lately are just purely pathetic - easy to guess and figure out, mis spelling and grammar issues and just poorly fashioned websites. Although these will work on the novice web surfer, can a clever criminal actually create a phishing site/scenario that can trap the experienced members in your IT department? In this article we’re going to take apart a phishing proof of concept attempt I created at (”the triangle”) (for privacy sake, however, I’m going to use another fake company as the example) which fooled (or at least surprised a good portion of the IT staff I showed it too).

Continue reading The anatomy of a phishing attack - advanced technique


The top 17 ways to help eliminate the Phishing threat

July 11th, 2007 by Aaron

The following is the result of a research project I had done about phishing. Its some best practices and suggestions based upon information from leading security professionals such as white hat security, McAfee, etc. A combination of e-mail security, authentication methods and corporate identity standards are among the suggestions… Here are the top solutions and methods of securing against Phishing:

Continue reading The top 17 ways to help eliminate the Phishing threat


Helpful strtotime reminders

July 11th, 2007 by Aaron

Today, Todd [one of the consultants that ("the triangle") uses] called me up to share a bit of a reminder and also tell me about an issue in the code that was in one of our older modules. There was an issue with the strtotime function converting a year to a timestamp.

I thought I’d take a few minutes to just outline strtotime examples again, as a reminder:

Continue reading Helpful strtotime reminders


Spell Checking in Eclipse PDT

July 9th, 2007 by Aaron

Although I’d like to pretend that my side jobs always are pure programming, but alas, not the case. There are times when the users send word docs to me and I have to convert them to html. Now, even these word docs might have spelling mistakes - but thats just not ‘acceptable’ to them - I should correct those issues too! Whats up with that? But anyway, I now have a good plugin to do spellchecking in eclipse - that won’t break on code (well not sorta…). This supports spell checking as you type, language specific options, and more. At any rate, lets check out eclipse’s built in spelling feature, and then see why this plugin I found is better: Continue reading Spell Checking in Eclipse PDT


©2008 102 Degrees LLC - All Rights Reserved Home Services Products Network Blog Open Source Learning Contact