June 2007

TechCrunch: MySpace Likely To Open Platform To 3rd Party Developers

by damonp on June 30, 2007

in Uncategorized

MySpace Likely To Open Platform To 3rd Party Developers

Great! An application known for its buggy code and bloated site is going to open it up to third-party developers? With all of their attempts to block out existing widgets, who is going to want to code for these losers?

Why does it always seem like the class idiots end up beating us all in the end?

Popularity: 1%

{ 0 comments }

Coding on a Live Site

by damonp on June 29, 2007

in PHP,Security

I have written several times about debugging a live site and posted snippets for working on the themes of a live WordPress install. One trick I haven’t mentioned is using the PHP error log.

PHP on any production site should be configured to not display errors. I see all too often on random sites that PHP has been configured to show errors (sometimes even in Google results). This gives away too much information about your application and server.

On the servers and applications I work on all of the time, I configure PHP to log errors to /var/log/php_errors. Simply tailing this file through a console will quickly show any errors caused by the edits.

To enable logging, check these two variables in your php.ini:

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On
; Log errors to specified file.
;error_log = filename
error_log = /var/log/php_errors

To tail the log file from an SSH console:

tail -f /var/log/php_errors

Popularity: 1%

{ 0 comments }

Exim Queue Snippets

28 June 2007

These are all useful when trying to track down an open formmail script. List bounce messages exiqgrep -f ‘^<>$’ Freeze bounce messages exiqgrep -i -f ‘^<>$’ | xargs exim -Mf Freeze messages from user@domain.com exiqgrep -i -f user@domain.com| xargs exim -Mf Find out what user your webserver runs as. Use this as the email address [...]

Read the full article →

Bookmarklet For emailURL.com and anonURL.com

27 June 2007

I created the two URL shortening services: emailURL.com and anonURL.com several years ago as a side project to support another side project. It’s a great service that allows you to create short URLs that don’t break in email messages. How many times has someone replied to an email saying the link you provided doesn’t work. [...]

Read the full article →

Recursive Chmod Tricks

27 June 2007

Recursively chmod only directories find . -type d -exec chmod 755 {} \; Similarly, recursively set the execute bit on every directory chmod -R a+X * The +X flag sets the execute bit on directories only Recursively chmod only files find . -type f -exec chmod 644 {} \; Recursively chmod only PHP files (with [...]

Read the full article →

Outlook Express Uses 100% CPU

26 June 2007

Windows users, please don’t use the Inbox in Outlook Express as a repository to store years of mail. I was recently called out to a client’s site to debug several email issues. Errors sending mail, errors receiving mail, this folder cannot be displayed. After Googling a few of the error messages I found most of [...]

Read the full article →

Grep Replace and Word Processing

25 June 2007

I spend so much time in a text editor, its hard to get my head around a word processor sometimes. Text and formatting at the same time? Moving some content around I found myself with a ton of links formatted in an unordered list. I only needed the plaintext of the name and link separate [...]

Read the full article →

Bootp Session Transmit Error

25 June 2007

Has anyone seen this error on a MacBook before: Apr  3 15:16:10 Phoebe configd[35]: DHCP en2: INIT transmit failed Apr  3 15:16:10 Phoebe configd[35]: bootp_session_transmit: bpf_write(en2) failed: No buffer space available This is a real pain in the ass when it happens. The only thing that seems to fix it is to reboot. The only [...]

Read the full article →

WordPress Bug – Theme Reverts to Default Theme

23 June 2007

I have been working on a new WordPress theme for this site and have noticed on several occasions that WordPress has reverted back to the default theme. Google turned up a few helpful pages: WordPress Theme Resetting Problem posted by Scott Burkett WordPress defect #3907 The problem boiled down to the fact that I was [...]

Read the full article →

Zencart Hack – Logout Customer Automatically After X Failed Payment Attempts

22 June 2007

Credit card slamming is the practice of trying hundreds or thousands of card numbers and security code combinations to find the few in the batch that will actually work. I have discussed credit card slamming here and over at the ZenCart forums several times in the past. The code snippet below can be used in [...]

Read the full article →