Jan 9 / admin

Ugly fix for ‘Function split() is deprecated’

Rename the split() function to explode() function.
That will solve it.

Jan 9 / admin

Ugly fix for ’strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings’

Few month ago, while upgrading my blog,i have came across with this error message.
what i did is adding
date_default_timezone_set('UTC');
to the script (top) that cause error.

You can implement it to other script that generate same error message.

Jan 9 / admin

Ugly fix for ‘Deprecated: Assigning the return value of new by reference is deprecated’

In PHP5 this idiom is deprecated
$obj_ses =& new SESSION();
if it generate the warning,  removed the ampersand (&) .

Jan 9 / admin

Ugly fix for ‘ereg () is deprecated error.’

While installing my php script last night, i have came across with this error message.Most probably you have installed PHP 5.3 or upper version.If you upgraded to PHP 5.3, chances are high you’re going to run into a few warnings or deprecated function messages.
An example is the ereg family of functions, which are gone for good, as they were slower and felt less familiar than the alternative Perl-compatible preg family.

To migrate ereg():

ereg('\.([^\.]*$)', $this->file_src_name, $extension);

becomes

preg_match('/\.([^\.]*$)/', $this->file_src_name, $extension);

Notice that I wrapped the pattern (\.([^\.]*$)) around / /, which are RegExp delimiters. If you find yourself escaping / too much (for an URL for example), you might want to use the # delimiter instead.

To migrate ereg_replace():

$this->file_dst_name_body = ereg_replace('[^A-Za-z0-9_]', '', $this->file_dst_name_body);

becomes

$this->file_dst_name_body = preg_replace('/[^A-Za-z0-9_]/', '', $this->file_dst_name_body);

Again, I just added delimiters to the pattern.
If you are using eregi functions (which are the case-insensitive version of ereg), you’ll notice there’re no equivalent pregi functions. This is because this functionality is handled by RegExp modifiers.

Basically, to make the pattern match characters in a case-insensitive way, append i after the delimiter:

eregi('\.([^\.]*$)', $this->file_src_name, $extension);

becomes

preg_match('/\.([^\.]*$)/i', $this->file_src_name, $extension);
Jan 4 / admin

which part that stated tuition ?

mm got a call .. regarding ITS.

snip

me: hello.. good evening.

x: hi there.. ITS is it?

me: yes, can i help you ?

x: do u provide any tuition class?

me: huh.. we dont deal in tuition , but in IT.

x: how about internationally ?

me: sorry miss, we don’t deal in tuition.

x: oohh wrong place ?? mmm ..

me: yes miss. wrong number .

So.. which part in ITS stated tuition ?

Jan 2 / admin

Happy New Year 2010

Great year ahead! Hope this year will bring a fruitful outcome in whatever things that we do in life.

Dec 24 / admin

Ishhh.. back again ..

Revive my blog again, didn’t notice it was down until i revisit this old blog of mine.

To cut story short,i have some technical problems with my previous hosting until i switched to this new host.