Posts

Showing posts from 2014

NLP: The meaning of communication is the response you get.

The meaning of communication is the response you get.

Meaning = Response

Eben Pagan - Get Altitude #129

XAMPP Run SSI (Server Side Include) with PHP 5

I have a very stupid website.

This website is developed by someone who use PHP 5.4 (FastCGI), Apache 2.4.9, MySQL 5.1.

The most important thing is, this person is using SSI (Server Side Include) with PHP....

Which means, when page load, visitor will be redirected from index.php to somedir/start.html.

And in the .html file, this person is using SSI.

The start.html will look something like this:

<td width="650" rowspan="2" align="left" valign="top" style="padding-top:16px;">
<a href="3dcreative.html" target="_blank">
                    <img src="common/homepage/201408/3dcake.jpg" border="0" width="390" height="200" style="padding-right:10px; float:left"/></a>
                <!--#include virtual="main_cake_series.php"-->
<!--#include virtual="main_ssi_banner.html"-->
</td>

Don't ask me why this person is …

Transparent PNG overlays another image

I was struggled by the problem of overlaying a transparent image with another image. until I read this:

http://www.cssmojo.com/png_overlay_with_no_extra_markup/

This idea is great and for people who are struggling, there is an answer out there above.

Hope it helps someone.

Inspiration from "The Fabulous Dr. Jacobson" by Glenn Livingston

Today's inspiration from interview done by Glenn Livingston with Dr. Jacobson.

Money is a way to say "Thank you"
Money has to be an expression of gratitude.

Perry Belcher 21 Steps Sales Letter

Image
Here is the link to the original post: Salesletter Formula: 21 Effective Ways and Guides to a good Sales Piece

Here is the info-graphic thanks to 21 Step Salesletter Formula – Perry Belcher [Infographic]


Original:

Salesletter Formula: 21 Effective Ways and Guides to a good Sales piece

The Salesletter Formula can be a big help with your marketing plan, when you know exactly how to follow. This is an important tool to write a good salesletter, and video letters as well. Let me share some of these. Over the years , I’ve added a few points today to the Salesletter Formula, and I’d like to share this with you now.

I read an article by David Frey called the 12 step foolproof Salesletter formula, a few years ago. This formula has made me millions of dollars over the last few years.

Many thanks go to David, a brilliant marketer from San Antonio, Texas, a credit for opening to me the effective Salesletter Formula.

I kind of feel like I’m painting a mustache on the Mona Lisa by doing this, ever…

Ryan Deiss - 3X Conversion Cheat Sheet

Image

Linux LVS Load balance on Fedora 5: My experience

Reference: http://www.austintek.com/LVS/LVS-HOWTO/

Before doing LVS, readers are required to read the HowTo and MiniHowTo of this site. This site explains the basic and the way load balance work.

My architecture is as follow:

Router(192.168.1.1)
|---------------------|----------------------------|
| | |
Client Load balancer (LB) Real Server (RS)
192.168.1.5 eth0/DIP:192.168.1.2 192.168.1.4
VIP:192.168.1.3

Client - Windows machine
Load balancer/Real Server - Fedora 5 - Kernel 2.6.18

Points to note:
LB - I use 1 network card only, i.e. I hosted 2 IPs on 1 network card.

I used the basic configuration script created by LVS site:

http://www.linuxvirtualserver.org/software/index.html

For those who don't know:
DIP = Director IP: Director can be seen as load balancer, this is the IP of this load balancer.
VIP = Virtual IP: This is the IP which can be seen as an "access point" to outside world. …

Woocommerce + WPML: Product 404 Not found when switch language?

Image
If you are using WPML + Woocommerce and found that, usually when you trashed and recreate a product, you may find that when you switch language from one to another, the other language will show "404 Not found".

This problem exists because your slug (Red underline: the last part of your URL if you are using permalink) is not the same across all products.

My URL for all 3 languages are:

English: 



Traditional Chinese:



Simplified Chinese:



This is how I construct my URL in different language.  Notice the last part of the URL (the product name) is the same in all 3 languages.  You just need to make sure that you have different URL (identified by language name).

This would solve your product 404 not found problem.

Hope it helps someone.

[Solved] Magento: Login Redirect to Home Page, even if remove var/cache

Update: This paeg also solved my problem: http://www.aschroder.com/2009/05/fixing-magento-login-problem-after-a-fresh-installation/
Situation:  I download a copy of magento from production server to local machine (Win 7 + XAMPP 1.8.2) and try to set it up.

After setting it up and load the home page (index.php), it redirected me to the old, production URL.
This is the first problem, and you can follow this and this to solve it.

Problem: However, there are times when it still did not work (still redirect to index.php when go to admin/), even you have already remove/delete the var/ folder, which contains cache/ and sessions/.
So how to solve this problem?

Solution: URL redirection is not only controlled by setting in DB, but also it is controlled by mod_rewrite/.htaccess.
This is my .htaccess:
<IfModule mod_rewrite.c>
############################################ ## enable rewrites
    Options +FollowSymLinks     RewriteEngine on
############################################ ## you …

Swift in WWDC 2014

I just wrote a new post about what Swift in WWDC 2014 means to programmers and project manager:

Blog: What Apple “Swift” means to Programmer and Project Manager?

Enjoy!

enets UMAPI V 1.3 NETSConfig.get NullPointerException Solve

I am setting up UMAPI v 1.3 from eNETs under Tomcat 7.0.21, Windows 7.

If you encounter this error:

java.lang.NullPointerException
at com.wiz.enets2.transaction.umapi.NETSConfig.get(NETSConfig.java:69)

The problem is that your CLASSPATH does not include the config files (which is strange, as CLASSPATH is used to set CLASS, not config...)

So in your setenv.bat, I enter the following:

set CATALINA_OPTS=-server -Xms256m -Xmx256m
set CLASSPATH=C:\xampp\tomcat\webapps\ROOT\CLIENT\config;C:\xampp\tomcat\webapps\ROOT\CLIENT\lib\*

You should be fine, and I guess the same setting can be applied to Linux also.

Hope it helps someone.

I hate eNETs.

JMeter on Wordpress and Woocommerce

Image
I am using Apache JMeter to do some stress tests on my server. (I am using ver 2.11)

However, when I load and run the .jmx file generated from BadBoy, even if it runs smoothly the first few times, you will see "Session expired" message from JMeter later on.

To fix this problem, I read this article about JMeter and found that if I add HTTP Cookie Manager:


And configure like this:


You will not see any session expired problem.

Another message: "Action failed. Please refresh the page and retry." may be caused by Force SSL problem, you may see this thread in wordpress for details.

今晚放了小龜

今晚放了小龜

養了都有10多年了,關了這麼久,就當贖了前世的罪,今世獲得自由吧。

與你同住的大龜,沒來得及放生就去了,今次,就讓你走吧。

之後,就要看你自己的造化了。

再見了,小龜。

My prouduct launch notes

Surprisingly I spent a lot of time playing around with OptimizePress 2.0Do a split test on sales pageDriving FB PPC traffic to sales page.  And finally I understand this statement: You do not have any traffic problem.  It is true because you can always buy traffic from different source.Set your daily PPC budget at the maximum of your product price so that, if you have one sale a day, you just cover your PPC expense.  My product is $9.95 so that my daily PPC budget is $10.Later on it seems that it would be a good idea to create a free report first, then drive traffic to squeeze page, then create 3 email follow up on client.Using Ryan Deiss free email follow up as a template, you can rewrite it to deliver some value on your email, and at the end of email you add a link to your sales page.  E.g. if you want to learn more tips and tricks about this, you can go to website here.Frank Kern recently released an "article" promoting his advance training.  The article he wrote is compo…

Linux Installing APR and Tomcat Native Library on Tomcat 7.0

Key notes:

The objective: install APR and Tomcat Native Library on Tomcat 7.0.41.  I am using Icetea java 1.6 open JDK as when I download JAVA from Oracle, it has rt.jar missing on 1.6 and 1.7The linux platform is RHEL 6.3I download and compile tar source of APR (1.5) and APR util (1.5.3).  I found that when I use yum install, the apr library is incompleted.Need to yum install java openjdk.  I am using 1.6.Untar APR and follow readme to configure and compile.  make && make installFollow this (Eng) and this (S.Chi) to configure, compile and install Tomcat Native LibraryThe command I use is: ./configure --with-apr=/usr/local/apr --with-java-home=/usr/lib/jvm/java-openjdk/In setenv.sh (under <tomcat_dir>/bin, if not exists, create one), I set the following: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/libJAVA_HOME=/usr/lib/jvm/java-openjdkCLASSPATH=$CLASSPATH:/usr/local/tomcat7/webapps/CATALINA_OPTS="-server -Xms6G -Xmx6G $CATALINA_OPTS -XX:+UseConcMarkSweepGC…

MySQL 5.6 Wordpress Optimization

My my.cnf I am setting the blog based on information from: 

High Performance Wordpress
SlideShare of Above link

Use of mysqlreport

# Config start

key_buffer = 256M
sort_buffer_size = 4M
read_buffer_size = 4M
innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M
tmp_table_size = 32M
max_heap_table_size = 32M
table_open_cache = 128
thread_cache_size = 64
query_cache_type = 1
query_cache_limit = 1M
query_cache_size = 32M

skip-name-resolve

# Set Log
slow_query_log_file=/var/log/mysql-slow-query.log
log_error=/var/log/mysql-error.log

Hope it helps someone.

.htaccess not working?

If you find that you have a proven/tested .htaccess file but for some unknown reasons, you cannot make it work on other server, one thing to check is that if you set "AllowOverride" to "All" instead of "None".

"None" means .htaccess cannot be override.

My example:  My web directory is under htdocs/:

<Directory "/usr/local/apache2/htdocs">
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All
</Directory>

It costed me 1 day to find that out....
Hope it helps someone.

OptimizePress integrated with JVZoo Notes

If you did not receive email after test purchase, use WP Mail SMTP and WP Mail Log to see if you really can send out email.  Chances are your website is blocked from sending out emailTell your hosting service provider if you want to send out email.  They will help you.Follow the optimizepress JVZoo integration video and you should be fine.Do not enable customize email, it seems that it does not use the tinyurl.com to create a URL that buyers can use to register.Integration with JVZoo and Paypal (Non-US currency): I stuck in this part for quite some time.  If you cannot checkout with the $0.01 purchase, the problem is that you have a currency setting that includes both USD and your country currency.  Even though you set USD as your primary currency, when you check out using test purchase, Paypal will still automatically convert it to your country currency.  In Paypal, a $0.01 purchase cannot be converted to other currency because the amount is too little.  This is Paypal problem.  To s…

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services

Image
This is the exact config that I need to configure a load balancing without other cloud services like Amazon, rackspace or GoGrid, completely customized.

I put my question on stackoverflow.com but no luck, so I put it on Quora.com and immediately I got response:

My Notes:

The load balancer is done by my colleagues so I am not sure what is the config of it.  But one thing to note: Your LB should enable "session stickiness" so that the session will follow visitor.  By the way, I am using Round-robins.Session: Actually I did not use session, but it seems that other plugins (like WPML) will use it.  If I use Apache load balancer, when I go to wp-admin through load balancing IP, I will not able to login, given the username and password is the same.  I will be redirected to login page.  So ask your load balancer providers or check your load balancer config and see how to manage the "Session Stickiness" issue.Shared folder: your wp-content/uploads folder must be shared and…

Dean Jackson - I know I am successful when...

My successful list:  I know I am successful when I...


Surrounded by kind, nice and wealthy peopleAsk myself: what I want to do today?My passive income is higher than my lifestyle needsWork when I want to, not I need toCreating valuable stuff and people's life are improved because of my stuffNo deadline of my workDress extremely casual in high level business meeting and I can still be myselfPractising martial arts because I want toGo whereever I want and take a vacation whenever I want, and my business is still unaffected.I have my own comfortable home.I am looking forward to Mondaymy business is easy, lucrative, fun

Dan Sullivan Mess = O - C

Dan Sullivan said:

Mess = Obligation - Commitment

If you have Mess in your work, it means you are obligated to something, but you don't commit.

If you have Mess in your Marriage, it means you have obligation (e.g. Child) but you don't commit.

1 question interview with Steve Jobs by Eben Pagan

Eben: Apple has launched so many successful products, home run after home run, what is the secret?

Steve (and Bill Gates): Not everything we do succeed.  :P.  I think you got to "care".