http://pics.egreeting.indiatimes.com/lang_english/holi/hli004.swf
Monthly Archives: February 2010
Install the Alternative PHP Cache (APC)
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
http://si2.php.net/manual/en/install.pecl.php
Install Fonts in Fedora
1. Log in as root or use su at command line
$ su
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
Install PECL Memcache with LAMPP
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
# phpize
# ./configure
# make
# make install
Edit /opt/lampp/etc/php.ini and add a line:
extension=”memcache.so”
Knowledge speaks, but wisdom listens. 😉
No route to host
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
192.168.0.100 webserviceserver
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 🙂
Install swftools
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).
Install SWFTOOLS:
Download latest Sourcecode from here…
http://swftools.org/download.html
# wget http://swftools.org/swftools-0.9.0.tar.gz
# tar -zxvf swftools-0.9.0.tar.gz
# cd swftools-0.9.0
# ./configure
# make
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
Then…
# make clean
# make
# 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
* as3compile
* font2swf
* gif2swf
* jpeg2swf
* pdf2swf
* png2swf
* swfbbox
* swfc
* swfcombine
* swfdump
* swfextract
* swfrender
* wav2swf
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.
yum install cronjob
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
Setup crontab:
# crontab -e
1 2 3 4 5 /path/to/command arg1 arg2
Where,
* 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)
Sample:
* * * * * env php -q /var/www/html/cron.php
How to run cronjobs per second?
🙂
Magento make easy – part1
Magento
Create a dynamic, fully featured, online store with the most powerful open source e-commerce software….
Download Magento from here..
http://www.magentocommerce.com/svn
# svn checkout http://svn.magentocommerce.com/source/branches/1.3
Features..
1. Categories and Attributes
2. Taxes
3. Adding Simple Products
4. Minimum Customization of Your Store’s Appearance
5. Customer Relationships / Configuring customer options
6. Accepting Payment
7. Configure Shipping
8. Fulfilling an Order
The list of requirements..
Linux, Apache web server, SMTP server, PHP 5.2.0 or newer with PDO/MySQL, mcrypt, hash, simplexml, GD, DOM, iconv, MySQL 4.1.20 or newer
Make the store’s appearance and organization..
* Add products
* Categorize products
* Create a navigation menu
* Configure payment options
* Configure shipping options
* Configure taxes
* Customize the front page
* Process orders
Magento make easy – part2 comming soon 😉
Install JSON on linux
Have the fun with json….
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
# yum -y install php-pear
# pecl install json
# vi /etc/php.d/json.ini
extension=json.so
# service httpd restart