Solved:Enabling sendmail on localhost for MAMP free version

Solved:Enabling sendmail on localhost for MAMP free version

Enabling the sendmail function on localhost to send and receive emails has turned out to be a project so I decided to figure out the solution and share it with everyone else.

In free version MAMP mail function is not enabled by default and you have to enable it yourself. At, first when I tried out MAMP on my localhost I found out about this when one of the application was not sending out the mail. So, I did some research but was not able to find much of anything however after digging and info gathering around the web and forums I finally found the solution.

Note that MAMP forums suggest to enable Postfix but for some odd reason I wasn’t able to get Postfix working with my domain’s email settings which is on gmail(google apps).

Solution:

First thing you have to do is locate php.ini which is located below:

cd /Applications/MAMP/conf/php5.3/php.ini

Next, you will need to open up your php.ini file and find “[mail function]” you should do the following:

Existing MAMP default configuration:
I’m not really sure why MAMP’s default [mail function] settings have the Win32 options enabled and the unix path not turned on:

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only.  You may supply arguments as well (default: “sendmail -t -i”).
;sendmail_path =

Change it to this: (you can copy and paste the following code)

[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = don@tripleroi.com

; For Unix only.  You may supply arguments as well (default: “sendmail -t -i”).
sendmail_path =/usr/sbin/sendmail -t -i -f  yourname@example.com

Make sure you change your email from yourname@example.com to your own email.

The “sendmail_path =/usr/sbin/sendmail -t -i -f yourname@example.com” I found this in a forum thread, but figured I would put a little bit more detail into what I discovered so that its easy for people to understand. I’ve done this testing all in my localhost development it has been very helpful e-mailing me when I test out new applications. This worked for but its not guaranteed that it can work for anyone as it depends on your MAMP and OS version, Hope this helps.

Did your WordPress website get hacked ?

WordPress is an extremely popular open source content management system which is for blogging but also as a core business website. WordPress is a great CMS and has tons of features and plugins but being open source it also means that anyone can download it and view the source code including hackers. Most people install WordPress through their hosting company which may be offered as a “one-click-install” using Fantastico or Simple Scripts which makes it very easy. However, what most of people dont know is that that WordPress is such a targeted platform by hackers who know all the security vulnerabilities and can explore them. Most people are not tech savy when it comes to dealing with WordPress as it was installed from a third party website so they get stuck and end up with only headaches.

Most common hacking problems:

  • Weak Passwords
  • Outdated WP version
  • Being on a shared hosting
  • Incorrect File Permissions
  • Untested or Buggy Plugin-ins
  • MySQL Injections
  • FTP hacking

And the list goes on and on as hackers always find loopholes to dig in. The funny thing is that these hackers do it for the fun of the game not to really do any harm but its embarrassing to a business when a customer goes to the homepage to find a hackers message.

So what to do if your WordPress is hacked ?

First, this to do is change all of your passwords including server and FTP not only your WordPress. Second, take your site down and put a simple html “under maintaince” page so people dont see the hacked message. Third, go to your backups(assuming you have backups) and restore everything back to normal starting with WP files as well as database files. If this fails then you have to ask for professional programmer or WordPress expert to fix the issue.

Installing WordPress is one thing but keeping it safe its a whole different animal and appropriate security patches need to be added for future prevention. Hope this helps and if you need any help with WordPress let us know!

WordPress Shared Hosting is a Big NO

As we have mentioned before WordPress is not well optimized for majority hosts so therefore many WordPress sites run into very similar issues. WordPress uses up a lot of memory due to its coding structure but also the plugins management. Having a decent server is crucial to improving WordPress’s performance. When looking to either get a new server or move on to another its great to keep a few things in mind as the server could make it or break it.

Stay away from shared servers
Keep in mind that going for a shared hosting is not a great idea unless your resources are very limited. In a shared hosting environment you are sharing your resources with many other sites. For example: IP address, RAM, Bandwidth etc. What this does is limit your sites ability to perform as it should as the other websites’s scripts maybe running hight and using up a good percentage of that memory. This is where WordPress runs into issues as its being limited use the memory it needs. We’ve seen large WordPress sites take up as much as 256MB.

Also, if you are sharing IP address across 100 other sites the chances are high that one of this domains is spamming search engines and they may block that IP that you are sharing.

Conclusion, from experience we’ve seen WordPress websites perform a lot better when hosted to a private server with a dedicated IP. However, owning a virtual private server comes with its difficulties as you will most likely need some technical knowledge to set it up and maintain it.

Internet Continues To Weave

As use of internet continues to weave its way into the fabric of everyday business and personal live, and as the second wave of internet entrepreneurship takes root, companies are being forced to address how best to make the internet a fundamental part of their business and their competitive strategies. It is thus worthwhile to take hard look at what kinds of business models and strategies are attractive in the maturing Internet economy. What strategic principles need to observed? What strategies and business models make sense for companies that operate exclusively online? Is the combination of brick-and-click model likely to be good strategic positioning option?

eCommerce Strategy – Why aren’t Customers Buying Online?

Quite bit of work goes into developing an eCommerce website and even more into designing the user interface that actually sells products. Many online shops have beautiful designs and graphics but when it comes to converting visitors into sales it always a roadblock.

We often hear people say:

“I have so many customers that visit my website but how do I get them to buy my products online”
“I look at my analytics and see that they abandon my shopping cart within seconds” 
“Why aren’t my my products selling online, how can I increase my online sales ?”

You have done everything right and even get some decent traffic to your website through SEO or pay per click advertising but still people are not buying from you – so what’s the problem?

Well, all that is great but you have to put yourself in customers shoes and think how do they make the ultimate purchase decision.

Quick Tips
First, look at your product page and see if there are any barriers such as add to cart button. Is it properly placed where customers can see it ? Is it the right color ? Is it the right width/height?

How many steps are in your checkout process ?

There are some many aspects to look and every merchant as different needs so it on a case by case basis.

Getting people to buy online is more than just having an online shop – a well crafted strategy is needed. Its not just cool graphics and beautiful photos because everyone has all of those, it more about the psychological aspects of ecommerce. Selling online is very competitive and for a business to succeed it needs to have a well calculated business model and strategy.

Let us know if we can help you 

Know Your Target Audience

Many web developers create websites without the end-user experience in mind and that is perfectly ok for them as they do not have that type of expertise or even need it since its more of a marketing role. Thats why you see many sites that are poorly designed without thinking about the end-user. For example we took on a project for a healthcare website and the backend interface was designed from a programers point of view and less about the person whos going to use it.  The people were forced to go through 6 steps despite having created an account with the site already that included their (first, last, email, address, credit card, bank account etc..). You had to click the submit button twice so the page would refresh and load the proper fields which could also be done very easily in ajax. The point is that developers nowdays need to be not only coders but also user experience experts so they can deliver the right product.

I can instantly look at a UI and find at least 10 things wrong with it wether its a back-end or front-end. The solution is to take a second look and learn more about the people are actually going to use it and design it based on those aspects. As simple as that. Know your audience!

Solved: WARNING: The locate database (/var/db/locate.database) does not exist

Linux is great but at times after you update your mac it disables some key command lines which are really helpful for developers. For example today I just discovered that my locate command was either not not working or was missing after the update. I received the error below:

WARNING: The locate database (/var/db/locate.database) does not exist.

After some investigation I finally figured it out that the database had to be rebuild again so a simple command line did the trick.

Open your terminal.app the type copy and paste this line of code :

/usr/libexec/locate.updatedb

This command will succefully update and rebuild your DB. Note that this might take a awhile so be patient and if you get an error like this after its finished just ignore as it will still work.

/usr/libexec/locate.updatedb: line 97: /var/db/locate.database: Permission denied

Happy locating!!!

Speed Up Website By Enabling MySQL query_cache

speed up mysql
If you have a large MySQL database with high traffic and too many queries are loading the best thing to do is enable “mysql query caching”.

In order to enable the MySQL query cache, you will need to set some variables in mysql configuration file which in most cases is called my.cnf but not all server have it enabled so you will have to either create a new one or copy existing .cnf files.

Usually located under any of these directories:

/etc/my.cnf
/etc/mysql/my.cnf
$MYSQL_HOME/my.cnf
[datadir]/my.cnf
~/.my.cnf

If you can’t find it there then move try running a shell command locate  my.cnf and what this does is look for that file so your can find the location and edit it but if it does not return any results you can try and see if any of the following files exist:

my-medium.cnf
my-small.cnf
my-large.cnf

Most likely one of them will return so just copy the my-medium.cnf(for normal or medium size databases) file to the /etc/ directory and rename it to my.cnf

Now open up your newly created my.cnf file (command  vim   my.cnf )

That will open up the following file but **note that this is on a localhost so the configuration file might be different on your server.

Sample MySQL config file for medium systems.
#
# This is for a system with little memory (32M – 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /Applications/MAMP/db/mysql) or
# ~/.my.cnf to set user-specific options.
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the “–help” option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /Applications/MAMP/tmp/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /Applications/MAMP/tmp/mysql/mysql.sock
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M


#added for query cache (added)
query-cache-type = 1(added)
query-cache-size = 10M(added)


# Don’t listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the “enable-named-pipe” option) will render mysqld useless!
“/Applications/MAMP/Library/my.cnf” 158L, 5018C


Now you will need to enable the query_cache by just adding these two lines of code :

query-cache-type = 1
query-cache-size = 10M
or if that does not work try this :
SELECT SQL_CACHE field1, field2 FROM table1 WHERE field3 = ‘yes’

And to check see if your mysql server has enabled query cache, simply run this query:
SHOW STATUS LIKE ‘%qcache%’;

a result similar to this will show up:

+————————-+———-+
| Variable_name | Value |
+————————-+———-+
| Qcache_queries_in_cache | 1 |
| Qcache_inserts | 3 |
| Qcache_hits | 0 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 2 |
| Qcache_free_memory | 20947592 |
| Qcache_free_blocks | 1 |
| Qcache_total_blocks | 4 |
+————————-+———-+

And you can adjust the settings as you see go along. Thats it!

If you have any questions or like us to set this up for you please contact us 

New! Google Analytics Premium Service

Google has introduced a newly improved analytics tool which is an extension their current Google Analytics.
Premium features include:
  • Extra processing power – increased data collection, more custom variables and downloadable, unsampled reports
  • Advanced analysis – attribution modeling tools that allow you to test different models for assigning credit to conversions
  • Service and support – experts to guide customized installation, and dedicated account management on call – all backed by 24/7 support
  • Guarantees – service level agreements for data collection, processing and reporting

Google Analytics Premium Introduction Video

Pricing

Annual plan comes at $150,000, according to Forrester analyst Joseph Stanhope.

“Is the transformation complete? It is not; at this early stage GA Premium is not a substitute for an established enterprise implementation in many cases,” Stanhope wrote in a blog post. “But it’s a huge step forward for a solid offering, and Google will continue to aggressively iterate the product to close the remaining gaps over time.”

This new premium service looks like its a great tool for large companies who are looking to expand their analytics knowledge with more than just clicks or page views but with real time data and in depth site analytics.

To learn more about it visit http://www.google.com/analytics/premium/

Working For You and Your Customer

As a designer you must balance the needs of your employer with the needs of the intended users of the design. These are often the employer’s customers. If the design doesn’t meet the needs or desires of the end user, rather than just the commissioner of the work, then sales will be compromised.

In addition designers must reconcile their own standards of aesthetics, quality and ethics with the requirements of the intended commercial purpose of their work. Both designer and client should also consider community values and constraints.