Wednesday, June 18, 2008

PHP Warning: PHP Startup: Unable to load dynamic library 'php_mysql.dll' - The specified procedure could not be found.

Well, i m highlighting this line, so that you all vl know the intensity with which this one has bugged me. Yeah, i was struggling with this one for 3 looooooonnnnnnng days.. After trying my hand @ jsp now jus came in the php-room to have a lil bita dancing in the party.. ;D... well, first i installed php5+apache2.2+mysql5.0.41. It was gr8 to see the hello world on my browser. I then thought of creating a small application insert, update, delete. But guess what?? i started getting the above error. After a lotta googling around, on 90% of the forums i found only a single answer, i.e. this bug is with the libmysql.dll supplied with Mysql, so weel have to use the libmysql.dll supplied with the zip installer.
Reinstalled php using php zip package, but no luck.
Only solution to this i found on somewhere third page of a google result was resolve this error using the Apache way.
Jus add following lines to ur Apache httpd.conf file and it does it all. No need to copy any dll's.

LoadFile "C:/Software/PHP/libmysql.dll"
PHPIniDir "C:/Software/PHP/"

LoadModule php5_module "C:/Software/PHP/php5apache2_2.dll"


Well, what apache does is its loads the specified dll before any one else search for it. Thanx to Apache and Sander for finding this out. Well this guy has kept his comments Off, so i cudnt thank him on his blog.. No matter. Now my php5+mysql5.51+Apache2.2 on Windows is working like a Maska [Desi word for smooth ;)]

Please change your directory accordingly in the path. Above code is specific to my settings.
Tip: Dont rely on the MSI- Installer of php. Windows go mad, use the zip installer, works gr8!

njoy ;)

Wednesday, June 11, 2008

InnoDB v/s MyISAM

InnoDb
1) recovers from crash/ shutdowns by replying its logs. Hence, InnoDB approach is approximately fixed time.
2) Caches reads and writes to data rows within the engine itself.
3) Stores data rows physically in primary key order. Uses MS SQL Server featrue of "Clustered Indexes."
4) Doesnt support compression and terse rowformats.
5) Can be used for tables which needs performance and data security.

MyISAM
1) fully scans and repairs any indexes which had been updated. Time taken using MyISAM approach depends on the size of the data files.
2) Relies on OS for caching reads and writes to data rows.
3) Stores data rows mostly in the order in which they are added. Uses Oracle feature known as "Index Organized Tables".
4) Support compression and terse rowformats.
5) Can be used for tables which are used for search purposes.


The last point is possible b making the database as InnoDB and selective tables in that DB as MyISAM. This is possible in MySQL

Monday, June 9, 2008

Cools gadgets : Digital Photo Keychain


Hi folks, the world is becoming smaller, closer and more compact... and all this is possible coza technology.. Every where we can see small gadgets which are self running. Every gadget has a tiny lil silicon chip, which does all the dirty work.. Right from mobile phone to our iPod's.. everything has a chip in it.. Last week i found a similar gadget which is very tiny but vei vei handy.. Well this gadget sits inside an attractive Digital Photo Keychain and has a 1.5inch 128X128 LCD display. Apart from this it has 4.8 MB internal memory which can store abt 72 pictures with formats supporting JPG, BMP, GIF, PNG. A slideshow with adjustable slide time, time display, auto cropping of pictures, rechargeable battery. And guess what it weighs jus 85gms... gr8 isnt it??? So.. how about changing ur key chain pics daily as if u change ur clothes... :P...

Wednesday, June 4, 2008

Apache + Tomcat + mod_jk.. how does it work...

In a nutshell a web server is waiting for client HTTP requests. When these requests arrive the server does whatever is needed to serve the requests by providing the necessary content. Adding a servlet container may somewhat change this behavior. Now the web server needs also to perform the following: Load the servlet container adapter library and initialize it (prior to serving requests). When a request arrives, it needs to check and see if a certain request belongs to a servlet, if so it needs to let the adapter take the request and handle it. The adapter on the other hand needs to know what requests it is going to serve, usually based on some pattern in the request URL, and to where to direct these requests. Things are even more complex when the user wants to set a configuration that uses virtual hosts, or when they want multiple developers to work on the same web server but on different servlet container JVMs.