Install libpurple with PHP

libpurple is intended to be the core of an IM program. This libpurple PHP binding, which defines a set of internal classes, gives a possibility to use aol and icq (oscar), yahoo, msn, jabber, irc and much more protocols directly from PHP. Write your own IM chat client in PHP, as simply as PHP enables … Read more

Session lost when switching from HTTP to HTTPS in PHP

Sometime we face the problem when we navigate from HTTP URL to HTTPS URL our session lost. You can manage session between HTTP to HTTPS or HTTPS to HTTP: 1. Transmit session ID between page using GET 2. POST session ID by POST 3. Use files to save sessions 4. Use Cookies for sessions 5. … Read more

FFmpeg

# ffmpeg is a command line tool to convert one video file format to another. It can also grab and encode in real time from a TV card. # ffserver is an HTTP and RTSP multimedia streaming server for live broadcasts. It can also time shift live broadcast. # ffplay is a simple media player … Read more

PHP – File Upload Stream

PHP supports upload file stream… we can stream data to server using PHP stream_open() & stream_write() functions. There is alternate method in PEAR to transfer files to server1 to server2. PEAR have HTTP package for uploading files. HTTP_Request supports GET/POST/HEAD/TRACE/PUT/DELETE, Basic authentication, Proxy, Proxy Authentication, SSL, file uploads etc. <?php require_once “HTTP/Request.php”; $req =& new HTTP_Request(“http://domain.com/upload”); $req->setBasicAuth(“login”, “pass”); $req->setMethod(HTTP_REQUEST_METHOD_POST); $result = $req->addFile(“data”, “/home/svnlabs.mp4”); … Read more

Linux Network Configuration

# system-config-network # redhat-config-network # vi /etc/resolve.conf # vi /etc/hosts # /sbin/ifconfig eth0 192.168.10.120 netmask 255.255.255.0 broadcast 192.168.10.255 # /etc/init.d/network restart ifup – bring a network interface up ifdown – take a network interface down

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 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 … Read more

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 … Read more

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 … Read more