Interview :: PHP
By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script takes more than 30 seconds, PHP stops the script and returns an error.
You can change the script run time by changing the max_execution_time directive in the php.ini file.
When a script is called, set_time_limit function restarts the timeout counter from zero. It means, if default timer is set to 30 sec, and 20 sec is specified in function set_time_limit(), then script will run for 45 seconds. If 0sec is specified in this function, script takes unlimited time.
There are 3 types of error in PHP.
- Notices:These are non-critical errors. These errors are not displayed to the users.
- Warnings:These are more serious errors, but they do not result in script termination. By default, these errors are displayed to the user.
- Fatal Errors:These are the most critical errors. These errors may cause due to immediate termination of script.
The exit() function is used to stop the execution of PHP script.
CRYPT() and MD5()
The .htaccess is a configuration file on Apache server. You can change configuration settings using directives in Apache configuration files like .htaccess and httpd.conf.