Edit /etc/php.ini and add the timezone setting within the file. For a list of timezone settings, visit http://php.net/manual/en/timezones.php
[Date] ; Defines the default timezone used by the date functions
date.timezone = America/New_York
Reason why you see this message is due to PHP memory leakage. PHP is trying to load a large image or file into memory and is not finding enough space for it to load.
If you think, that you will need the necessary feature to upload large files then there are two ways by which you can enable this feature.
i) Edit the physical file and have the line
ii) Edit php.ini and add the following line. You need to restart the apache/IIS server once php.ini file is modified.
PEAR stands for PHP Extension and Application Repository.
To learn more about the PEAR library click here
If you are beginner, the following link will help you tread with the library usage PEAR Manual
Installation instructions clearly walks through the steps for PEAR configuration. There may be cases where you may want to use PEAR libraries for specific projects only in which case you can install PEAR library for that specific purpose. To use it in projects, PEAR path should be set in php.ini settings or should be included in the project configuration’s physical path.
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
It is always secured to turn OFF register_globals in PHP applications. Earlier, we have seen how to turn OFF register_globals setting via .htaccess file and in this blog we will use php.ini instead.
Using a text editor create a file called php.ini. This will be our first step.
Next, we need to add the following line of code in php.ini
register_globals = off
Upload php.ini file to the root folder where your application resides.
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.
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.