Friday, December 31, 2010

Apache Error PHPMotion The requested URL /upload-media was not found on this server

When you setup PHPMotion video website you will encounter the following error first,

The requested URL /upload-media was not found on this server.

It happens due to the error in Apache Config. Add the following Directory Element to the config file.

<Directory "/var/www/htdocs/htdocs">

Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

</Directory>



The above directory entry assumes that you have installed phpmotion in /var/www/htdocs/htdocs.

It all happens since .htaccess is denied to run from those directories.

Thursday, December 16, 2010

Worked in Command Line but not through Apache

If something works locally and if that is not working through Apache or outside of the box in a linux system. It cab be of two problems.

1. iptables
2. selinux


With iptables, mostly outgoing connection will not be a problem if the NAT is set properly.
SELinux works on top of it.

setsebool -P httpd_can_network_connect=1

Will all outside the box connectivity with Apache or any other resources.

Add VMware Tools into CentOS 5.5

Sometimes, adding an existing software can be of pain with less documentation. This is one the scenario I had to face it. Lab manager from VMWare provides easy spinning of virtual servers, to get the template complete you need to get the necessary tools installed before you publish. When I click on install, it actually mounts the ISO to the directory but it does not installs it.

find . | grep VMware
mount (found dev)  localdir
cp VMware....  ~/
tar zxvf VMware.....tar.gz
cd vmware-tools-distrib
./vmware-install.pl


You are done. It installs all the Guest Additions before you publish the machine template.

Friday, December 10, 2010

Splitting PCAP or CAP Files

Tool that comes with Wireshark has inbuilt split of the captures. In case if you set the file to higher size, then you can split the file as below.


C:\Program Files\Wireshark\editcap.exe  -c numberofpackets   infile outfile

In linux,

path of wireshark in most of the systems will be in the PATH

editcap -c numberofpackets infile outfile

should split the files into smaller size.

Wednesday, October 20, 2010

Need Digital Frame From Apple

One of the things I liked from Apple Technologies, every product works good for layman without much difficulty.

Apart from all the range of products like mp3 players to iPod, phone to iPhone, tablet to iPad, tv to AppleTV etc., Like this I want to see something like iFrame just to see pictures in the wall. Ideally I would like to see 6 to 23 inch screens to see the clarity of the pictures taken these days. I'm not convinced with any of the manufactures so far.

Specifications:

  1. 6 to 23 inches
  2. Update over the wifi
  3. Physical Network Capable
  4. Auto Contrast
  5. Video Capable
  6. Read the images from rss feeds, standard hosting websites.
  7. Touch screen settings

Monday, August 23, 2010

Iphone 4 - Free Bumper Case - Steve Jobs Design

With the greatness and trust on Steve Jobs and his team's design on iPhone4. Bought that little gadget. Claims were made for the signalling problems (also applied some magic formula to show the signal strength high) and the creators compared with the all the phones available in the market to show they are not worst compared to others. All for making money sake and not to accept their poor design.



I ordered the poor Apple's Bumper another wrong assumption that their creation is great. I used to listen to songs and audiobooks on my travel using the Panasonic Noise Cancellation Headphones. This little bumper cannot even accept the standard stereo plug into the socket of the iPhone4 with the Bumper. If you plug it in it throws it away automatically. Please don't blame to Apple, Steve Jobs will bring all phone and insert the stereo plugs to those phones and will create a web page like this.

Last but not the least, I throwed the Apple's Bumper to the shelves and got another one from Costco which did the same job plus it accepted all types of stereo plugs.

Worthless Free Case. Another poor design from a creative company.

Trust me. I'm not a regular phone user. I like using Applications based upon Data. Iphone4 is not good as a phone, but somewhat good for data applications with a better graphics.

Friday, August 20, 2010

php-cgi.exe exceeds the current memory limitation

Problems:
Memory on php-cgi runs out when executing php-scripts.
Formula for Instances:

Ideal Instances: (TotalMemory in GB/Instances) < 2

Recommended Instances: (TotalMemory in GB / Instances) < 1

If you are using IIS or apache check for the following parameters which affects the performance of php,

These are settings in
php.ini Settings:
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 14400 - After 4 hours it resets all the Garbage collected Data.


Web Server Settings:

NumberofRequest Per Instance
MaxRequests for the CGI
Maximum Number of Instances

It works charm with distributed memory on the distributed instances.

Thursday, August 19, 2010

How to find whether a mail is sent or Received?

I was thinking of a way to find whether an email in a folder whether it is Sent or Received mails. It may happen through any of the existing protocol (POP3, IMAP).

Check for "Received" header in the email headers. If you have values on the received headers then it is a Sent Email otherwise it is a received email to that mailbox.

Sunday, August 8, 2010

Warning: Cannot modify header information - PHP error on packages - Solved

Warning: Cannot modify header information

You can resolve this error in three ways. This recently happened on a plain vannila wordpress install just modifying the wp_config.php in windows. The file encoding got changed to UTF (With BOM).

As a normal user if you are just installing the package or if you edited a file then this is purely a encoding problem on the file.

Use editor like notepad++ and change the encoding of the file (Encoding Menu) to ANSI or if the File is in UTF-8  then encode in Encode in UTF-8 Without BOM. This should resolve the problem.

If you are developer having code problem,

  1. Chances you have space or empty lines or characters going out of your code before the
  2. Use ob_start(); function. If you cannot control the output then use ob_start(); function at top the page, then your problem of "modify header" will be resolved. ob_start() is output controlling function. This is an urgent way of fixing it but not a clean way.


Hope this helps.

Wednesday, August 4, 2010

SugarCRM Relationship Error - Solved

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in E:\SugarCRM\modules\Relationships\Relationship.php

If you get error like this means your cache is having a problem. Delete all the files and rebuild the cache twice. It is also wise to copy the cache directory from a working SugarCRM instance and rebuid the cache twice.

Enjoy.

Tuesday, June 8, 2010

IPhone 4 - 3G - SIP

I'm using iphone right from the first generation. Somehow apple made a nice user interface which is much appreciated. Eventhough it still needs reboot like windows after using sometimes.

One thing much appreciable about the 4th Version is the open standard. HTML5 and the SIP. With SIP it must be easily interoperable with many services and easier to extend the services to enterprise market. Extending SIMPLE to Iphone 4, also let know about the presence of the user before we call them. So we can avoid voicemails and hit calling them. We can also make automated relaxed call as soon as the other person is available.

I foresee Mobileme will bring video from iphone and you should be able to watch Iphone video from Browser through your http connection. No extras fittings.


Thanks to Endgadget for the photo.

Nice list with the nice interface.

H.264 & AAC is the codec
SIP - Session Intiation Protocol
STUN - Session Traversal Utilities for NAT
TURN - Traversal Using Relay NAT
ICE - Interactive Connectivity Establishment
RTP - Realtime Protocol
SRTP - Secure RealTime Protocol

Also on my dreams I should be able to have more than one phone number for my mobile. With these technologies you have any country phone number to your mobile. Providers such as localphone are readily available on Open Standards to connect with them.

Thanks to Jeff Pulver for creating me interests on these technologies. He made me to make the first VoIP Call to Newyork, USA from London, United Kingdom in 2002. Kudos to Steve Jobs for making the nice graphics workable box again.

Sunday, April 11, 2010

Cisco 7960 Funny Bugs on SIP Proxy changed through keypress

During the recent upgrade I was about to change my network topology and separate it into different networks. I need to get my SIP Proxy also changed. I changed in the phone manually and rebooted the phone to take effect. Funny 7960 saved all the settings and did not connect to the SIP Proxy. Checked with Wireshark and checked all the packets around, found it is still looking for previous SIP Proxy server.

Easiest way to check the 7960 phone is to telnet into it with ("cisco") as default password. type "show network" to know more about the network configuration of the phone.Changed the alternate tftp server to "Yes" the changed the tftp server. (God, atleast this works.).

Gets is configuration from the configuration file through tftp and went on smoothly from there.
It is another bug which makes the user to mess around with the phone. Poor regression testing from Cisco again.

Enjoy with the phone.

17 Steps to Openwrt Setup With Asterisk 1.4 on WRTSL54GS or Similar Routers - 30 Minutes

This is my recent experience in getting Asterisk 1.4 on WRTSL54GS routers. It is much easier than my previous installations on the routers.

We will go from the scratch in getting the router running in Openwrt and in Asterisk.


Step 1: Select the right image of Openwrt for your router.
Step 2: Telnet into the router with root and empty password.
Step 3:  Change password with passed command and exit.
Step 4: Login to router with SSH login.
Step 5: Install the latest Stable webif(2) from xwrt.
Step 6: Reboot and Login to router from the browser. (This is to tweak some settings if you want)
Step 7:  ipkg install  kmod-usb-uhci kmod-usb2 kmod-usb-storage kmod-ext3 fdisk e2fsprogs
Step 8: Format the external USB Disk to ext3 file system you don't need multipartition, single partition is enough.
Step 9: Attach usb disk to the router
Step 10: Mount the USB Disk to /opt directory. Even if it is already automounted to different directory you can mount it to different directory too. Use the following command to do it.
           mount -t ext3 -o noatime /dev/scsi/host0/bus0/target0/lun0/part1 /opt & Add it to the Startup script using the webif from browser.
Step 11: Reboot.
Step 12: Let us install additional softwares to the USB Disk. Poor manufacturers gave us with only MB of memory in the routers. Let us add 2GB of data to it. :)
Step 13: wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install.sh
Step 14: sh /tmp/optware-install.sh
Step 15: Let us install asterisk and additional voice files to
               /opt/bin/ipkg-opt install asterisk14-core-sounds-en-alaw asterisk14-core-sounds-en-g729 asterisk14-core-sounds-en-gsm asterisk14-core-sounds-en-ulaw asterisk14-extra-sounds-en-alaw asterisk14-extra-sounds-en-g729 asterisk14-extra-sounds-en-gsm asterisk14-extra-sounds-en-ulaw asterisk14-moh-freeplay-alaw asterisk14-moh-freeplay-g729 asterisk14-moh-freeplay-gsm asterisk14-moh-freeplay-ulaw asterisk14 asterisk14-gui libogg radiusclient-ng sqlite2 unixodbc iksemel net-snmp

Step 16: To the Startup Script Mount the USB Disk and startup asterisk.

/opt/etc/init.d/S99Asterisk:
#!/bin/sh
if [ -f /opt/var/run/asterisk.pid ] ; then
  kill `cat /opt/var/run/asterisk.pid`
else
  killall asterisk
fi
rm -f /opt/var/run/asterisk.pid
umask 077
/opt/sbin/asterisk

Step 17: Configure your voip clients and Start Making Calls.

Friday, March 26, 2010

Cache on IIS 7 with SugarCRM Windows Server 2008

If you are planning to run Cache enabled on SugarCRM with II7 then you will face weird issues. IIS caches the php pages and serve the same content to different users. With that you can see other person's userid on your pages, that is not coming from SugarCRM that is coming from IIS Cache.

It happened in Windows 2008 Server.

The only option as of now is to disable IIS Cache so all pages will be generated directly from php.

Thursday, January 14, 2010

Expectations on Google Phone

Google recently released NexusOne which is total crap to my expectations. I was so eager to get Gmail Account when they introduce gmail and most of the Google products eventhough it is over the edge on consumer privacy.

My expectations on Google as a phone is:

1. Free Phone Calls without any contract binding
2. Free Phone
3. Free Data Connection
4. Make money with advertisement.

Make open to applications free to air services and the tons which a mobile can provide.