Archive for September, 2008

Difference between PHP4 and PHP5

Posted in PHP, Technical with tags , , , on September 30, 2008 by saffrongeek
  • A new OOP model based on the Zend Engine 2.0
  • A new extension for improved MySQL support
  • Built-in native support for SQLite
  • A new error reporting constant, » E_STRICT, for run-time code suggestions
  • A host of new » functions to simplify code authoring

New Functions

In PHP 5 there are some new functions. Here is the list of them:

Arrays:

  • array_combine() – Creates an array by using one array for keys and another for its values
  • array_diff_uassoc() – Computes the difference of arrays with additional index check which is performed by a user supplied callback function
  • array_udiff() – Computes the difference of arrays by using a callback function for data comparison
  • array_udiff_assoc() – Computes the difference of arrays with additional index check. The data is compared by using a callback function
  • array_udiff_uassoc() – Computes the difference of arrays with additional index check. The data is compared by using a callback function. The index check is done by a callback function also
  • array_walk_recursive() – Apply a user function recursively to every member of an array
  • array_uintersect_assoc() – Computes the intersection of arrays with additional index check. The data is compared by using a callback function
  • array_uintersect_uassoc() – Computes the intersection of arrays with additional index check. Both the data and the indexes are compared by using separate callback functions
  • array_uintersect() – Computes the intersection of arrays. The data is compared by using a callback function

InterBase:

iconv:

Streams:

Date and time related:

Strings:

  • str_split() – Convert a string to an array
  • strpbrk() – Search a string for any of a set of characters
  • substr_compare() – Binary safe optionally case insensitive comparison of two strings from an offset, up to length characters

Other:

Advertisements

Being with consciousness today is to have biased character

Posted in medical, society with tags , , on September 29, 2008 by saffrongeek

Well, Are we biased when we respond to life situations? To be frank, if someone toss this question at me, my reply would be a big ‘Yes’.Let me site an incident to make my point:-

Two weeks back , I was in my hometown as I had to get an appointment token for my mother’s checkup.While I was done with the registering process, and was making my way to my bike in parking bay, I could notice a crowd to the sides of the footpath. A bit of effort , got me the reason for the crowd. A man was lying there and all of us had a view of him. Few stayed by to discuss and form crowd and none of us put a bit of effort to check what is the real reason. We assumed few parameters and infered that he is a drunkard. Not to leave, few even cursed him for lying there.

Later, in the evening daily I came to read of this incident and report mentioned he passed away due to a mild heart attack. He had come to see his relative in ICU and had fallen unconscious while he was out to get some snacks for relatives from the canteen.

If one of us in the crowd, tried to get him proper medical care on the right time, might be he would still be alive. Why didnt none of us were bothered was that, we didnt knew him and even if we did, he should fall in to mine close near or dear one to act humane.

Few Favorite Album Picks for public

Posted in @home, work with tags , , , on September 28, 2008 by saffrongeek

July 28/2008 [ Pre Onam Get together ]

http://picasaweb.google.co.in/saffrongeek/AbhiandmamafunsZ?authkey=AFd24oIo44g#

Feb 27/2008 [ Abhis First Birthday ]

http://picasaweb.google.co.in/saffrongeek/Birthday_abhis?authkey=O7fzY1bm0d8#

Dec 30/ 2008 [ SB New Year outing Party: public shared ]

http://picasaweb.google.co.in/saffrongeek/SbNewYearParty?authkey=UbYV-ussHck#

October 30/2008 [ Trivandrum on a evening roaming collections ]

http://picasaweb.google.co.in/saffrongeek/TrivandrumMuseum?authkey=gy619yf2rXY#

October 21/ 2008 [ Trivandrum Veli Tourist location ]

http://picasaweb.google.co.in/saffrongeek/VeliTravel?authkey=5kcLRm-PjRU#

October 06/2008 [ Team Party – A day Outing]

http://picasaweb.google.co.in/saffrongeek/Parties?authkey=JkJ6ePNAS9A#

Sisz Album poses

http://picasaweb.google.co.in/saffrongeek/Baavaz_kalyanam_special?authkey=PzZrVdfEso4#

Eclipse and PHP Development

Posted in Linux, PHP with tags , , on September 27, 2008 by saffrongeek

I had worked with linux machine some years now for development. While i was doing my studies the one thing that i was so found of was the Linux and playing with the linux box to meet my few needs, but though not enough successful many times, still gave me a strong base of layout below i think.

Now, not in my server i got linux but right in my development machine and I was checking eclipse to get the development environment for PHP.Yep! Knowing the i unknowingly got it installed made me feel excited but it was not a easy job to use it. My next thought was is there any other easy way to use eclipse for my development needs.

And here I finds something really nice to have : PHP Development Kit. What more , any XAMPP or WAMP fanatics, how about PDT All in one. Yes, you get eclipse , Subclipse for version managment and Zend Debugger and JSclipse for javascript. WOW!

Ok, let me share the links that would be a good reading for the setting up and knowing more on this environment.

NOTE: I DIDNT HAD THE ZEND DEBUGGER, OR JSCLIPSE OR SUBCLIPSE BY DEFAULT ON MY PDT ALL IN ONE. ALSO, ZEND DEBUGGER add on would solve your PHP executable path and some debug  related worries.

Even now, i got some problem installing the Subclipse as it says some depencies. OK, keeping it for my freetime to check further but I would appreciate if someone could do give me some pointers.

So, coming to sharing a few links that i had read:

http://2tbsp.com/node/40
http://www.encorewiki.org/display/~nzhao/Installing+PHP+Development+Tools+on+Fedora+7#InstallingPHPDevelopmentToolsonFedora7-InstallPHPDevelopmentTools
http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_PDT

Download all in one link
http://download.eclipse.org/tools/pdt/downloads/release.php?release=S20080601-RC2

The debugtester and the documentation is available for download at this url:
http://www.kinetiek.com/files/download/debugtester.zip.

Hope you might find this a useful.

yum yum yummieeee :: installllllllllllll

Posted in Linux with tags , on September 27, 2008 by saffrongeek

A very handful update command:

Usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update, list, remove, clean, grouperase >

Options:
-h, –help            show this help message and exit
-t, –tolerant        be tolerant of errors
-C                    run entirely from cache, don’t update cache
-c  [config file]     config file location
-R  [minutes]         maximum command wait time
-d  [debug level]     debugging output level
-e  [error level]     error output level
-q, –quiet           quiet operation
-v, –verbose         verbose operation
-y                    answer yes for all questions
–version             show Yum version and exit
–installroot=[path]  set install root
–enablerepo=[repo]   enable one or more repositories (wildcards allowed)
–disablerepo=[repo]  disable one or more repositories (wildcards allowed)
-x [package], –exclude=[package]
exclude package(s) by name or glob
–obsoletes           enable obsoletes processing during updates
–noplugins           disable Yum plugins
–nogpgcheck          disable gpg signature checking
–disableplugin=[plugin]  disable plugins by name

How to install a RPM Package w.r.t mysql-gui

Posted in Linux, mysql with tags , , on September 27, 2008 by saffrongeek

The purpose of this in-view is to let you know some basics stuff to search and know further. I would mention only the basic command and a optional parameter that would let you sail safe, with a rpm package.

Linux Flavor : Fedora

Command : rpm -i {packagename}.rpm

I had just downloaded the mysql GUI and was trying to use the command line to install the 4 rpm packages that came bundled with , the above command gave me some dependecies with two of the packages, especially with administrator and query browser.

So, might be the order of installation was not the right but i think i got these out of the way with

Command: rpm -i –nodeps {packagename}.rpm

After this , I do find the packages in the frontend Programming portion but still, to be frank only the mysql administrator works not the query browser. Need to check what is the

error: Failed dependencies:
libgtkhtml-3.8.so.15 is needed by mysql-query-browser-5.0r12-1fc5.i386
mysql-gui-tools = 5.0r12 is needed by mysql-query-browser-5.0r12-1fc5.i386

Still, might be some section above would be useful for myself to read later and sure , i would correct it after doing some play around.

Must read : Installing MYSQL GUI

https://saffrongeek.wordpress.com/2008/11/19/installing-mysql-in-fedora-9/

Virtual Hosts Related Pointers

Posted in Apache with tags , , , on September 25, 2008 by saffrongeek

There are occasions when you would like to have some meaningful urls like http://projectA or http://projectInfinite on the browser rather than always typing to the point folder. Dont you think its weird to remember the whole length or see the whole long shot like ‘http://localhost/projectA&#8217; or ‘http://localhost/projectInfinite&#8217; etc,

So, let me give some quick insights, might not be full , might be too brief but definitely would serve the purpose for a quick understanding and work around, especially when you dont have lots of time to read contents to get some basic ideas.
——————————————————————————
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/projectA
ServerName localhost:80
ErrorLog logs/projectA-error_log
CustomLog logs/projectA-access_log common
</VirtualHost>

<VirtualHost *:800>
#    ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/projectB
ServerName localhost:800
ErrorLog logs/projectB-error_log
CustomLog logs/projectB-access_log common
</VirtualHost>

<VirtualHost *:567>
#    ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/harish/
ServerName localhost:567
ErrorLog logs/harish-error_log
CustomLog logs/harish-access_log common
</VirtualHost>
—————————————————————————-
Now as you are done with till here, go to the top of the conf file and find for the following section of content. Did you observe the 80, 800, 567 above.These are the ports that web server listens to serve request and so you need to tell specifically( if mentioned in virtualhost) to listen to these ports as below , in your httpd.conf file.
—————————————————————————-
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
Listen 800
Listen 567

%d bloggers like this: