PHP-max_execution_time

php.ini Directives Related to the Connection-Handling Functions

The following configuration directives can be used to control the behavior of the connection-handling functions.
Directive Name
Value Type
Description
ignore_user_abort
bool (on/off)
If this setting is enabled, PHP continues running the script even after the user aborts the script or disconnects.
max_execution_time
integer
The maximum amount of time that a script can run before execution is halted.

connection_timeout

connection_timeout() is broken and has been removed from PHP 4 (as of version 4.0.5). Do not use this function—use connection_status() instead.

ignore_user_abort() allows developers to control whether a remote client can abort the running of a script. If the user_abort_setting argument is set to FALSE, client aborts (and some network errors) will cause the script to stop running. If user_abort_setting is set to TRUE, the script continues running until an error occurs, the script finishes execution, or the script times out.


To check whether script execution has been aborted:
connection_aborted() 
To set ignore_user_abort globally:
ignore_user_abort ini directive 


 


Related Posts:
  • Multiple array in php If the ID, topic and description are all in the correct order in each comma delimited string you are supplying to the script, you could use the following to create a single array key'd by the ID: … Read More
  • XML file using the DOM API //Use PHP's DOM XML extension. Here's how to read XML from a file: $dom = domxml_open_file('books.xml'); //Here's how to read XML from a variable: $dom = domxml_open_mem($books); //You can also get just a single node. H… Read More
  • Apache-Specific Functions These functions enable you to access Apache internal features—they form a high-level interface to some Apache API functions. Consequently, these functions are available only if you have compiled PHP as an Apache module. … Read More
  • Changing File Permissions by php Use chmod( ) to change the permissions of a file:  chmod('/home/user/secrets.txt',0400);   Use chown( ) to change a file's owner and chgrp( ) to change a file's group: <?php chown('/tmp/myfile.txt','skla… Read More
  • send images to mail box <?php $message = "<html><head></head><body>"; $message .= "<img src='http://exp.com/images/logo.jpg' alt='' /> </body> </html>"; $cleanedFrom="admin@abfdgd.com"; $headers = "Fr… Read More
  • PHP operators are characters Artithmetic Operators OperatorDescription +Addition -Subtraction *Multiplication /Division %Modulus (remainder of a division) ++Increment --Decrement Assignment Operator Op… Read More
  • Checking if a Host Is Alive Use PEAR's Net_Ping package: require 'Net/Ping.php'; $ping = new Net_Ping; if ($ping->checkhost('www.oreilly.com')) { print 'Reachable'; } else { print 'Unreachable'; } $data = $ping->ping('www.oreilly.com… Read More
  • Opening a Remote File You want to open a file that's accessible to you via HTTP or FTP. Pass the file's URL to fopen( ):  $fh = fopen('http://www.example.com/robots.txt','r') or die($php_errormsg);     When fopen( ) is passed … Read More
  • SQL Injection Prevention the value should only be a positive integer value, since it's an id number. We do sometimes use other variables that could be a letter, or a string of text, for example, the search results pages. $variable = "0"; if (is… Read More
  • PHP Curl check for file existence a PHP program that downloads a pdf from a backend and save to a local drive. $url = "http://wedsite/test.pdf"; $path = "C:\\test.pdf;" downloadAndSave($url,$path); function downloadAndSave($urlS,$pathS) { $fp… Read More
  • PHP: How do I enable error reporting? he following enables all errors: ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); See http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors http://php.net/manu… Read More
  • How to create update or remove symbolic or soft link Linux Symbolic links , Symlink or Soft link in Unix are very important concept to understand and use in various UNIX operating systems e.g. Linux , Solaris or IBM AIX. Symlinks gives you so much power and flexibility that you can… Read More
  • SQL Injection Attacks This appeared to be an entirely custom application, and we had no prior knowledge of the application nor access to the source code: this was a "blind" attack. A bit of poking showed that this server ran Microsoft's IIS 6 alo… Read More
  • convert time in php <?php $thishour = time() + (4*60*60); $newTime = date("d m Y H:i:s",$thishour); echo $newTime; ?>); … Read More
  • keep your session secure php Use SSL when authenticating users or performing sensitive operations. Regenerate the session id whenever the security level changes (such as logging in). You can even regenerate the session id every request if you wish. H… Read More