Install MP4Box

On December 9, 2009, in CentOS, Fedora, Linux, Tips, Tricks, by phpsolutions

MP4Box is a multimedia package used for  conversion, splitting, hinting, dumping and others.

zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program.

Source: http://sourceforge.net/projects/gpac/files/

Download latest “gpac-0.4.5.tar.gz” & “gpac_extra_libs-0.4.5.tar.gz” from above link……

# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz
# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC%20extra%20libs/GPAC%20extra%20libs%200.4.5/gpac_extra_libs-0.4.5.tar.gz

# tar -zxf gpac-0.4.5.tar.gz
# tar -zxf gpac_extra_libs-0.4.5.tar.gz
# cd gpac_extra_libs
# cp -r * ../gpac/extra_lib
# cd ../gpac
# chmod +x configure

# yum install zlib*

# ./configure
# make lib
# make apps
# make install lib
# make install
# cp bin/gcc/libgpac.so /usr/lib

Install git on linux

On December 9, 2009, in CentOS, Fedora, Linux, Tips, Tricks, by phpsolutions

Git is a free distributed revision control, or software source code management project with an emphasis on being fast. Git was initially designed and developed by Linus Torvalds for Linux kernel development.

Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.

Install git
# wget http://www.kernel.org/pub/software/scm/git/git-1.6.1.tar.gz
# tar zxvf git-1.6.1.tar.gz
# cd git-1.6.1
# ./configure
# make && make install

Uses:
# git clone git://central.server/path/to/proj.git

Sites:
http://git-scm.com/
http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html

Profile:
http://github.com/phpsolutions

Tagged with:  

Resize YouTube Video

On December 8, 2009, in Uncategorized, by phpsolutions

Here is the code how to resize youtube video embed code, even this code will work to non-youtube embed videos…..

<?php

$embed = ‘<object width=”425″ height=”344″><param name=”movie” value=”http://www.youtube.com/v/jWDmG3JnNLE&hl=en_US&fs=1&”></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/jWDmG3JnNLE&hl=en_US&fs=1&” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”425″ height=”344″></embed></object>’;

//$alt = preg_match_all(‘/(width|height)=(“[^”]*”)/i’, $embed, $matches);

$embed = preg_replace(‘/(width)=(“[^”]*”)/i’, ‘width=”200″‘, $embed);
$embed = preg_replace(‘/(height)=(“[^”]*”)/i’, ‘height=”200″‘, $embed);

echo $embed;

?>

Output here:

Linux Command Line

On December 8, 2009, in Uncategorized, by phpsolutions

http://www.commandlinefu.com/commands/browse

http://blog.commandlinekungfu.com/

http://www.shell-fu.org/

http://www.cyberciti.biz/

http://thecommandline.net/

http://cheat.errtheblog.com/

http://getfirebug.com/commandline.html

http://xmlstar.sourceforge.net/

http://linuxcommand.org/

http://commandline.org.uk/

http://commandline.net/home.asp

http://www.linuxguide.it/linux_commands_line_en.htm

http://michaelminn.com/linux/command_line/

http://www.linuxclues.com/

http://www.go2linux.org/

http://www.yolinux.com/

http://www.linuxjournal.com/

http://www.linuxconfig.org/

http://www.linux.com/

http://www.howtoforge.com/

http://www.ehow.com/

http://www.yolinux.com/TUTORIALS/LinuxTutorialSysAdmin.html

http://linuxsysadminblog.com/

http://librenix.com/

Trim and remove empty key & value in php array

On December 4, 2009, in CakePHP, Oscommerce, PHP, Tips, Tricks, by phpsolutions

Here is the PHP function that will remove empty key => value in PHP array…

function array_trim($sv)
{
$s = 0;
$svn = null;
$c = count($sv);
for($i = 0; $i < $c; $i++)
{
if($sv[$i] != “”){
$svn[$s++] = trim($sv[$i]);
}
}
return $svn;
}

$svarray = array(‘   ‘, ‘svlinux’, ‘phpsolutions’, ‘lamp’, ”);
$svarray = array_trim($svarray);
echo ‘<pre>’;
print_r($svarray);
echo ‘</pre>’;

Output:

Array(
[0] => svlinux
[1] => phpsolutions
[2] => lamp
)

Install JAVA Tomcat on Linux

On November 24, 2009, in CentOS, Java, Linux, Tips, Tricks, by phpsolutions

Installation of Java

Login to server as root
# cd /opt

Download jdk 6 linux rpm bin package from sun (Java SE Development Kit (JDK))
http://java.sun.com/javase/downloads/index.jsp
http://java.sun.com/javase/downloads/widget/jdk6.jsp

# chmod 777 jdk-6u17-linux-i586-rpm.bin
# ./jdk-6u17-linux-i586-rpm.bin

Follow the onscreen instructions to complete jdk installation…. press space ….. press yes….. and Enter

Now we will find JDK folder at /usr/java/jdk1.6.0_17

Installation TomCat

Download tomcat source files and extract…

# wget http://www.trieuvan.com/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
# tar xzf apache-tomcat-6.0.20.tar.gz
# ls

Move tomcat to /usr/java/tomcat/

# mv apache-tomcat-6.0.20 tomcat
# mv tomcat /usr/java/
# cd /usr/java/tomcat/

Set CLASSPATH for JAVA & TOMCAT

# vi /etc/profile    (set class path)

add source PATH to /etc/profile

export JAVA_HOME=/usr/java/jdk1.6.0_17
export CATALINA_HOME=
/usr/java/tomcat
export PATH=$JAVA_HOME/bin:$PATH

# source /etc/profile

Start tomcat server….

# /usr/java/tomcat/bin/startup.sh

Start/Stop Tomcat

# cd /usr/java/tomcat/bin
# ./shutdown.sh
# ./startup.sh

Check tomcat status

# netstat -ntlp|grep 8080

Enjoy new server 🙂

CakePHP in phpsolutions

On November 14, 2009, in CakePHP, PHP, Tips, Web Application, by phpsolutions
CakePHP in phpsolutions

CakePHP in phpsolutions

CakePHP is the rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. It follows design patterns like MVC and ORM, CakePHP reduces development costs and helps developers write less code.

Features of CakePHP:
– Extremely Simple.
– Active, Friendly Community.
– Flexible License.
– Clean IP
– Best security, authentication, and session handling.
– Compatible with PHP versions 4 and 5.
– Integrated CRUD for database interaction
– Application scaffolding
– Code generation
– MVC architecture
– Flexible ACL
– Data Sanitization
– Flexible Caching
– Request dispatcher with custom URLs
– Built-in validation.
– Helpers for AJAX, JavaScript, HTML Forms and more
– Email, Cookie, Security, Session, Request Handling etc.
– Localization

Source:
http://cakephptips.blogspot.com/

15 Essential CakePHP Tips

wsdl in php

On November 7, 2009, in Fedora, Java, Linux, Tips, Web Application, Web Services, by phpsolutions

We can use nusoap and pear library to invoke web service … there are some command line tools to consume services and generate/validate wsdl …..

1. wsdl (call method at CLI)
# wsdl WSDL_URL METHOD

2. soapUI
create wsdl project and use web services

3. wsdl2php
wsdl2php convert service methods as the class like structure
http://www.urdalen.no/wsdl2php/manual.php

4. SoapClient – PHP
$path_wsdl = “wsdl/phpsolutions7.wsdl”;
$client = new SoapClient($path_wsdl, array(‘trace’ => 1));
$request = array(‘….. |wsdl request array| ……’);
$response = $client ->getLog($request);

5. nuSOAP
http://sourceforge.net/projects/nusoap/

Resources:
http://wsdlpull.sourceforge.net/
http://code.google.com/p/ezerphp/
http://www.mehtanirav.com/2008/12/26/xplanner-php-soap-client
http://code.google.com/p/wsdl2php-interpreter/
https://www.ohloh.net/p/php-wsdl-viewer
http://php.net/manual/en/book.soap.php
http://phpwebservices.blogspot.com/

Install DimDim on CentOS 5.3 (Final)

On November 1, 2009, in CentOS, Linux, Tips, Web Services, by phpsolutions

Dimdim is a software company that provides a web-based platform (Webinar) for real-time, rich-media collaboration and meetings. Dimdim provides free web conferencing service where users can share desktops, show slides, collaborate, chat, talk and broadcast via webcam.

Dimdim Web Meeting Server Version:4.5 ReadMe ( 32 bit Operation System Only )

Created	     : 16/10/2008
Last updated : 01/12/2008

DIMDIM INSTALLATION PRE-REQUISITE CHECK:
========================================

Below is the list of Pre-Requisites which are required to install Dimdim Web Meeting Server

In case if you have any previous dimdim version, You need to uninstall it,

1. Libc

a) Version Required: v2.5

b) Check if you have Libc Installed:

   Open a terminal and follow the below steps:

   	Type ldconfig -v |grep libc

   	i.e. root@dimdim#ldconfig -v |grep libc

	You should get similar output

	 	libcidn.so.1 -> libcidn-2.5.so
        libcrypt.so.1 -> libcrypt-2.5.so
        libc.so.6 -> libc-2.5.so
        libcap.so.1 -> libcap.so.1.10
        libcom_err.so.2 -> libcom_err.so.2.1
        libcrypto.so.6 -> libcrypto.so.0.9.8b
        libcapi20.so.3 -> libcapi20.so.3.0.4
        libcairo.so.2 -> libcairo.so.2.9.2
        libckyapplet.so.1 -> libckyapplet.so.1.0.0
        libcddb-slave2.so.0 -> libcddb-slave2.so.0.0.0
        libcspi.so.0 -> libcspi.so.0.10.11
        libcdda_interface.so.0 -> libcdda_interface.so.0.9.8
        libcupsimage.so.2 -> libcupsimage.so.2
        libcrack.so.2 -> libcrack.so.2.8.0
        libcryptsetup.so.0 -> libcryptsetup.so.0.0.0
        libcdda_paranoia.so.0 -> libcdda_paranoia.so.0.9.8
        libcurl.so.3 -> libcurl.so.3.0.0
        libcamel-provider-1.2.so.8 -> libcamel-provider-1.2.so.8.1.0
        libcamel-1.2.so.0 -> libcamel-1.2.so.0.0.0
        libcups.so.2 -> libcups.so.2
        libcroco-0.6.so.3 -> libcroco-0.6.so.3.0.1

Please check: if you see the below line it makes sure you have libc v2.5 installed.

  libc.so.6 -> libc-2.5.so

2. OpenOffice:

a) Version Required: v3.0

b) Check if you have OpenOffice Installed:

   Open a terminal and follow the below steps:

   - Type "find / -name soffice.bin | grep openoffice | grep program | grep org3"
    i.e. root@dimdim#find / -name soffice.bin | grep openoffice | grep program | grep org3
   - Please check the location of OpenOffice installed location,

Note:
	1. If you have version lower that 1.6 then you need to install v1.6.
	2. The below open office pack also has jre along with it. If jre v1.6 is already installed then remove
	   the jre rpm from this pack before you use it for open office installation.

c) Recomended Install:

Please go to the below URL to download and install OpenOffice v3.0

	http://mirrors.isc.org/pub/openoffice/stable/3.0.0/OOo_3.0.0_LinuxIntel_install_wJRE_en-US.tar.gz

					OR

	http://download.openoffice.org/other.html#en-US

d) To install open office v-3.0.0.0 please follow below steps:
	1. Untar the open office pack you have downloaded.
	2. Go to open office directory
	3. cd RPMS
	4. You will find many rpm files ,please install these rpm files by running the below command :-
			rpm -ivh *.rpm

3. Java Runtime Environment ( JRE ):

a) Version Required: v1.6

b) Check if you have JRE Installed:

   Open a terminal and follow the below steps:

   	Type java -version

   	i.e. root@dimdim# java -version

	You should get similar output

	java version “1.6.0?
	Java(TM) SE Runtime Environment (build 1.6.0-b105)
	Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

	Type echo $JAVA_HOME
	You should get
	/usr/bin/java

	Some time java -version shows lower version even after installing newer version. This is because newer java is not in the system path.
	you can locate jre1.6 by the following command

	[root@localhost nginx]# find / -name java | grep /bin/java | grep jre | grep 1.6

	It will show output similar to

	[root@localhost nginx]# /usr/java/jre1.6.0_05/bin/java

	now do

	[root@localhost nginx]# /usr/java/jre1.6.0_05/bin/java -version
	java version “1.6.0?
	Java(TM) SE Runtime Environment (build 1.6.0-b105)
	Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

Note: If you have verson lower that 1.6 then you need to install v1.6.

c) Recomended Install:

Please go to the below URL to download and install JRE v1.6

http://java.com/en/download/manual.jsp

4. CherryPy

	a) Version Required: v3.1

	b) Check if you have CherryPy Installed:

	 Open a terminal and follow the below steps:

	   	Type python2.4
	   	Type import cherrypy

	   	You should get similar output
	   	root@dimdim# python2.4
		Python 2.4.3 (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import cherrypy
		>>>
		Above output indicates that cherrypy is installed.If it gives an output
		saying "NO SUCH MODULE" then please follow below steps.

	c) Recomended Install:

	Please go to the below URL to download and install CherryPy v3.1

	http://www.cherrypy.org/wiki/CherryPyDownload

	CherryPy Installation:
		Open a terminal and follow the below steps:
			a. Download http://download.cherrypy.org/cherrypy/3.1.0/CherryPy-3.1.0.zip
			b. unzip CherryPy-3.1.0.zip
			c. cd CherryPy-3.1.0 and chmod +x *
			d. python2.4 setup.py install

	d) Now please follow above mentioned "step 4-b" by opening a new terminal and assure that cherrypy is correctly imported in python2.4 .

5. Flup

	a) Version Required: v1.0

	b) Check if you have Flup Installed:

	 Open a terminal and follow the below steps:

		Type python2.4
		Type import flup

		You should get similar output
		root@dimdim# python2.4
		Python 2.4.3 (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import flup
		>>>

		Above output indicates that flup is installed.If it gives an output
		saying "NO SUCH MODULE" then please follow below steps.

	c) Recomended Install:

	Please go to the below URL to download and install Flup v1.0

	http://www.saddi.com/software/flup/dist/flup-1.0.tar.gz

	Flup installation:
			Open a terminal and follow the below steps:
			a. Download http://www.saddi.com/software/flup/dist/flup-1.0.tar.gz
			b. tar xvzf flup-1.0.tar.gz
			c. cd flup-1.0 and chmod +x *
			d. python2.4 ez_setup.py -U setuptools
			e. python2.4 setup.py install
	d) Now please follow above mentioned "step 5-b" by opening a new terminal and assure that flup is correctly imported in python2.4

6.	pycurl
	a) Version Required: v7.19

		Note:-
				If you are using CentOS 5.2, You need to upgrade your curl 7.15 to 7.19.
				Download curl 7.19 from http://curl.haxx.se/download/curl-7.19.0.tar.gz
				untar it tar xzf curl-7.19.0.tar.gz
						 cd curl-7.19.0
						 ./configure
						 make
						 make install
				After installing curl you need to make a soft link like
				ln -s /usr/local/lib/libcurl.so.4 /usr/lib/libcurl.so.4

	b)	Now we can proceed on pycurl installion.Just make sure you have
		python-devel package installed
		do
		yum install python-devel

	c)	for pycurl installation do as follows:

		Type
		easy_install-2.4 pycurl
		cd ..
		Type python2.4
	   	Type import pycurl

	   	You should get similar output
	   	root@dimdim# python2.4
		Python 2.4.3 (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import pycurl
		>>>

7. demjson
	a) Version Required: v1.3

	b) Check if you have demjson Installed:

	 Open a terminal and follow the below steps:

		Type python2.4
		Type import demjson

		You should get similar output
		root@dimdim# python2.4
		Python 2.4.3 (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import demjson
		>>>

	c) Recomended Install:

	Please go to the below URL to download and install demjson v 1.3

	http://deron.meranda.us/python/demjson/dist/demjson-1.3.tar.gz

	demjson Installation:
		Open a terminal and follow the below steps:
			a. Download http://deron.meranda.us/python/demjson/dist/demjson-1.3.tar.gz
			b. tar xzf demjson-1.3.tar.gz
			c. cd demjson-1.3 and chmod +x *
			d. python2.4 setup.py install

	d) Now please follow above mentioned "step 7-b" by opening a new terminal and assure that demjson is correctly imported in python2.4

8. Python2.5
        Before installation of python2.5 do

	yum install zlib*

	8-a) Download demjson from
		a. http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
		b. tar xvzf Python-2.5.2.tgz
		c. cd Python-2.5.2
		d. ./configure
		e. make && make install

      NOTE: BEFORE PROCEEDING FURTHER PLEASE NOTE THAT we need pycurl,demjson,flup,cherrypy modules in python 2.5 also.To
      do this follow below steps.It will be using the same cherrypy,flup,demjson,pycurl which you have already downloaded
      in above steps 4-7.Now configure those with python2.5 as follows

	8-b) CherryPy for python2.5

		Version Required: v3.1

	   	a. Go to the directory where you downloaded the cherrypy package.
		b. cd CherryPy-3.1.0
		c. python2.5 setup.py install
		d. rm -rf CherryPy-3.1.0
		e. rm -rf CherryPy-3.1.0.zip

		You should be out of Cherrypy-3.1.0 directory and then
		Type python2.5
	   	Type import cherrypy

	   	You should get similar output which indicates that cherrypy is successfully installed with python2.5
	   	root@dimdim# python2.5
		Python 2.5.X (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import cherrypy
		>>>

		Above output indicates that cherrypy is installed and imported in Python2.5 correctly.

	8-c) Flup for python2.5

		a. Version Required: v1.0

		b. Go to the directory where you downloaded flup

		c. cd flup-1.0 and chmod +x *

		d. python2.5 ez_setup.py -U setuptools

		e. python2.5 setup.py install

		f. rm -rf flup-1.0

		g. rm -rf flup-1.0.tar.gz

		Open a terminal or move out from flup-1.0 directory and follow the below steps:

		Type python2.5
		Type import flup

		You should get similar output
		root@dimdim# python2.5
		Python 2.5.X (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import flup
		>>>

		Above output indicates that flup is installed and imported in Python2.5 correctly.

	8-d) demjson for python2.5
		a. Version Required: v1.3

		b. Go to the directory where you downloaded demjson i.e. cd demjson-1.3

		c. cd demjson-1.3 and chmod +x *

		d. python2.5 setup.py install

		e. rm -rf demjson-1.3

		f. rm -rf demjson-1.3.tar.gz

		Now to check you must change your directory cd .. and then
		Type python2.5
		Type import demjson

		You should get similar output
		root@dimdim# python2.5
		Python 2.5.X (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import demjson
		>>>

	Above output indicates that demjson is installed and imported in Python2.5 correctly.

	8-e) pycurl for python2.5
		a) Version Required: v7.19

		b) Now we can proceed on pycurl installion for python2.5 .

		c)for python2.5 pycurl installation do as follows:

		Type
		easy_install-2.5 pycurl

		Type python2.5
	   	Type import pycurl

	   	You should get similar output
	   	root@dimdim# python2.5
		Python 2.5.2 (r252:60911, Oct  9 2008, 08:13:08)
		[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
		Type "help", "copyright", "credits" or "license" for more information.
		>>>import pycurl
		>>>

9. Port availability

	Port 80, 1935, 40000, 40001, 40002 , 40005 must be free in the machine on which you intend to install Dimdim Web Meeting Server.

	The Dimdim Servers use ports 80 &1935 for external communication. But port 80 alone is enough to be opened for external communication.
	In addition, ports 40000/ 40001/ 40002 / 40005 must be free for internal communication.

DIMDIM INSTALLATION:
====================

Installation Steps:

Step 1: Download dimdim rpm package

Step 2: Install rpm package by typing the command rpm -ivh Dimdim-4.5_SF_i386.rpm in a terminal

	Dimdim-4.5 will be installed under location /usr/local and a soft link for dimdim will be created under /usr/local.

        The place holder will exactly look like
        --- usr
          |
          |--local
          	|
          	|--dimdim
          		|
          		|--ConferenceServer
			|
          		|--CobrowsingManager
          		|
          		|--DTP3
          		|
          		|--MediaServer
          		|
          		|--red5
          		|
          		|--nginx
			|
			|--ThirdPartyPackages

Step 3: By default, ip address of ethernet 0 interface of the box is configured for Dimdim Server.

	i) To stop Dimdim, open a terminal and enter stopDimdim
	ii) To start Dimdim, open a terminal and enter startDimdim.

	To start the meeting do
	http://<ipaddress>/dimdim/

Note: If the ip address is not the same or if you need to configure with different IP address, follow the below steps:

Step A:	Get the IP Address of the machine

 	Example:
      		root@localhost dimdim]# ifconfig eth0

      		The output will look like:
	         	  eth0      Link encap:Ethernet  HWaddr 00:0C:29:CA:FA:7C
		          inet addr:192.168.1.10  Bcast:125.255.255.255  Mask:255.0.0.0

		The IP Address for the above example is 192.168.1.10

Step b: Configure all the Dimdim components

		There may be two cases:
		1. Network has public and private IP mapping,

			ExternalIP:port --> Internal:port

				Please note that port should be same, Port 80 is recommended.
				For example: 123.X.X.X:80 ---> 192.168.X.X:80
					publicIP is mapped to privateIP

			Use Config-ipaddress.pl like below
				cd /usr/local/dimdim
				./Config-ipaddress.pl 123.X.X.X 80 192.168.X.X

		2. VM has a singleIP, There is no network mapping(no Network Address Translation):

			Use Config-ipaddress.pl like below
				cd /usr/local/dimdim
				./Config-ipaddress.pl 123.X.X.X 80

Step c: On completion of configuration, open a terminal and enter the command "startDimdim". This will start all the Dimdim components.
To ensure all Dimdim Components are started, check the status of the Dimdim Components.

You are now ready to start meeting. Start the meeting by providing the URL http://<IPAddressORHostnameConfigured>/dimdim/.
Please note the trailing slash is required in the URL after dimdim.Example http://192.168.1.10/dimdim/

Dimdim Sever Machine Restart:
=============================

When the machine where Dimdim Server installed is restarted,
	open a terminal and type startDimdim - This will start Dimdim Server

Dimdim SMTP Server Configuration :
==================================

Please note that the current smtp settings are just sample setting. It is adviced that you change these settings to your own smtp configuration.

Below is suggested way to modify the smtp configuration

1) Open dimdim.properties configuration file

Go to folder cd /<dimdim_home>/ConferenceServer/apache-tomcat-5.5.17/webapps/dimdim/WEB-INF/classes/resources/

i.e. cd /usr/local/dimdim/ConferenceServer/apache-tomcat-5.5.17/webapps/dimdim/WEB-INF/classes/resources/

2) Modify the below settings as suggested. Please note that setting "dimdim.smtptype" needs to be configured depending on the type of smtp server.

##	Email Parameters that can be configured by the user.
##
email.server=<gmail smtp server address>
email.user=<your gmail id>
email.password=<your gmail account password>
email.sender=<your gmail account id>
email.PORT=465
email.EMAIL_CC=
email.EMAIL_BCC=
##
##
email.PROTOCOL=smtp
email.DEBUG_MAIL_SESSION=false
email.BUFFER_SIZE=2048
email.EMAIL_SUBJECT = has invited you to a Dimdim web meeting.
email.EMAIL_FROM_PERSON=DimDim Invitations
email.EMAIL_FROM=<your gmail account id>
email.EMAIL_REPLY_TO=<your gmail account id>
email.EMAIL_TO=
email.EMAIL_CHARSET=utf-8
##
##
##  This property refers to type of the SMTP Server
##  1 : Non SSL SMTP Server i.e. Dimdim SMTP Server
##  2 : SSL SMTP Server  i.e. gmail SMTP Server
dimdim.smtptype=2
##
##

DIMDIM UNINSTALLATION:
======================

Step 1:	rpm -e 	dimdim

	All the Dimdim Components installed by rpm package will be removed.

Note:
	    1. Please don't try to change the IP Address or port numbers for the Dimdim components by directly
	       going to the components' folder.

	    2. This Dimdim pack is only for 32-bit Operating System machines.

    	3. This is tested with CentOS 5.2.

Problems:
1. First free port 80 on server
Port 80, 1935, 40000, 40001, 40002 , 40005 must be free to install Dimdim Web Meeting Server.

so, just stop apache service running on port 80….
# service httpd stop
# /etc/init.d/httpd stop

2. Skip OS check
DimDim – Dimdim-4.5_SF_i386.rpm require CentOS 5.2 … if you want to install it on CentOS 5.3 then have to skip OS check ?
There is a file which check OS “/etc/issue”

# vi /etc/issue
here replace CentOS release 5.3 (Final) to CentOS release 5.2 (Final)

3. Change IP:Port
# cd /usr/local/dimdim
# ./Config-ipaddress.pl 123.X.X.X 85

here you have changed IP to 123.X.X.X and port to 85

Wow!!… now you have your own web based seminar (webinar) server where you launch multiple meetings simultaneously 🙂

send xml over post

On October 25, 2009, in Fedora, PHP, Tips, Web Services, by phpsolutions

<?php

/*

$url = Web Service Url or Server Url where xml have to post

$xml = XML  schema to post on server

*/

function sendXmlOverPost($url, $xml)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);

// For xml, change the content-type.
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array(“Content-Type: text/xml”));

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // ask for results to be returned
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

// Send to remote and return data to caller.
$result = curl_exec($ch);
curl_close($ch);
return $result;

}

?>