Technology Blog

Author Archive

Installing APC for your php webserver

by on Nov.17, 2010, under Uncategorized

APC
APC also known as Alternative PhP Cache is an easy way to speed up and optimize performance on your webserver.  We recently installed it on a server that was spiking to 40.00-80.00 load and have seen the server serve files quicker and only spike to a 2.00 – 4.00 load during peak times.  This server was sending out an application on the Zend Framework which is notoriously heavy – so it was good to get such a big speed and optimization boost.

How does apc work? Well for those of you not familiar, everytime a php program is called, a text file is compiled into c code and then executed by the server. On desktop apps, and other programming languages usually this code is pre-compiled and ran everytime. (Think about an EXE file – there is no way to see the lines of code that make up the file.) Well what if we saved this compiled code and skipped the whole step of compiling it every single time a user request the same page. Well apc does this!

To install APC on a redhat/centos based machine is super easy:

yum install php-pear
yum install php-devel
yum install httpd-devel
yum install apr-devel.x86_64

pecl install apc

#Then check /etc/php.d/apc.ini and put:
extension=apc.so
; Options for the apc module
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=32
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.cache_by_default=1
apc.filters = "(kses\.php)|(wp-cache-.*\.html)"

#restart apache
/etc/rc.d/init.d/httpd restart

#check /etc/php.d/apc.ini

After that you can even do a `locate apc.php` and move this file into a web servable directory and you will see charts that will show you all kinds of neat statistics about its performance.

Leave a Comment more...

Cpanel Logs Location

by on Nov.16, 2010, under Linux

Cpanel Log Location

Cpanel Log Location Poster

Coming from a plesk background, I always have a hard time finding the location of Cpanel’s log’s.  Today while looking for where cpanel keeps it’s access logs I stumbled across this poster now available by cpanel.

By the way the location for the apache logs is:
/usr/local/apache/logs/{DOMAIN}

Leave a Comment more...

Cufon Fix for IE 9 now available

by on Nov.16, 2010, under Web Development

Cufon IE FixA new (minor release) version of Cufon is available.  This new version is 1.09i and fixes IE9 Beta support for cufon.  You do not need to re-upload your fonts and create new cufont.font.js files, you will only need to replace the standard cufon-yui.js file on each of your sites.  We just rolled this fix out to over 20 sites in under an hour.  Will you be updating your sites?

There are also some other ways to fix cufon for IE9 if you are unable (or unwilling) to replace the js file.

<!--[if gte IE 9]>
<script type="text/javascript">
Cufon.set('engine', 'canvas');
</script>
<![endif]-->

Alternatively, you can always force ie9 to render as ie8 or ie7:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />

Leave a Comment more...

Does Cufon affect SEO and how? YES, it does!@

by on Nov.16, 2010, under Uncategorized

Cufon IE Fix

I hear you now -  I’m SOOOO wrong on this, right?  Cufon is a standard compliant javascript file with failback support – It MUSN’T affect SEO at all!  The previous means -  that even in browsers (or robots) that do not support cufon, the text will be seen just as text – index-able plain text!  This text will get weighted and indexed just like any other text on the internet.  So I’m an idiot and wrong – right?  Not exactly.

So then how does cufon affect SEO?  Well now that google has released “instant preview”, cufon font is not being rendered in the images.  Some suggest it is a problem with google’s bot.  Regardless, this is an issue for YOUR cufon website!  Your image can come up completely incomplete in the preview pane.

I will use Katy Perry’s website as an example.  Just look below at the highlighted sections that use Cufon and see how cufon is missing completely:

Cufon Missing from google PreviewI’m currently working on a fix for this and testing out a few different options.  I will update you once I verify it.

7 Comments more...

Twitter Updates for 2010-08-27

by on Aug.27, 2010, under Uncategorized

  • #askhero what's the best way to configure an HA load balancer setup with iptakeover? #
  • @alexmbt do you watch royal pains? #
Leave a Comment more...

How to switch an svn repository url

by on Aug.20, 2010, under Uncategorized

Sometimes an svn url path may change due to server relocation etc. To remap back the svn path we can use svn switch –relocate

First check the old url path with “svn info” next do the switch

svn switch –relocate

i.e.
svn switch --relocate https://udklstr1/SWITCHING/generic/SunManager/trunk https://10.162.24.3/svn/SWITCHING/generic/SunManager/trunk

Leave a Comment more...

Mail from different IP Address

by on Aug.20, 2010, under Uncategorized

Have all mail get sent from one ipaddress on your server:

iptables -t nat -A POSTROUTING -p tcp --dport 25 -j SNAT --to-source IP_YOU_WANT_TO_USE

Leave a Comment more...

Twitter Updates for 2010-08-17

by on Aug.17, 2010, under Uncategorized

  • @mediatemple seeing the same network issues as everyone else. #
Leave a Comment more...

Twitter Updates for 2010-08-15

by on Aug.15, 2010, under Uncategorized

Leave a Comment more...

Twitter Updates for 2010-08-10

by on Aug.10, 2010, under Uncategorized

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...