krish – 起死回生 [Wake up from death & return to life.]

February 5, 2010

Fixing PHP woes for Zabbix

For Zabbix server installation you may need to change one or more php directives depending on the version of Zabbix server being installed.

Here’s some that I had to change,


[root@zabbix ~]# egrep -i '(max_execution_time|date.timezone|mbstring.func_overload|memory_limit)' /etc/php.ini
max_execution_time = 300     ; Maximum execution time of each script, in seconds
memory_limit = 128M      ; Maximum amount of memory a script may consume
date.timezone = "America/New_York"
mbstring.func_overload = 2

Make sure that you remove the prefix “;” if you are changing an ignored directive and do not forget to restart httpd. :)

November 12, 2009

Swapping two variables without using third variable – old trick

Filed under: Programming — krish @ 6:21 pm
Tags: , ,

Pretty old trick, used today in my php code :


// Swap the months if from-month selected is later than to-month
//if($frommon > $tomon){
// $tempmon = $frommon;
// $frommon = $tomon;
// $tomon = $tempmon;
//}
// Smarter way using X-OR
if($frommon > $tomon){
$frommon = $frommon ^ $tomon ^ ( $tomon = $frommon );
}

November 24, 2008

Everything you’d need with Eclipse!

Filed under: Fun Stuff on Internet — krish @ 9:22 am
Tags: , ,

Not much to explain here; just read :)


[08:56:57] krish says: Is eclipse a pre-requisiste for Zend studio
[08:58:35] dmsuperman says: krish: I love eclipse, personally
[08:58:46] dmsuperman says: krish: Get the PDT package, though
[08:58:46] zkv says: dmsuperman: i have one more fun example. one moment :)
[08:58:51] zkv says: vim
[09:00:42] krish says: dmsuperman: I am not really a hardcore developer. Eclipse seems to be a huge rock on my tiny boat :P
[09:00:57] gaintsura says: krish: vim =)
[09:01:11] krish says: thats what I am using right now
[09:01:26] dmsuperman says: krish: It's got tons of features. Code-completion, including reading _your_ classes and functions and docblocks to help you with that, as well as basically every web-related plugin you could ask for
[09:01:34] dmsuperman says: krish: SVN support, SourceSafe support, FTP
[09:01:39] dmsuperman says: krish: Everything I need :)
[09:01:49] Touqen says: Does it give bjs?
[09:01:52] krish says: you must be the happiest man on earth
[09:02:09] dmsuperman says: Touqen: That need is already met elsewhere ;)
[09:02:34] krish says: Did that read bjs! rofl

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: