Saturday, June 20, 2009

player status as on 20-06_09

play movie here



















Testing the working nature of the hsplayer in another blog with limited width.
Please click on the 5p icon on the panel to toggle the 5p display
Enhancements done:
1. Tabs and colors made optimum for better look on the blog.
2. Enhanced button mode for the canvas.

Friday, June 19, 2009

player status as on 19_06_09

play movie here



















Testing the working nature of the hsplayer in another blog with limited width.
Please click on the 5p icon on the panel to toggle the 5p display
Enhancements done:
1. Display of 5p modified to look better than the older version.
2. Tab navigator changed to the better colors.

Wednesday, June 17, 2009

New enhanced player with more functionality

play movie here



















Testing the working nature of the hsplayer in another blog with limited width.
Please click on the 5p icon on the panel to toggle the 5p display
Enhancements done:
1. 5p Icon moved to the panel title bar to be more visible to the user
2. Player made more opaque to be able to display properly.
3. 5p made opaque and will appear only when clicked on the 5p icon being made.

Tuesday, June 16, 2009

Test page for the new hsplayer

play movie here



















Testing the working nature of the hsplayer in another blog with limited width

Friday, April 17, 2009

HSEditor

play movie here

Tuesday, April 7, 2009

Five P Player in javascript

Here i am including a javascript coded five p player for the video.. Gladiator.. Have added my favourite Netha Lalu prasad into the people category


Flash content to be written here


Thursday, March 12, 2009

how to customize your php settings for a folder

Lets say i have a particular file in php that processes file uploads and takes executes a program which takes about 4 minutes for full execution. By default, the php configuration is set to maximum file size of 2MB and execution time of about 60 seconds(1 minute). If you have to change the configuration in the php.ini file, it will change the settings for all the projects that are present in the server. This is not advisable. Again if you are trying to host them on  a server, the hosting party might not allow you to do so. Here are few work arounds that I would suggest.

1) ini_set() function PHP allows the configuration values to be set within a file itself for particular configuration parameters.  This function can be used in any file which you want the customized configuration. Further this is limited to only certain configuration parameters.  This will be discussed in the later part.

eg: ini_set('display_errors',1);

2) php.ini : PHP allows a customised php.ini file to be located in a single directory to override the parameters that are present in the root directory. Many of the hosting providers support this type of functionality. Only the parameters that you might want to be changed can be written in this file and stored in the directory to which you want to apply. However some hosting providers wont let you change some parameters like max execution time for their performance purpose.

eg:

display_errors 1
upload_max_filesize =13M
post_max_size= 20M

Thus your problem gets solved

3).htaccess:  For those who can tweak the .htaccess file to a value, this is one more option. You can create a .htaccess file for the directory. Note that in the main httpd.conf file, you have 

allowOverride Options

for the directory. Else this will not work. In the .htaccess file, you can specify the values for some parameters and also flag them (for magic_quotes, display_errors which have only two values)
Again this is to be tweaked and kept properly.

Eg :

php_value upload_max_filesize 13M
php_value post_max_size 20M

Please note that if you try to use it with .htaccess, you will have to restart the server to make it come to effect.


Now here is an explanation of what can be changed and what params cannot be changed in the php configuration and their levels.






In the appendix of the above link, the Changeable  column decides where the functions can be changed. 

PHP_INI_PERDIR implies that the settings needed to be changed in a directory level and not in a single file. This can be done either using method 2 or 3 that i mentioned above. The minimum php versions are specified in the link.

PHP_INI_ALL implies that the param settings can be changed anywhere. you can any of the methods that i specified.

PHP_INI_SYSTEM implies that the param settings can be changed only in the root php.ini file and cannot be changed else where.

I have struggled about three days to get to know about this and didnt want to make it lost. 


Tuesday, February 10, 2009

LogRotating in Apache Windows Version


While running apache server one of the typical problems faced is how to make a backup of the log files per day or when the size exceeds a particular limit.

Problem:
If you have an apache server running over a month and various users using the system, the error.log and the access.log files become huge(mine was about 670MB). This creates problem to readability and system security. We need a mechanism by which apache can manage its own log files.

Solution:

In unix there is a piped system where the user can direct the error logs to a script which will write the errors in a particular log.

Windows installation of apache comes with a program called rotatelogs.exe which can be found in the bin directory of the Apache Folder.


This explanation is only for windows version of apache.
How to make the access log rotated ?

In the httpd.conf file , look for a variable called CustomLog 
Typically it will be given as 
CustomLog "logs/access.log" common
Change the line to 
CustomLog "| bin/rotatelogs.exe logs/access%Y_%m_%d_%H_%M_%S.log 86400 -300" common
This will create a separate access file each time you start the server. If the server is running for more than a day or if the access file size has exceeded more than 300MB, it will create another access file.

Explanation : 
                   logs/ the folder which will contain all the log files
                   access -> the initial name of the file to be kept so that you know its the access log
                  %Y_%m_%d_%H_%M_%S -> The time stamp created to keep the file unique and readable so that you know when it was created
                    86400  - delay in seconds unitll which there shall be no file created
                   300 -> the limiting size of the file in MB


Similarly for an error log file also
ErrorLog "| bin/rotatelogs.exe logs/error%Y_%m_%d_%H_%M_%S.log 86400 -300" 
This command will create the error file once the server starts.
Note that the CustomLog has a common at the end and ErrorLog doesnot have it. This has created an error to me while doing the configuration.

quite usefull if you want to maintain a precise information for errorlogs in your server.

Friday, January 23, 2009

Web service Creation guidelines

The first and foremost thing to be considered while creating a webservice is what will be the response.
The best way to send a response for a webservice is to send it as XML node or a string.

Response should be descriptive of what the request wanted and what happened to the request.
Most of the cases, a success result will be sent as OK or success.

Failure codecs are the first ones to be decided while creating a web service. 
Consider what are the failure scenarious and codecs to be written for each type of error which should be understandable by both the parties.

While establishing a connection between any service requester and the service that is being provided, decide upon two things before starting to code:

1. What will be the request format
2. What will be the response format
Once these two are decided and documented, further parsing and sending of each data will have to be done by both the parties. 

Remember, its not called a service unless it responds.