Kurinchi Blogger Scribbles …


Posts Tagged ‘PHP error’

Aug 31
2009

PHP removing deprecated related errors from display

Last updated: September 2nd, 2009

To remove deprecated warning message displays when executing PHP programs, open php.ini file and ADD to it

error_reporting = E_ALL & ~E_DEPRECATED

This is the setting for the production environment where you would not like to display the deprecated function related errors.

Sample error message
Assigning the return value of new by reference is deprecated in nusoap.php on line 7381

May 28
2009

PHP: Fatal error: Maximum execution time of 30 seconds exceeded

Last updated: May 30th, 2009

This error happens when the execution time of the PHP script exceeds the time limit for program execution in Php.ini file.

By default the timer is set to 30 seconds in php.ini and you can track the time limit by tracing for ‘max_execution_time’ directive in php.ini.

A quick way to find the execution time set for PHP is to check the phpinfo() function.

Solution:
You can set the time limit by issuing “set_time_limit(60);” statement to increase the time limit.

A better way would be trace where the bottlenecks are in the program to identify what causes the time lag. Possible causes may be

* Poorly structured queries
* Never ending iterations
* Read lock on files when they are opened by multiple sources etc.

May 26
2009

What does unexpected T_DOUBLE_ARROW means in PHP programming?

Last updated: May 29th, 2009

Sample PHP error statement

PHP: Parse error: syntax error, unexpected T_DOUBLE_ARROW in .\rvunits_controller.php on line 152

It is a syntax error in the coding. Check the line number indcated in the error to see how the values have been assigned to variables. There should be an array that should have been used in that place and the value assignment seems to happen outside the said boundaries – like “xyz” => “name” should be changed to array(“xyz” => “name”) instead.


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict