Enable mail() PHP, on OSX Leopard

I found this here: http://jspr.tndy.me/2008/05/php-mail-and-osx-leopard/ Credit goes to him:

There are 4 files I used for the following:

  • /etc/hostconfig
  • /etc/postfix/main.cf
  • php.ini (this could be anywhere depending on your installation, mine’s in /usr/local/php5/lib/)
  • /var/log/mail.log
firstly, sudo nano -w /etc/hostconfig and add the following line:
MAILSERVER=-YES-
then sudo nano -w /etc/postfix/main.cf, find the myhostname variable (by default it’s host.domain.tld), uncomment it and change it to your domain (if you’re on a machine that doesn’t have a DNS, you can make it a domain that you’re responsible for so that it doesn’t get shut down at the receiving end, but please don’t make it google.com or something like that!)

now, open php.ini and look for the sendmail_path variable, uncomment it, make its value sendmail -t -i, save then restart apache. I’m not really sure if this is 100% necessary as there’s a comment above that says this is the default value anyway, but it can’t hurt!

now open a terminal window and execute the next couple of commands:

% sudo postfix start
% tail -f /var/log/mail.log
finally, create a file called mail.php (or whatever!) and add the following to it:
<?php
mail(
  'you@yourdomain.com', // your email address
  'Test', // email subject
  'This is an email', // email body
  "From: Me <me@mydomain.com>rn" // additional headers
);
?>
obviously replace you@yourdomain.com with your email address and me@mydomain.com with a valid email address (domain at least, as some mail servers will bounce your email if the sender’s domain isn’t real). Now navigate to your mail.php file (likely http://localhost/mail.php) and watch your terminal window to see that it’s been sent successfully. If it hasn’t, let me know if you fixed it and I’ll update this – it’s annoying to me that there isn’t really an answer to this question that I can find so the more comprehensive this is, the more helpful!.

How To: Setup Virtual Hosts on OS X

http://mark-kirby.co.uk/2008/setting-up-virtual-hosts-on-os-x-leopard/

Copyright your Art, Writing, intellectual Property (IP)

Overview:

As a web developer or a website owner its important to know the the laws and processes you can perform, to protect your online work from being copied, plagiarized.

Reality Check:

It is impossible to prevent it from occurring, but you can take precautions and make life harder for those that would attempt to illegally take your work.

How To Protect your:

  • General:

    • Paid:
      • U.S. Copyright: File your work with the U.S. Copyright Dept.
      • Lizard Lock: (Untested) Lizard Lock provides a service that will achieve:
        • pdf security, flash security, html security, ebook security, elearning security, and software copy control.  Stop copying, prevent printing, and control the sharing of your documents, ebooks, training courses, and web content. Protect documents inside and outside your organization, and instantly revoke access to your secure information at any stage.
      • Copysentry: An online service that for a monthly fee compares your work against what is on the web and alerts you if it finds matches.
  • Writing:

    • Online services you can use:
      • Free:
        • Google Alert: With Google Alerts you can specify keywords (things that pertain to your works) and when Google finds articles online that match those words, you receive an email alert notifying you about new content online that it. You can then read the pages provided and if there is an issue you can proceed as appropriate.
        • Digital Container: Digital container provides a secure method of selling, and distributing your content. However it enforces a few extra steps for your customer which you may want to take into consideration.
  • Photography, Art, Images, Graphics:

    • Image:
      • Upload a lower resolution image, so that it won’t look that good when printing.
      • Embed a water mark: Here is a great tutorial on how to do a water mark in Adobe Photoshop as well as how to automate it.
      • Use a flash image gallery.
    • Web Technology:
      • Prevent “Right Click”: disable the right click making it hard for users to copy the image.
        • Add this to your websites HTML BODY tag:   <body oncontextmenu=”return false;”>
  • Website:

    • Add copyright to the bottom of your page in one of the following forms:
      • (c) Name 2001
      • Copr. Name 2001
      • Copyright Name MMI
If you have other ideas about what can be done please post them here.

Convert DVD to mp4 for Free with HandBrake

If you need to convert videos to mp4, mkv or avi. Use HandBrake: http://handbrake.fr/?article=download

Its great for getting those videos converted.

Open Source Video Compression w/ Film Redux

The need to compress video continues to grow.However so does the number of programs that help you do this… but why pay. Open source is your friend.

Instructions for the future, as there is a problem right now : Follow this blog to see about updates and progress.

http://forums.macrumors.com/showthread.php?t=584869&page=3

If you own a mac and have xcode installed. Go here: http://transcoderredux.svn.sourceforge.net/viewvc/ then click film redux, scroll to the bottom, download the tar ball.

After that extract the contents. Navigate to /transcoderreduc/FilmRedux/FilmReduc.xcoderproj

Double click it, let XCode start. Then click build and Go.

You will then find the program @ ( /transcoderreduc/FilmRedux/build/Release/filmredux) which you can then move to your applications directory.

Writing a website proposal

PopStalin on : Some good thoughts on developing a website proposal. http://blog.popstalin.com/articles/business/writing-a-website-design-proposal

CakePHP & Database Migration for Teams

Joes Moss @ http://developwithstyle.com. Has put together this fantastic little script that virtually acts like version control for your cakephp databases.

Optimal for teams that need to be synce up: http://github.com/joelmoss/cakephp-db-migrations/tree/master

Smush.it – Compress your images for the web

This plugin is now incorporated with YSlow, but run it on any one of your webpages, then download the new image files… Now you website will run faster and the image quality is still really good.

http://developer.yahoo.com/yslow/smushit/index.html

YSlow – Great Fire fox plugin, for optimizing your page download

This is an awesome to firefox plug for optimizing download speed of your page: http://developer.yahoo.com/yslow/

CakePHP: ACL Menu Component

Once again Mark Story saves the day: ACL Menu Component