Monthly Archives: February 2010
The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing PHP intermediate code.
yum install php-pear
yum install php-devel httpd-devel
yum groupinstall ‘Development Tools’
yum groupinstall ‘Development Libraries’
pecl install apc
1. Log in as root or use su at command line
2. Go to the font storage directory:
# cd /usr/share/fonts
3. Create a subdirectory for the Arial fonts:
# mkdir arial
4. Copy the Arial fonts into this directory from font sites or windows FONTS folder.
5. Make the font files accessible systemwide:
# chmod 0775 -R arial
6. Run fc-cache to cache the arial fonts on system:
# fc-cache arial
PECL Memcache client of memcached distributed cache server, is a very probable candidate for high-load systems.
Typically you won’t be able to use “pecl” directly and when you try to install manually with phpize you will get an error like:
” PHP Warning: Unknown(): Unable to load dynamic library ‘/opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so’ – /opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so: undefined symbol: OnUpdateLong in Unknown on line 0″
Below is step-by-step guide of how to install a PECL extension (Memcache in this case) in the latest XAMPP:
make sure you uninstall all and any PHP installations you may have had before along with PECL and PEAR
Download and install XAMPP 1.7.1
Add /opt/lampp/bin to your PATH
Download and install XAMPP Development Package
backup /opt/lampp/include directory to /opt/lampp/include-bak. This directory
Download source distribution of the PHP corresponding to your XAMPP installation
php source distribution is /opt/lampp/include/php
Run “./configure” and “make” on that php source.
Caution: Do NOT run “make install”!!!
Download memcache-2.1.2 anywhere
# cd memcache-2.1.2
# make install
Edit /opt/lampp/etc/php.ini and add a line:
Knowledge speaks, but wisdom listens. 😉
Often, when we get error “No route to host” to connect remote server via linux command line e.g. wget, curl etc. or web services (webserviceserver).
The first solution we want to try to troubleshot firewalls and proxies?
But before that try hostname entry in linux box…
# vi /etc/hosts
add & save
If still experienced the issue when deploying code from development machine to a live server.
Ping other servers like
# ping google.com
# wget http://www.google.com
If ping & wget working for google means the webserviceserver have some block or restrictions to calling servers.
Make sure with several linux network utilities
# nc webserviceserver.com 8080
webserviceserver.com [192.168.0.100] 8080 (www) : No route to host
# telnet 192.168.0.100 8080 (working?)
# traceroute http://www.webserviceserver.com (working?)
# ping http://www.webserviceserver.com (working?)
Make sure firewall is not blocking your access:
# /sbin/iptables -L -n
# /etc/init.d/iptables save
# /etc/init.d/iptables stop
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
Make sure we are using a router and not a proxy server. Proxy servers are good for Internet browsing but not for ftp, sending ICMP request and so on.
Try on alternate port..
# nc webserviceserver.com 8078
If this is working then we have to use alternate port for the server “webserviceserver.com”
Make alternate port for network connection 🙂
SWFTools is the utilities for working with Adobe Flash files. These tools includes programs for reading SWF files, combining them, and creating them from other content (like images, sound files, videos or sourcecode).
Download latest Sourcecode from here…
# wget http://swftools.org/swftools-0.9.0.tar.gz
# tar -zxvf swftools-0.9.0.tar.gz
# cd swftools-0.9.0
Some time make generate errors for xpdf.. so we have to install xpdf here….
Search for “xpdf-3.02.tar.gz” download & install
# cd lib/pdf
# wget http://gd.tuwien.ac.at/publishing/xpdf/xpdf-3.02.tar.gz
# perl inject-xpdf.pl xpdf-3.02.tar.gz
# make clean
# make install
Here we successfully installed swftools for all swf related operations.
We can find all linux utilities in src for of “swftools-0.9.0” like
SWFTools has been reported to work on Solaris, Linux (both 32 as well as 64 bit), FreeBSD, OpenBSD, HP-UX, Solaris, MacOS X and Windows 98/ME/2000/XP/Vista.
Cron is a daemon that can be used to schedule the execution of recurring tasks according to a combination of the time, day of the month, month, day of the week, and week.
Install crond/crontab on linux:
# yum install vixie-cron crontabs
# /sbin/chkconfig crond on
# /sbin/service crond start
set default editor for crontab:
# export EDITOR=/usr/bin/nano
# crontab -e
1 2 3 4 5 /path/to/command arg1 arg2
* 1: Minute (0-59)
* 2: Hours (0-23)
* 3: Day (0-31)
* 4: Month (0-12 [12 == December])
* 5: Day of the week(0-7 [7 or 0 == sunday])
* /path/to/command – Script or command name to schedule
* * * * * command to be executed
– – – – –
| | | | |
| | | | —– Day of week (0 – 7) (Sunday=0 or 7)
| | | ——- Month (1 – 12)
| | ——— Day of month (1 – 31)
| ———– Hour (0 – 23)
————- Minute (0 – 59)
* * * * * env php -q /var/www/html/cron.php