CartMetrix - Do you know yours?

6/30/2007

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

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: 21%

6/29/2007

Coding on a Live Site

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: 26%

6/28/2007

Exim Queue Snippets

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 to key on. For example, my Apache runs as nobody so I want to freeze all messages sent from the user nobody@domain.com so I can look through them to see if I can deduce where the insecure formmail script is.

Delete frozen messages

exiqgrep -z -i | xargs exim -Mrm

Popularity: 27%

6/27/2007

Bookmarklet For emailURL.com and anonURL.com

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. In most cases its a matter of manually copying and pasting the parts of the link that were broken by the word wrapping. With emailURL.com its simple to create a short url that works everywhere.

I use these services every day but I never made it easy for someone else create shortened URLs. Today, I added a bookmarklet on both site’s home pages to facilitate usage.

To make it easy to integrate into other projects, I have built a SOAP API to call the create functions remotely. Stay tuned for more details after we complete beta testing.

Popularity: 12%

Recursive Chmod Tricks

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 extension .php)

find . -type f -name ‘*.php’ -exec chmod 644 {} \;

Popularity: 32%

6/26/2007

Outlook Express Uses 100% CPU

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 the fixes were directed at cleaning and rebuilding the Outlook Express default folders (Inbox, Sent Items, Deleted Items).

The basic steps are:

  1. Close Outlook Express 6
  2. Create a folder c:\temp (if it is not already there).
  3. Copy the contents of my “C:\Documents and Settings\Owner\Local Settings\Application Data\Identities\{YOUR_IDENTITY_STRING}\Microsoft\Outlook Express” to c:\temp
  4. Rename C:\Documents and Settings\{YOUR_IDENTITY_STRING}\Local Settings\Application Data\Identities\{YOUR_IDENTITY_STRING}\Microsoft\Outlook Express\inbox.dbx to inbox-old.dbx
  5. Open Outlook Express. It will create an empty Inbox and will show only one message “Welcome to Outlook Express 6″
  6. From the menu, open File->Import->Messages Choose Outlook Express
  7. Click Next
  8. Choose Import mail from an Outlook Express Identity and select your identity (Main Identity is the default)
  9. Click OK
  10. Browse to the folder c:\temp
  11. Click Next
  12. Choose Inbox
  13. Click Next
  14. Messages from your Inbox will be imported and appear in your new Inbox
  15. Click Finished

More information about the file corruption may be found at Microsoft.com

Popularity: 19%

Next Page »


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It