Archive for October, 2009

Display PHP errors when display_errors is Disabled

1

There are some servers where the webmasters or server admin wants to make the server more secure, they will disable the display_errors on the PHP settings.

The php.ini will look like this:

{code type=php}; – display_errors = Off [Security]
; With this directive set to off, errors that occur during the execution of
; scripts will no longer be displayed as a part of the script output, and thus,
; will no longer be exposed to remote users. With some errors, the error message
; content may expose information about your script, web server, or database
; server that may be exploitable for hacking. Production sites should have this
; directive set to off.

Print out errors (as a part of the output). For production web sites,
; you’re strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On{/code}

During apps development, u will need to display the errors in order for u to debug the code easily, so u can track what’s the error was.

Add below code on top of your PHP code:

{code type=php}ini_set(‘display_errors’, 1);
ini_set(‘log_errors’, 1);
ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’);  // this is optional
error_reporting(E_ALL);{/code}

Happy coding with PHP.

Which Lens for Portrait Photography?

1

I found this to be a great tips on choosing lens for portrait photography.

From this video, it says that long lens is better. Why? Below are the reasons.

  • Narrow angle of view
  • Less distortion
  • Subject more comfortable
  • Compose shots easily
yea2009

Young Endurance Athlete 2009

0

yea2009

The Young Endurance Athlete 2009 will be held in Putrajaya on the 17th and 18th October 2009.

Details are below:

Date: 17 & 18 October 2009
Venue : Kolam Renang Awam, Precinct 6, Putrajaya.

Tentative

17/10 – Triathlon Clinic (7.30am – 2.30pm)
18/10 – Race Day (7.00am – 12.00pm)

Age Categories

Boy
A : 7-9 yrs
B : 10-12 yrs
C : 13-15 yrs

Girl
A : 7-9 yrs
B : 10-12 yrs
C : 13-15 yrs

Closing Date: 7th October 2009

For more info, call:

Amir at 012-219 5552 or email at ybicycle [ at ] yahoo.com

Mejar Kalam at 019-271 2569 or email at kalampie [ at ] gmail.com

Julie at 017-332 3451 or email at missjewelz [ at ] gmail.com

Go to Top